PowerShell로 IP Address 설정하기


1) 현재 설정 확인하기
Get-NetIPConfiguration
**InterfaceIndex 확인할 것

Get-NetIPAddress
Get-NetAdapter

2) DHCP Server로부터 IP 받기
Set-NetIPInterface -InterfaceIndex 4 -Dhcp Enabled
Get-NetIPAddress

3) 수동으로 IP 설정하기
New-NetIPAddress -InterfaceIndex 4 -IPAddress 10.0.2.23 -PrefixLength 24 -DefaultGateway 10.0.2.1

4) DNS Server 설정하기
Set-DnsClientServerAddress -InterfaceIndex 4 -ServerAddresses “10.0.2.23 , 8.8.8.8”

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 )

Connecting to %s