3 Replies Latest reply on Jan 20, 2009 6:23 AM by Zsoldier

    Set-OSCustomizationSpec Bugs?

    Zsoldier Expert


      From my blog:[http://tech.zsoldier.com]




      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


      PowerShell 1.0

      VI Toolkit Update 1 Build 113525


      Full Story:


      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"


      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


      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