Set Static IP Address using PowerShell
First, check Network Interface
Get-NetIPInterface -AddressFamily IPv4
Set-NetIPInterface -InterfaceIndex 12 -Dhcp Disabled
Static IP Assign
New-NetIPAddress -InterfaceIndex 12 -AddressFamily IPv4
-IPAddress "10.0.2.10"
-PrefixLength 24
-DefaultGateway "10.0.2.1"
Set DNS Address
Set-DnsClientServerAddress -InterfaceIndex 12 -ServerAddresses "10.0.2.10"
-PassThru
Check IP Address
Ipconfig /all
No comments:
Post a Comment