Skip to content

Instantly share code, notes, and snippets.

@roccoren
Last active December 24, 2015 19:39
Show Gist options
  • Save roccoren/6852046 to your computer and use it in GitHub Desktop.
Save roccoren/6852046 to your computer and use it in GitHub Desktop.
Change IP and Add to Domain
$wmi = Get-WmiObject win32_networkadapterconfiguration -filter "ipenabled = 'true'"
$wmi.SetDNSServerSearchOrder("10.10.0.3")
$computerName = Get-WmiObject Win32_ComputerSystem
$name = "TFSSQL"
$computername.Rename($name)
Add-Computer -Domain "pec.com" -Credential PEC\RoccoRen
Restart-Computer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment