Thursday, April 4, 2013

Reset the Farm Passphrase in SharePoint 2010

Reset the Farm Passphrase in SharePoint 2010


Reference:

http://techtrainingnotes.blogspot.com/2009/12/sharepoint-2010-change-passphrase.html
http://sharepointadam.com/2010/01/21/reset-the-farm-passphrase-in-sharepoint-2010/
http://blah.winsmarts.com/2013-2-SharePoint_2010_and_PowerShell_30.aspx

Use PowerShell

PS C:\Users\Administrator> $passphrase = ConvertTo-SecureString -asPlainText -Force
cmdlet ConvertTo-SecureString at command pipeline position 1
Supply values for the following parameters:
String: hello,world555
PS C:\Users\Administrator> Set-SPPassPhrase -PassPhrase $passphrase -Confirm

cmdlet Set-SPPassPhrase at command pipeline position 1
Supply values for the following parameters:
ConfirmPassPhrase: ********

Confirm
Are you sure you want to perform this action?
Performing operation "Set-SPPassPhrase" on Target "SPPassPhrase".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): y
PS C:\Users\Administrator>


PowerShell Error

If you see this error

Set-SPPassPhrase : Microsoft SharePoint is not supported with version 4.0.30319.18034 of the Microsoft .Net Runtime.
At line:1 char:1
+ Set-SPPassPhrase -PassPhrase $passphrase -Confirm
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (Microsoft.Share...etSetPassPhrase:SPCmdletSetPassPhrase) [Set-SPPassPhrase], PlatformNotSupportedException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletSetPassPhrase


Reference
http://blah.winsmarts.com/2013-2-SharePoint_2010_and_PowerShell_30.aspx

and change the SharePoint PowerShello target to (Add -Version 2.0)

C:\Windows\System32\WindowsPowerShell\v1.0\PowerShell.exe -Version 2.0 -NoExit " & ' C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\\sharepoint.ps1 ' "

1 comment:

  1. Lucky Club Casino Site | Login - Lucky Club
    Lucky Club is one of the newest and most reputable online casinos in the world created to cater all types of players. Our 카지노사이트luckclub site is safe and secure with a wide

    ReplyDelete