Skip to content

Instantly share code, notes, and snippets.

@lantrix
Last active November 22, 2016 14:52
Show Gist options
  • Save lantrix/ce9fb9f00675a01ecc15 to your computer and use it in GitHub Desktop.
Save lantrix/ce9fb9f00675a01ecc15 to your computer and use it in GitHub Desktop.
#Configure NIC as Env has no DHCP
$netadapter = Get-NetAdapter -Name Ethernet
## Disable DHCP
$netadapter | Set-NetIPInterface -DHCP Disabled
## Configure the IP address and default gateway for "VM Network" in Env
$netadapter | New-NetIPAddress -AddressFamily IPv4 -IPAddress 10.1.0.250 -PrefixLength 24 -Type Unicast -DefaultGateway 10.1.0.254
## Configure the DNS servers
Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses ("172.1.0.2","172.1.0.3”)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment