Software architecture-powershell command of sharepoint -named “set-sppassphrase”

After long time, when i tried to run sharepoint product configuration wizard, i came to know that i have forget the passPhrase……ohhhh ….i know i am bad in memmory management…..:(

Searched on net to find that there is a powershell command of sharepoint to reset the passphrase. Got help of powershell command named “set-sppassphrase”, below is what followed it and after that i was ready to move with new passphrase.

PS C:\Users\administrator> get-help set-sppassphrase -full

NAME
    Set-SPPassPhrase
SYNOPSIS
    Sets the pass phrase to a new value.

SYNTAX
    Set-SPPassPhrase -ConfirmPassPhrase <SecureString> -PassPhrase <SecureStrin
    g> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParam
    eter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]

    Set-SPPassPhrase -PassPhrase <SecureString> [-AssignmentCollection <SPAssig
    nmentCollection>] [-Confirm [<SwitchParameter>]] [-LocalServerOnly <SwitchP
    arameter>] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]

DESCRIPTION
    The Set-SPPassPhrase cmdlet sets the Passphrase to a new Passphrase value.
    If the LocalServerOnly parameter is not used, the farm encryption key is re
    -encrypted with the new value and attempts to propagate this value to all o
    ther servers in the farm. If the LocalServerOnly parameter is used, this is
     updated on the local machine only, and the farm encryption key is not chan
    ged. The Passphrase value must be the same on all servers in the farm if th
    e farm is to function correctly. So if the Passphrase fails to propagate to
     all servers, the LocalServerOnly parameter can be used to set the remainin
    g servers to the new Passphrase value manually.

    For permissions and the most current information about Windows PowerShell f
    or SharePoint Products, see the online documentation (http://go.microsoft.c
    om/fwlink/?LinkId=163185).

PARAMETERS
    -ConfirmPassphrase <SecureString>

        Required?                    true
        Position?                    Named
        Default value
        Accept pipeline input?       False
        Accept wildcard characters?  false

    -Passphrase <SecureString>
        Specifies the new Passphrase value.


        Required?                    true
        Position?                    Named
        Default value
        Accept pipeline input?       False
        Accept wildcard characters?  false

    -AssignmentCollection <SPAssignmentCollection>
        Manages objects for the purpose of proper disposal. Use of objects, suc
        h as SPWeb or SPSite, can use large amounts of memory and use of these
        objects in Windows PowerShell scripts requires proper memory management
        . Using the SPAssignment object, you can assign objects to a variable a
        nd dispose of the objects after they are needed to free up memory. When
         SPWeb, SPSite, or SPSiteAdministration objects are used, the objects a
        re automatically disposed of if an assignment collection or the Global
        parameter is not used.

        When the Global parameter is used, all objects are contained in the glo
        bal store. If objects are not immediately used, or disposed of by using
         the Stop-SPAssignment command, an out-of-memory scenario can occur.


        Required?                    false
        Position?                    Named
        Default value
        Accept pipeline input?       True
        Accept wildcard characters?  false

    -Confirm [<SwitchParameter>]
        Prompts you for confirmation before executing the command. For more inf
        ormation, type the following command: get-help about_commonparameters


        Required?                    false
        Position?                    Named
        Default value
        Accept pipeline input?       False
        Accept wildcard characters?  false

    -LocalServerOnly <SwitchParameter>
        Scopes the Passphrase change to the local server only. If this paramete
        r is not used, the Passphrase change is performed farm-wide.


        Required?                    false
        Position?                    Named
        Default value
        Accept pipeline input?       False
        Accept wildcard characters?  false

    -WhatIf [<SwitchParameter>]
        Displays a message that describes the effect of the command instead of
        executing the command. For more information, type the following command
        : get-help about_commonparameters


        Required?                    false
        Position?                    Named
        Default value
        Accept pipeline input?       False
        Accept wildcard characters?  false

    <CommonParameters>
        This cmdlet supports the common parameters: Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
        OutBuffer and OutVariable. For more information, type,
        "get-help about_commonparameters".

INPUTS

OUTPUTS

    ------------------EXAMPLE-----------------------

    C:\PS>$passphrase = ConvertTo-SecureString -asPlainText -Force

    C:\PS>Set-SPPassPhrase -PassPhrase $passphrase -Confirm


    This example queries for a string to use as a passphrase, and sets the farm
     passphrase to a new value.

Here is actual command that reset the passphrase for sharepoint farm

PS C:\Users\administrator> $passphrase=convertto-securestring -asplaintext -forc
e

cmdlet ConvertTo-SecureString at command pipeline position 1
Supply values for the following parameters:
String: webdir33333R
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
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: