Click here to Skip to main content
15,906,333 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Win10 Strikes again: More Bad (new) UI/UX Pin
Roland M Smith15-Oct-18 8:20
Roland M Smith15-Oct-18 8:20 
GeneralRe: Win10 Strikes again: More Bad (new) UI/UX Pin
Jörgen Andersson15-Oct-18 9:02
professionalJörgen Andersson15-Oct-18 9:02 
GeneralRe: Win10 Strikes again: More Bad (new) UI/UX Pin
raddevus15-Oct-18 9:13
mvaraddevus15-Oct-18 9:13 
GeneralRe: Win10 Strikes again: More Bad (new) UI/UX Pin
S Douglas16-Oct-18 7:51
professionalS Douglas16-Oct-18 7:51 
GeneralRe: Win10 Strikes again: More Bad (new) UI/UX Pin
raddevus16-Oct-18 8:36
mvaraddevus16-Oct-18 8:36 
GeneralRe: Win10 Strikes again: More Bad (new) UI/UX Pin
Lutosław15-Oct-18 11:48
Lutosław15-Oct-18 11:48 
GeneralRe: Win10 Strikes again: More Bad (new) UI/UX Pin
raddevus16-Oct-18 2:05
mvaraddevus16-Oct-18 2:05 
GeneralRe: Win10 Strikes again: More Bad (new) UI/UX Pin
dandy7216-Oct-18 4:02
dandy7216-Oct-18 4:02 
Jacek Gajek wrote:
A friend or whoever comes to a visit
- Hey, what's a pass to WI-FI?
- Give me a second, I will check in the settings... uhm, oh... uhuh.... aaah...


I've solved that problem with a PowerShell script. Sorry about the formatting - it insists on pasting it that way.
$output = netsh wlan show profiles
$profiles = @()

foreach ( $line in $output )
{
    $index = $line.LastIndexOf( ": " )
    if ( $index -eq -1 ) { continue }
    $afterColon = $line.Substring( $index + 2 )
    if ( $afterColon.Trim() -ne "" ) { $profiles += $afterColon }
}

$profilesWithPasswords = @()
foreach ( $profile in $profiles | Sort-Object )
{
    $output = netsh wlan show profiles "$profile" key=clear
    $pwd = ""
    $authentication = ""

<pre>
foreach ( $line in $output )
{
    $index = $line.LastIndexOf( "Authentication" )
    if ( $index -ne -1 )
    {
        $index = $line.LastIndexOf( ": " )
        if ( $index -eq -1 ) { $authentication = "<unknown>" }
        else { $authentication = $line.Substring( $index + 2 ) }
        continue
    }

    $index = $line.LastIndexOf( "Key Content" )
    if ( $index -ne -1 )
    {
        $index = $line.LastIndexOf( ": " )
        if ( $index -eq -1 ) { continue }

        $pwd = $line.Substring( $index + 2 ).Trim()
        continue
    }
}
if ( $pwd -eq "" )

{
if ( $authentication -ne "Open" ) { $pwd = "<unknown>" }
#else { $pwd = "<unknown>" }
}
$profilesWithPasswords += New-Object -TypeName PSObject -Prop ( @{ 'Profile'=$profile; 'Password'=$pwd } )
}
Write-Host "Found $($profilesWithPasswords.Count) wifi profiles:"
$profilesWithPasswords | Format-Table Profile, Password
GeneralRe: Win10 Strikes again: More Bad (new) UI/UX Pin
Lutosław16-Oct-18 5:31
Lutosław16-Oct-18 5:31 
GeneralRe: Win10 Strikes again: More Bad (new) UI/UX Pin
dandy7216-Oct-18 6:58
dandy7216-Oct-18 6:58 
GeneralRe: Win10 Strikes again: More Bad (new) UI/UX Pin
S Douglas16-Oct-18 7:57
professionalS Douglas16-Oct-18 7:57 
GeneralRe: Win10 Strikes again: More Bad (new) UI/UX Pin
Nathan Minier16-Oct-18 1:16
professionalNathan Minier16-Oct-18 1:16 
GeneralRe: Win10 Strikes again: More Bad (new) UI/UX Pin
raddevus16-Oct-18 2:10
mvaraddevus16-Oct-18 2:10 
GeneralBad .env hurts for the rest of life Pin
Lutosław15-Oct-18 3:33
Lutosław15-Oct-18 3:33 
GeneralRe: Bad .env hurts for the rest of life Pin
User 991608015-Oct-18 4:28
professionalUser 991608015-Oct-18 4:28 
GeneralRe: Bad .env hurts for the rest of life Pin
Jacquers15-Oct-18 4:49
Jacquers15-Oct-18 4:49 
GeneralRe: Bad .env hurts for the rest of life Pin
Foothill15-Oct-18 5:31
professionalFoothill15-Oct-18 5:31 
QuestionRe: Bad .env hurts for the rest of life Pin
kmoorevs15-Oct-18 5:31
kmoorevs15-Oct-18 5:31 
AnswerRe: Bad .env hurts for the rest of life Pin
Ryan Peden15-Oct-18 7:37
professionalRyan Peden15-Oct-18 7:37 
AnswerRe: Bad .env hurts for the rest of life Pin
Lutosław15-Oct-18 11:32
Lutosław15-Oct-18 11:32 
GeneralRe: Bad .env hurts for the rest of life Pin
kmoorevs16-Oct-18 3:01
kmoorevs16-Oct-18 3:01 
GeneralRe: Bad .env hurts for the rest of life Pin
dandy7215-Oct-18 6:58
dandy7215-Oct-18 6:58 
GeneralRe: Bad .env hurts for the rest of life Pin
Rage16-Oct-18 0:17
professionalRage16-Oct-18 0:17 
GeneralRe: Bad .env hurts for the rest of life Pin
Lutosław16-Oct-18 5:16
Lutosław16-Oct-18 5:16 
GeneralLinux Weekend - After Action Report Pin
#realJSOP15-Oct-18 2:41
professional#realJSOP15-Oct-18 2:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.