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

Feb 24, 2011 at 3: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 2:25 PM

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

Coordinator
Mar 11, 2011 at 2: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!

Brian

Mar 15, 2011 at 5:32 AM

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

Apr 23, 2011 at 12:34 PM

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

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

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

Coordinator
Apr 27, 2011 at 9: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...!

Brian