So it appears this is currently the issue, as @Tom-Elliott has made me aware. The PCI / FIPS Compliance is being pushed by Group Policy (as part of my AD), so once thats in place it basically renders the FOG client moot. Prior to this it works just fine, assigning the hostname, activating Windows and joining the domain, then running the snapin initially.
Since my snapin deleted the local admin account and reboots, there is no choice but to log in to an AD account for which this policy is enforced.
So under the local account the snapin runs because the FOG client is allowed to connect and authenticate.
What I have decided to do to address this is the following:
- Leave the FOG client in the image and let it change host name, activate Windows and domain join.
- Let the FOG client run my snapin/batch file to delete the local user, force gpupdate and uninstall FOG client, then reboot
- Login as a domain user and manually run a batch file that just deletes the remaining
C:\users\username
The end result is the machine is ready to use, I get all the initial benefits of the FOG client but do not have it left on the machine when it cannot operate. Hopefully when the matter is resolved and it can run with this gpo setting I can leave the FOG client installed to make working with the machines easier long term.
I am currently testing my revised snapin to ensure it runs, uninstalling the FOG client and performing its other tasks properly. Looking at the newely booted images now and the snapin may not be 100% as it appears stuck on “please do not shut down until this is complete”.
EDIT: uninstall works, but the next line in the batch file (to reboot) doesnt execute. I think I can resolve this by adding a forced restart to the uninstall command.