Scenario/Problem: You want to change the farm passphrase.
Solution: Use the Set-SPPassPhrase
cmdlet with the PassPhrase
parameter.
The Set-SPPassPhrase
cmdlet is used solely to change the SharePoint farm passphrase. This passphrase was initially entered during the installation of the SharePoint farm. Provide a secure string value with the PassPhrase
parameter, as shown in Listing 4.5.
Set-SPPassPhrase -PassPhrase (ConvertTo-SecureString -asplaintext
-force -string "SharePoint1")
For scripting purposes, if you do not want to be prompted to confirm the passphrase entry, include the ConfirmPassPhrase
parameter and switch off the general confirmation, as shown in Listing 4.6.
Set-SPPassPhrase -PassPhrase (ConvertTo-SecureString -asplaintext
-force -string "SharePoint1") -ConfirmPassPhrase
(ConvertTo-SecureString -asplaintext -force -string "SharePoint1")
-Confirm:$false
Tip
The default operation performs the passphrase modification for the entire farm. If you run into issues, use the LocalServerOnly
switch parameter to perform the modification on only the current server. Continue on each server in the farm to pinpoint the problem.
3.133.137.17