Home > PowerShell > Using PowerShell to display wireless SSID and password

Using PowerShell to display wireless SSID and password

Being in the Information Technology field, I often turn into everyone’s “computer guy”. If you work in IT, you know exactly what I am talking about. I recently have been asked a few times about what password was configured on someone’s personal wireless connection. Sometimes people bring in their other “computer guys” or companies that may get the laptop connected to WiFi and not share the password with them but write it down and put it somewhere. Often the average user is not savvy enough to just hop on their web browser, go to the router URL (remembering that username and password as well), and dig around there to find it. Since PowerShell can do pretty much anything and everything in the Windows world, I have been using this to help assist those in need.

Open a PowerShell window by clicking Start or pressing the Start key on the keyboard and typing PowerShell.

Once the PowerShell windows is open, run this command:

[string](netsh wlan show profiles name=([string](netsh wlan show interface | sls “\sSSID”) | sls “\:.+”| %{$_.Matches} | %{$ssid = $_.Value -replace “\:\s+”; $ssid}) key=clear | sls “Key Content”) | sls “\:.+”| %{$_.Matches} | %{$pass= $_.Value -replace “\:\s”}; Write-Host “SSID:`t”$ssid”`nPass:`t”$pass;

This will display the current SSID and password that is used on the Wireless connection.

Enjoy!

Advertisements
Categories: PowerShell
  1. No comments yet.
  1. No trackbacks yet.

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 )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: