This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ============================== | |
| # 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 = @" |