Skip to content

Instantly share code, notes, and snippets.

View Cloud-with-lois's full-sized avatar

Loise kamau Cloud-with-lois

View GitHub Profile
@Cloud-with-lois
Cloud-with-lois / powershell script to migrate users from one SSID to another via GPO.txt
Created November 4, 2025 14:14
powershell script to migrate users from one SSID to another via GPO
# ==============================
# Wi-Fi Profile Deployment Script
# Target OU: Example-OU in CONTOSO.LOCAL
# Runs under LocalSystem via GPO Startup
# ==============================
$SSID = "Example_SSID"
$LocalXml = "C:\Temp\WiFiProfile.xml"
# Embed the Wi-Fi profile XML
@Cloud-with-lois
Cloud-with-lois / script to migrate users from one SSID to another.txt
Last active November 4, 2025 14:11
migrate users from one SSID to another via the domain
Import-Module ActiveDirectory
$OU = "OU=Test-OU,DC=DOMAIN"
$Computers = Get-ADComputer -SearchBase $OU -Filter 'enabled -eq $true' |
Select-Object -ExpandProperty Name
$SSID = "Wifi_Name"
$LocalXml = "C:\Temp\Wifi_Name.xml"
# Embed the XML profile as a string
$XmlContent = @"