PowerShell Series – How to set a static IP Address using PowerShell
Hey Guys, In this I am using the Netsh command to change from DHCP/Automatically to Static. Netsh.exe is a tool an administrator can use to configure and monitor Windows-based computers at a command prompt or PowerShell. With the Netsh.exe tool, you can direct the context commands you enter to the appropriate helper, and the helper then carries out the command.
The default connection names are Local Area Connection for wired adapters and Wireless Network Connection for Wi-Fi adapters. The IP address order: client IP, subnet mask, and gateway IP.
As you can see this command is a powerful tool to have in your kit as we continue down this scripting world.
Commands that I used in this video
netsh interface ip set address “Local Area Connection” dhcp
netsh interface ip show config
netsh interface ip set address “Local Area Connection” static
ip address