Usually, when using provisioning to execute a file you have to point to the exact location of the file. Sysprep, however, is located in Windows\Sytem32\Sysprep folder and when we will try to run in with help of provisioning (which runs in 32-bit mode) the call will be redirected and it will fail.
In 64-bit Windows, if a 32-bit application includes the "\System32" folder name in a folder path, the system automatically makes a redirection to the SysWOW64.
You can find more information on the redirection in official Microsoft document here https://msdn.microsoft.com/en-us/library/aa384187(v=vs.85).aspx
Instead of running
'c:\windows\system32\sysprep\sysprep.exe /oobe /shutdown'
we should be running 'c:\windows\sysnative\sysprep\sysprep.exe /oobe /shutdown'.
When we are running C:\Windows\Sysnative then C:\Windows\System32 path is actually being used. The 'Sysnative' folder allows accessing 64-bit tools with the usage of 32-bit code.
Step by Step:
1. In the console navigate to Tools - Provisioning - OS Provisioning.
2. Create the desired template and add 'Execute File' action.
3. Target path and file name should point to 'c:\windows\sysnative\sysprep\sysprep.exe'.
4. Command line parameters '/oobe /shutdown'.