PS: Set IP and DNS

$wmi = Get-WMIObject Win32_NetworkAdapterConfiguration
Foreach($wmis in $wmi) {
$wmis.EnableStatic(“10.0.0.15”, “255.255.255.0”)
$wmis.SetGateways(“10.0.0.1”, 1)
$wmis.DNSServerSearchOrder
$DNSServers = “198.168.10.14″,”198.168.10.15″
$wmis.SetDNSServerSearchOrder($DNSServers)
$wmis.SetDynamicDNSRegistration(“TRUE”)

}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s