Thursday, 3 November 2011

Powershell Script to join domain as elevated user

runas /user:AISCT\administrator "powershell.exe Set-Executionpolicy Unrestricted" runas /user:AISCT\administrator "powershell.exe -noexit Add-Computer -DomainName AISCT -cred AISCT\administrator; restart-computer"

No comments:

Post a Comment