k blog.kenaro.com
← All articles

“Passphrase” error while creating a new SharePoint 2010 farm with PowerShell cmdlet “New-SPConfigurationDatabase”

· Ingo Karstein

I tried to create a new SharePoint Server 2010 farm by using PowerShell cmdlet “New-SPConfigurationDatabase” in one of the first steps.

I got this error:

New-SPConfigurationDatabase : The passphrase supplied does not meet the minimum complexity requirements. Please select another passphrase that meets all of the following criteria: is at least 8 characters; contains at least three of the following four character groups: English uppercase characters (A through Z); English lowercase characters (a through z); Numerals (0 through 9); Non-alphabetic characters (such as !, $, #, %). Type a passphrase which meets these requirements.

At C:UsersService.SP_InstallDesktopSetupScript.ps1:41 char:28

  • New-SPConfigurationDatabase <<<< -DatabaseName $spconfigdbname -DatabaseServer $dbserver -Passphrase $sppassphrase_sec -FarmCredentials $spfarmcredential+ CategoryInfo : InvalidArgument: (System.Security.SecureString:SecureString) [New-SPConfigurationDatabase], SPException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewSPConfigurationDatabase

This is my script:

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

$sppassphrase=“GOY$sV3SthlkyN%3YTdS&“
$sppassphrase_sec = (ConvertTo-SecureString $sppassphrase -AsPlainText -force)

$spfarmuser=“domainfarmaccount”
$spfarmuserpwd=“P@ssw0rd”

#Securing Settings
$spfarmcredential = new-object -typename System.Management.Automation.PSCredential -argumentlist $spfarmuser, (ConvertTo-SecureString $spfarmuserpwd -AsPlainText -force)

New-SPConfigurationDatabase -DatabaseName “configdb” -DatabaseServer “sqlserver” -Passphrase $sppassphrase_sec -FarmCredentials $spfarmcredential

After debugging I found the following:

When I write the value of variable “$sppassphrase” the the console (with cmdlet write-host) I get:
GOY%3YTdS&
instead of
GOY$sV3SthlkyN%3YTdS&

The problem is: The part “$sV3SthlkyN” will be interpreted as variable name!!!

You have to use escape sequences at least for the “$” character:

$sppassphrase=“GOY**`$**sV3SthlkyN%3YTdS&“

UPDATE!

Use ’ instead of ” and you will not have a problem at all!

$sppassphrase=‘GOY$sV3SthlkyN%3YTdS&’

You’ll get what you’ve expected: The correct password string including ”$”… (But the solution above also works!)

4 comments

bet365 italia Oct 6, 2010
hello!This was a really quality subject! I come from itlay, I was fortunate to seek your website in wordpress Also I obtain a lot in your blog really thanks very much i will come later
Kent Dec 10, 2010
This post just saved me some heart ache. I read it and went doy! that makes sense.
Dave Jul 30, 2011
Thank you!! I was wondering what was wrong with my pass-phrase since I could get other pass-phrases to work. I needed to know why.
ikarstein Aug 3, 2011
You are welcome :-)

Leave a comment

Your comment is reviewed before it appears. Your name is shown with the comment; your email is required for moderation but never published.