Script manager batch script samples (Local administrator and managing DNS records)

Script manager batch script samples (Local administrator and managing DNS records)

Sample workflows running batch scripts.

  • Add domain user to administrator local group
  • Add record to DNS
  • Add record to DNS with optional PTR
  • Delete record from DNS

These were created with the help of the guest script manager package.

Disclaimer: These samples workflows are provided AS IS and are not considered production quality and are not officially supported. Use at your own risk. Feel free to modify and expand and share your contributions.

Attachments
Comments

Hey there.  I hit a small bug.  When I tried to run a batch operation it blew up right at the end on the very last step "Delete file in guest".  You have a decision which checks for powershellScriptGuestPath defined.  In the scriptable task "set for bat" I added an output for powershellScriptGuestPath and set it to null and that fixed it.

Heya... I have been trying to use this to do some post provisioning activities and I can't seem to get a script to work.  I can get this to work if I use the "Run a program in a guest" and issue a single command at a time but for some reason it isn't working with this package.  I am just trying to activate the machine.  Here is the content of my script.

mkdir c:\configlog

reg add HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v SearchList /f /t REG_SZ /reg:32 /d domain1.com,domain2.com

reg add HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v SearchList /f /t REG_SZ /reg:64 /d domain1.com,domain2.com

c:\Windows\SysWOW64\cscript.exe /nologo /B c:\Windows\System32\slmgr.vbs -ipk ourWindowsLIcenseKey

c:\Windows\SysWOW64\cscript.exe /nologo /B c:\Windows\System32\slmgr.vbs -ato

The first 3 lines are working but the cscript lines aren't.  I have tried using just c:\Windows\System32\slmgr.vbs as well.  Any clue what I can do to get this to work?

Version history
Revision #:
1 of 1
Last update:
‎01-06-2014 01:40 PM
Updated by: