Set-OSCustomizationSpec Bug?

SUMMARY:
Here are the required options for the "Set-OSCustomizationSpec" for windows custom spec script.
$Creds = Get-Credentials
Set-OSCustomizationSpec -spec * -domain "mydomain" -DomainCredentials $Creds -Fullname "Chris" -ChangeSID 1
Configuration:
PowerShell 1.0
VI Toolkit Update 1 Build 113525

Full Story:
I have several customization specs setup because of multiple networks segments. They are all pretty much identical in the way they are setup, except the gateway. It's kind of a pain to edit them through the GUI one by one, so I decided to try the "Set-OSCustomizationSpec" cmdlet. It's straight-forward for the most part, but seems to have some bugs associated with it. Here is the string I started with:
Set-OSCustomizationSpec -spec * -domain "mydomain"
This produces an error however, requesting that I also use the "-DomainCredentials" switch. My existing specs already have this information filled out, so it seems stupid that I HAVE to include this information. Anyway, here is what I tried next:
$Creds = Get-Credentials
Set-OSCustomizationSpec -spec * -domain "mydomain" -DomainCredentials $Creds
Success!... well kinda sorta... I went to review the scripts and the "FullName" field was blanked out and the "ChangeSid" checkbox went from True to False. (sigh)... This is an obvious bug in the toolkit. So to work around this here is the final script that worked:
$Creds = Get-Credentials
Set-OSCustomizationSpec -spec * -domain "mydomain" -DomainCredentials $Creds -Fullname "Chris" -ChangeSID 1
I've also posted this to the VMWare Communities.

No comments: