VMware Cloud Community
Zsoldier
Expert
Expert
Jump to solution

Set-OSCustomizationSpec -GuiRunOnce adding more than one entry.

So I'm trying to figure out how I can modify all my current scripts by adding some more registry edits via powershell to the guirunonce entry. I end up with one entry that contains all my reg changes instead of multiple entries as shown in the screenshots. This is what I'm running.

Set-OSCustomizationSpec -spec TEST -GuiRunOnce "reg delete 'HKLM\SOFTWARE\Network Associates\ePolicy Orchestrator\Agent' /v AgentGUID /f, reg delete 'HKLM\SOFTWARE\Network Associates\ePolicy Orchestrator\Agent' /v MacAddress /f"

The MultiLine.jpg shows how the spec looked before running the script. The Oneline.jpg shows what it looks like after running the cmdlet. Any ideas?

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

Accepted Solutions
admin
Immortal
Immortal
Jump to solution

Set-OSCustomizationSpec -spec TEST -GuiRunOnce "reg delete 'HKLM\SOFTWARE\Network Associates\ePolicy Orchestrator\Agent' /v AgentGUID /f, reg delete 'HKLM\SOFTWARE\Network Associates\ePolicy Orchestrator\Agent' /v MacAddress /f"

Try each line in its own set of quotes, separated by a comma.

-GuiRunOnce "reg delete 'HKLM\SOFTWARE\Network Associates\ePolicy Orchestrator\Agent' /v AgentGUID /f", "reg delete 'HKLM\SOFTWARE\Network Associates\ePolicy Orchestrator\Agent' /v MacAddress /f"






=====

Carter Shanklin

Read the PowerCLI Blog
[Follow me on Twitter|http://twitter.com/cshanklin]

View solution in original post

Reply
0 Kudos
2 Replies
admin
Immortal
Immortal
Jump to solution

Set-OSCustomizationSpec -spec TEST -GuiRunOnce "reg delete 'HKLM\SOFTWARE\Network Associates\ePolicy Orchestrator\Agent' /v AgentGUID /f, reg delete 'HKLM\SOFTWARE\Network Associates\ePolicy Orchestrator\Agent' /v MacAddress /f"

Try each line in its own set of quotes, separated by a comma.

-GuiRunOnce "reg delete 'HKLM\SOFTWARE\Network Associates\ePolicy Orchestrator\Agent' /v AgentGUID /f", "reg delete 'HKLM\SOFTWARE\Network Associates\ePolicy Orchestrator\Agent' /v MacAddress /f"






=====

Carter Shanklin

Read the PowerCLI Blog
[Follow me on Twitter|http://twitter.com/cshanklin]

Reply
0 Kudos
Zsoldier
Expert
Expert
Jump to solution

Eureka! Duh on my part! Thanks. Signed up for your session @ 5:30. See ya at VMWorld.

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