GurmanMarketing

GurmanMarketing

šŸ“± Digital Marketing Queries, Connect on whatsapp
šŸ‡®šŸ‡³ India | šŸ‡©šŸ‡Ŗ Germany

My Digital Marketing Services

šŸ“¶ Wi-Fi Password Backup
Wi-Fi Password Backup

Wi-Fi Password Backup

Custom, hand-coded web design solutions for responsive and user-friendly websites, avoiding drag-and-drop builders.

šŸ“Œ Wi-Fi Password Backup

šŸ‘‡ Follow these steps to run the script in PowerShell:

  1. Open PowerShell as Administrator.
  2. Copy the entire script below.
  3. Paste it into the PowerShell window.
  4. Press Enter to execute and generate a detailed Wi-Fi report.
# Get all saved Wi-Fi profiles
$profiles = netsh wlan show profiles | Select-String "All User Profile" | ForEach-Object {
    ($_ -split ":")[1].Trim()
}

# Get currently connected profile
$lastConnected = (netsh wlan show interfaces) -match "^\s*SSID\s*:\s*(.+)$" | ForEach-Object {
    ($_ -replace "^\s*SSID\s*:\s*", "").Trim()
} | Select-Object -First 1

# Prepare Wi-Fi data
$wifiData = @()
foreach ($profile in $profiles) {
    $profileData = netsh wlan show profile name="$profile" key=clear
    $keyInfo = $profileData | Select-String "Key Content"
    $authInfo = $profileData | Select-String "Authentication"

    $password = if ($keyInfo) { ($keyInfo -split ":")[1].Trim() } else { "[Open Network]" }
    $isSecure = if ($authInfo -match "Open") { $false } else { $true }

    $wifiData += [PSCustomObject]@{
        Profile         = $profile
        Password        = $password
        IsSecure        = $isSecure
        IsLastConnected = ($profile -eq $lastConnected)
    }
}

# Generate HTML table rows and text for WhatsApp message
$tableRows = ""
$whatsappText = "šŸ“¶ Saved Wi-Fi Profiles:%0A%0A"

foreach ($wifi in $wifiData) {
    $rowClass = if ($wifi.IsLastConnected) { "highlight" } else { "" }
    $status = if ($wifi.IsLastConnected) {
        "āœ”ļø Connected"
    } elseif ($wifi.IsSecure) {
        "šŸ” Secured"
    } else {
        "šŸ”“ Open"
    }

    $tableRows += "$($wifi.Profile)$($wifi.Password)$status`n"
    $whatsappText += "šŸ”ø $($wifi.Profile): $($wifi.Password) [$status]%0A"
}

# Encode for WhatsApp
Add-Type -AssemblyName System.Web
$encodedMessage = [System.Web.HttpUtility]::UrlEncode($whatsappText)

# Generate HTML
$html = @"



Saved Wi-Fi Profiles




Saved Wi-Fi Profiles

$tableRows
Wi-Fi NamePasswordStatus

šŸ“¤ Share on WhatsApp

Script created by Gurman Preet Singh (015563212913)

"@ # Save to Desktop $desktopPath = [Environment]::GetFolderPath(\"Desktop\") $filePath = Join-Path $desktopPath \"WiFi_Profiles_Report.html\" $html | Out-File -FilePath $filePath -Encoding UTF8 Write-Host \"`nāœ… File generated at: $filePath\"
SEO Optimization

SEO Optimization (On-Page & Off-Page)

Enhance visibility and rankings with effective on-page and off-page SEO strategies, including content optimization and backlinks.

Content Writing

Content Writing

High-quality, SEO-optimized content designed to engage your target audience and improve your online presence.

Social Media Organic Growth

Social Media Organic Growth

Increase brand presence with organic social media strategies, fostering authentic connections and engagement without paid ads.

Website Modification

Website Modification

Update and improve your website with fresh designs, new features, and enhanced functionality to meet current trends.

Pizza

Projects

Online Pizza delivery System with COD

Scroll to Top