How To Reset A Wireless Network Adapter?

Line Break

Author: Frank Peter (121 Articles)

I switch between wireless networks frequently. Usually I am facing issues with getting connected which get resolved by clicking around in Vista’s Network and Sharing Center. As this takes always a couple of minutes I want a PowerShell script that I can use to reset my wireless lan adapter directly.

This can be accomplished using WMI:

# NAME
#     Reset-Wlan.ps1
#
# SYNOPSIS
#     Disables, pauses, and then enables the wlan adapter
#
# SYNTAX
#     .\Reset-Wlan.ps1
#
# REMARKS
#     Run this script elevated
#
# AUTHOR
#     Frank-Peter Schultze www.fpschultze.de
#
# DATE
#     15-Mar-2009
#
$wlan = Get-WmiObject -Class Win32_NetworkAdapter -Filter "Name LIKE '%wireless%'"
$wlan.Disable()
# Maybe waste of time. Never mind!
Start-Sleep -Seconds 10
$wlan.Enable()

Leave a Reply

Your email address will not be published. Required fields are marked *


*