Custopootimus

domain join test

Aug 20th, 2014
584
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Invoke-Command `
  2.     -ComputerName $computer_name_old `
  3.     -Credential $local_credential `
  4.     -ScriptBlock {Set-DnsClientServerAddress -InterfaceAlias "Local Area Connection" -ServerAddresses "131.128.197.291","131.128.1.126","131.128.1.127"}
  5.  
  6. Add-Computer `
  7.     -DomainName $domain `
  8.     -Credential $domain_credential `
  9.     -ComputerName $computer_name_old `
  10.     -LocalCredential $local_credential `
  11.     -NewName $computer_name_new `
  12.     -OUPath "OU=$lab_name,OU=labs,DC=library,DC=uri,DC=edu" `
  13.     -Restart
Advertisement
Add Comment
Please, Sign In to add comment