This project has moved. For the latest updates, please go here.

Be careful with your passwords, as it can break the install

Feb 24, 2011 at 2:01 AM

At a client site today, we were given the accounts and randomly generated passwords. The installation continued to fail, being unable to read any of the properties from the XML file.

I found that if the password has an '&' in it, the XML is not valid, and therefore the install will fail.  There was another thread where someone was having problems with the farm passphrase not coming through. Perhaps this was the cause.

Lesson learnt: Copy and paste your XML config into an XML validator before you start anything!

Mar 10, 2011 at 1:25 PM

I've had the same issue and just used the XML validator by W3C

Mar 11, 2011 at 1:42 PM

Thanks guys this is great, I think I'll add it to the project home page as a must-do before running the script!


Mar 15, 2011 at 4:32 AM

Just a quick one.  If you did want & in your password wouldn't just encoding the & into & work?

Apr 23, 2011 at 11:34 AM

The AutoSPInstallerInput.xml file suggests using CDATA for passwords with special characters.  Here is one approach.

<ManagedAccount username="DOMAIN\spservice" Password="pass$1word" CommonName="spservice"/>
<ManagedAccount username="DOMAIN\spservice" CommonName="spservice"><Password><![CDATA[pass$1word]]></Password></ManagedAccount>

In the AddManagedAccounts function in AutoSPInstallerFunctions.ps1, change the password reference.
$password = $account.password
$password = $account.password.InnerText

Apr 27, 2011 at 8:18 PM

Wow thanks, I hadn't even considered that CDATA wasn't allowed in an attribute... Looks like another XML schema update and updates to the script...!