Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $domain = "OpMeis.local"
- $password = "Password1" | ConvertTo-SecureString -asPlainText -Force
- $username = "$domain\administrator"
- $credential = New-Object System.Management.Automation.PSCredential($username,$password)
- $ouPath="OU=Datamaskiner,OU=Bedrift,DC=OpMeis,DC=local"
- add-computer -Credential $credential -DomainName $domain -OUPath $ouPath -restart -force
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement