VMware Cloud Community
Zsoldier
Expert
Expert

Set-OSCustomizationSpec Bugs?

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

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

Chris Nakagaki (中垣浩一)
Blog: https://tech.zsoldier.com
Twitter: @zsoldier
0 Kudos
3 Replies
halr9000
Commander
Commander

Much of these are known issues which will be addressed in version 1.5 of the toolkit.






[PowerShell MVP|https://mvp.support.microsoft.com/profile=5547F213-A069-45F8-B5D1-17E5BD3F362F], VI Toolkit forum moderator

Author of the upcoming book: Managing VMware Infrastructure with PowerShell

Co-Host, PowerScripting Podcast (http://powerscripting.net)

Need general, non-VMware-related PowerShell Help? Try the forums at PowerShellCommunity.org

My signature used to be pretty, but then the forum software broked it. vExpert. Microsoft MVP (Windows PowerShell). Author, Podcaster, Speaker. I'm @halr9000
0 Kudos
yboychev
Hot Shot
Hot Shot

HI,

For me it is normal when you are trying to set a new domain for the spec to be asked for credentials. This cmdlet is designed that way and this particular behavior will not be changed for the updcomming 1.5 release. However the second problem is a real one. I've tried to reproduce it with the latest builds and the problem seems to be fixed. So wait for the 1.5 to be released Smiley Happy

\Yavor

0 Kudos
Zsoldier
Expert
Expert

Good to hear. I searched the communities and didn't see it mentioned so I thought I would throw in my two cents.

Chris Nakagaki (中垣浩一)
Blog: https://tech.zsoldier.com
Twitter: @zsoldier
0 Kudos