a guest Oct 23rd, 2017 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- $domain = "test.com"
- $password = "Mypass" | ConvertTo-SecureString -asPlainText -Force
- $username = "$domain\administrator"
- $credential = New-Object System.Management.Automation.PSCredential($username,$password)
- add-computer -Credential $credential -DomainName $domain -OUPath $ouPath -restart -force
RAW Paste Data