I have a few scripts that configure shell provide the computer used in a training class. Some classes need to connect to another wireless network (SSID). I can only wonder how users use Windows XP installations to the network they are connected to change, but I would be able to deploy the network selection for my power shell script. Any idea how to change wireless network in PowerShell?
Changing wireless network in Power Shell
HELLO
Â
Here, I am going to explain to you that how to change the wireless network from power shell to others.
Before that you need to get adapter hardware information. This is really useful you need to know about the PCIÂ slot.
If you want to enable or disable the network adapter, Here is the following power shell:-
Â
1.PowerShell
Â
1 Enable-NetAdapter -Name "Wireless Network Connection"Â
2 Disable-NetAdapter -Name "Wireless Network Connection"Â
Â
Now i will show you that how to rename of the network adapter
This is the following syntax:
1 Â Rename-NetAdapter -Name "Wireless Network Connection" -NewName "Wireless"
Â
Now we can get IPÂ and domain name server address information
Syntax:
1. Get-NetAdapter -Name "Local Area Connection" | Get-NetIPAddress
Now you should get IPÂ address
Syntax:
1 (Get-NetAdapter -Name "Local Area Connection" | Get-NetIPAddress).IPv4Address
now you should get DNS(domain name server) address information
Syntax:
1. Get-NetAdapter -Name "Local Area Connection" | Get-DnsClientServerAddress
Now i will explain you that how to set the new IP address
Syntax:
 New-NetIPAddress -InterfaceAlias "Wireless" -IPv4Address 10.0.1.95 -PrefixLength "24" -DefaultGateway 10.0.1.1Â
orÂ
If you need to change the used IP addressÂ
1. Set-NetIPAddress -InterfaceAlias "Wireless" -IPv4Address 192.168.12.25 -PrefixLength "24"
Now i will explain you that remove the IP addressÂ
Syntax:
1. Get-NetAdapter -Name "Wireless" | Remove-NetIPAddress
Windows PowerShell
Â
You will be Get-NetAdapter
It is the name of the local area connection :-Rename-NetAdapter -Name "Local Area Connection" -NewName "Management"
New-NetIPAddress -InterfaceAlias "Management" -IPv4Address 192.168.10.101 -PrefixLength "24" -DefaultGateway 192.168.10.1