#Requires -RunAsAdministrator
$Service = Get-Service -Name 'wlansvc'
if($Service.StartType -ne 'Automatic') {
Write-Output "The Wlan AutoConfig service is not set to automatically start. Setting to auto start..."
Set-Service -InputObject $Service -StartupType Automatic
} else {
Write-Output "Wlan AutoConfig is set to start automatically....[GOOD]"
}
if($Service.Status -ne 'Running') {
Write-Output "The Wlan AutoConfig service is not currently running. Starting service..."
Start-Service -InputObject $Service
} else {
Write-Output "The Wlan AutoConfig service appears to be running....[GOOD]"
}