Looking to retrieve a value based on whether a WifiProfile was successfully removed or their was an error. For instance if the Profile did not exist I want to have it return an error. I'm not seeing any way in the documentation to access this information currently.
Example would be:
try { Remove-WifiProfile -ProfileName $WifiProfile } catch { Write-Host ("Profile does not exist. Please enter Wifi Profile again.") $WifiProfile = Read-Host ("Wifi Profile") }