Training
Learning path
Administer remote computers by using Windows PowerShell - Training
Administer remote computers by using Windows PowerShell
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Path
specifies the path and the name of the command to run. RunSynchronous commands run in the user context in the auditUser configuration pass and in the system context in the specialize configuration pass.
Warning Do not add commands that shut down or reboot the computer; instead, use the setting: Microsoft-Windows-Deployment\RunSynchronous\RunSynchronousCommand\WillReboot.
Path |
Specifies the path and the file name of the command to run synchronously. The path can be a local path or a UNC path. If the path is a UNC path, the Credentials must be specified. Path is a string with a maximum length of 259 characters. |
This string type does not support empty elements. Do not create an empty value for this setting.
auditUser
specialize
Microsoft-Windows-Deployment | RunSynchronous | RunSynchronousCommand | Path
For a list of the Windows editions and architectures that this component supports, see Microsoft-Windows-Deployment.
The following XML output shows how to set synchronous commands.
The first command runs an application on the local hard drive. The command includes the environment variable %ProgramFiles%. The second command runs a command from the network.
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Description>Command1-Local</Description>
<Order>1</Order>
<Path>%ProgramFiles%\FabriKam\FabriKam First Run Application.exe</Path>
<WillReboot>OnRequest</WillReboot>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Credentials>
<Domain>MyDomain</Domain>
<Password>MyPassword</Password>
<Username>MyUsername</Username>
</Credentials>
<Description>Command2-Network</Description>
<Order>2</Order>
<Path>\\network\server\share\filename</Path>
<WillReboot>OnRequest</WillReboot>
</RunSynchronousCommand>
</RunSynchronous>
Training
Learning path
Administer remote computers by using Windows PowerShell - Training
Administer remote computers by using Windows PowerShell
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in