Quantcast
Channel: Setup Deployment forum
Viewing all articles
Browse latest Browse all 2818

WDS - Automated deployment issues RunSynchronousCommand

$
0
0

Hello,

I seem to be unable to get this to work. In the WDS Server unattend file (WDSClientUnattend.xml) file, no matter the values I cannot get it to run the script.

Here is what I am working with

Server 2016 Image with script file added locally using DISM

Script file added to the WDS REMINST share for access on the network

Powershell script that calls VMWare guestinfo variable and places into a variable to be used later

In the WDSClientUnattend.xml file in Pass 4 is amd64_Mimcrosoft-Windows-Deployment_neutral / RunSynchronous / RunSynchronousCommand. Below is the info from XML regarding this:

<RunSynchronous>

 - <RunSynchronousCommand wcm:action="add">

     <Description>Post install script</Description>

     <order>1</order>

     <Path>c:\scripts\post-inst.cmd</path>

     <WillReboot>OnRequest</WillReboot>

 </RunSynchronousCommand>

<RunSynchronous>

I have tried calling the powershell script directly in the path instead as 

<path>powershell.exe -executionpolicy bypass -file c:\scripts\post-inst.ps1</path>

I have also tried calling this script remotely using -file \\servername\reminst\scripts\post-inst.ps1 and then specifying the credentials. This also doesnt work however it returns an error about not seeing the file in the powershell window. 

I attempted to run the script from its remote location manually and reproduced the error - it was not passing the credentials or was not using them. Authenticating to the server first allowed it to run. The local script not running I am at a loss.

I went ahead and added the pass 4 command to the imageunattend.xml file but this made no difference. 

Using the SetupComplete.cmd file in the Windows\Setup\Scripts folder does work but I would like this script to live remotely if possible. So the intended end result is the Answer file (unattended xml) to handle running the script and to run the script from a remote server. 

Any pointers or possible ways to log this would be appreciated. Am I am possibly entering the command incorrectly into WDS?



Viewing all articles
Browse latest Browse all 2818

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>