Exactly as is says:
Saturday, 21 June 2014
Friday, 20 June 2014
Adding VDI to specific OU using SetupComplete.cmd
Adding VDIs to specific OUs can be accomplished by running a batch file which invokes a powershell script to do so. Create a file c:\windows\Setup\Scripts\SetupComplete.cmd and put in the content below.
***********SetupComplete.cmd*************
powershell Set-ExecutionPolicy bypass
powershell C:\Windows\Temp\JoinDomain.ps1
del C:\Windows\Temp\JoinDomain.ps1
timeout 30
shutdown -t 0 -r -f
Create another file C:\Temp\JoinDomain.ps1 with the below content:
$credential = New-Object System.Management.Automation.PsCredential -ArgumentList@ ("domainname\domainaccount", (ConvertTo-SecureString "password" -AsPlainText -Force))
Add-Computer -DomainName "you.domain.com" -Credential $credential -OUPath ("OU=Your,OU=OU,OU=path,DC=at,DC=your,DC=domain")
the Account used needs to have sufficient priviliges to add computers to domain.
***********SetupComplete.cmd*************
powershell Set-ExecutionPolicy bypass
powershell C:\Windows\Temp\JoinDomain.ps1
del C:\Windows\Temp\JoinDomain.ps1
timeout 30
shutdown -t 0 -r -f
Create another file C:\Temp\JoinDomain.ps1 with the below content:
$credential = New-Object System.Management.Automation.PsCredential -ArgumentList
Add-Computer -DomainName "you.domain.com" -Credential $credential -OUPath ("OU=Your,OU=OU,OU=path,DC=at,DC=your,DC=domain")
the Account used needs to have sufficient priviliges to add computers to domain.
Subscribe to:
Posts (Atom)
Detect autopilot session
Ensuring that some apps only install during autopilot is not easily accomplished, you can use the below powershell script as a requiremen...
-
Ensuring that some apps only install during autopilot is not easily accomplished, you can use the below powershell script as a requiremen...
-
Someone got this issue while trying to run a scottrade.com applet. To fix this 1: open java webstart by typing javaws -viewer,in a c...
-
So i was recently tasked with removing wireless restrictions from a VP's windows 7 laptop that some infrastructure company had plac...