1 Powershell
Caffeine Fueled edited this page 2025-10-01 18:57:17 +00:00

Simple Intune Test Script

$hostname = $env:COMPUTERNAME
$status = "OK"
$body = "$hostname,$status"
 
$headers = @{
    "Authorization" = "Bearer 9d207bf0-10f5-4d8f-a479-22ff5aeff8d1"
}
 
$domain = "http://example.com:8000/api/test1/"
 
Invoke-RestMethod -Uri $domain -Method Post -Body $body -Headers $headers