Changing wireless network in Power Shell

Asked By 0 points N/A Posted on -
qa-featured

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?

SHARE
Answered By 0 points N/A #187809

Changing wireless network in Power Shell

qa-featured
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

Related Questions