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