Change the Farm Passphrase
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 ...
Get PowerShell™ for SharePoint® 2013 How-To now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.