Skip to content

Instantly share code, notes, and snippets.

@Akasurde
Created October 13, 2020 10:29
Show Gist options
  • Save Akasurde/cc59416cd7a9d888152ff448610c7d42 to your computer and use it in GitHub Desktop.
Save Akasurde/cc59416cd7a9d888152ff448610c7d42 to your computer and use it in GitHub Desktop.
First Logon commands in Autounattended.xml
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<Order>1</Order>
<CommandLine>powershell -ExecutionPolicy ByPass Invoke-Expression (Invoke-WebRequest -Uri http://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1)</CommandLine>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>2</Order>
<CommandLine>powerShell "Invoke-WebRequest -Uri http://packages.vmware.com/tools/esx/6.7u2/windows/x64/VMware-tools-10.3.5-10430147-x86_64.exe -OutFile C:\Windows\temp\VMware-tools-10.3.5-10430147-x86_64.exe"</CommandLine>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>3</Order>
<CommandLine>C:\Windows\temp\VMware-tools-10.3.5-10430147-x86_64.exe /S /v"/qn REBOOT=R"</CommandLine>
</SynchronousCommand>
</FirstLogonCommands>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment