Advertisement
Guest User

Untitled

a guest
Oct 10th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $domain = "{{ join_domain }}"
  2. $username = "{{ domain_user }}"
  3. $password = "{{ domain_password }}" | ConvertTo-SecureString -asPlainText -Force
  4. $cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $password
  5. Add-Computer -DomainName $domain -Credential $cred -force
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement