name change

main
cole@cybertek.systems 2024-12-25 09:46:50 -06:00
parent 780852e7b2
commit 00ec0cfd54
2 changed files with 6 additions and 2 deletions

View File

@ -23,10 +23,14 @@ foreach ($profile in $wifiProfiles) {
# Send data to the API
try {
$response = Invoke-WebRequest -Uri $apiEndpoint -Method Post -Body ($payload | ConvertTo-Json -Depth 10) -Headers $headers
$response = Invoke-WebRequest -Uri $apiEndpoint -Method Post -Body ($payload | ConvertTo-Json -Depth 10) -Headers $headers -UseBasicParsing
Write-Output "Success: SSID '$profile' added. Message: $($response.Content)"
} catch {
if ($_.Exception.Response.StatusCode -eq 409) {
Write-Output "Conflict: SSID '$profile' already exists or conflicts with server rules."
} else {
Write-Output "Error: Could not add SSID '$profile'. Error: $($_.Exception.Message)"
}
}
}
}