I have 2 templates 1 x Windows 2008 R2 1 x Windows 2012 R2
I have sysprep'ed both templates, Generalize / shutdown, etc, etc
On both templates have I the following post-sysprep script that should run upon a new host provisioned from either template
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('http://repo.myserver.com/chef/winbuild/winconfig.ps1'))"
This script works a treat for the Windows 2008 R2 template
Can anyone answer why this scrip isn't even running for my Windows 2012 R2 template ?
Before you ask, the script was a complex script (which worked on Win2k8R2 template) so I removed that and just created a simple create file, to see if the script was running
like before it worked on Windows 2008 R2 but not Windows 2012 R2
I've looked in sysprep error logs, but this is after sysprep, so I can't see any errors there. I added error handling to my simple create file script and its not even creating the error file, let alone outputting any errors, so I know its not running.
This is the strange thing, if I run setupcommand.cmd, once logged in, it runs perfectly fine, if I run it in ISE it runs perfectly fine, just doesn't run post-sysprep.
I have also noticed that when the image is spinning up, it takes a long time at the "Getting Devices Ready", could this have something to do with it
Any advice would be great