Last active
November 22, 2016 14:52
-
-
Save lantrix/ce9fb9f00675a01ecc15 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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