Skip to content

Instantly share code, notes, and snippets.

@HawaiiRyan
Created March 3, 2020 01:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HawaiiRyan/98c00ce7b62a2db6719e073eaac37650 to your computer and use it in GitHub Desktop.
Save HawaiiRyan/98c00ce7b62a2db6719e073eaac37650 to your computer and use it in GitHub Desktop.
#Workspace ONE UEM Environment Address / Authentication
$addy = "https://ws1.molokaibank.com"
$b64 = Get-Content -Path "c:\creds\b64.txt"
$apiKey = "apikey"
$b64EncodedAuth = "$b64"
#Header
$content = "application/json"
$authHeader = "Basic " + $b64EncodedAuth
$header = @{"Authorization" = $authHeader; "aw-tenant-code" = $apiKey; "Accept" = $content; "Content-Type" = $content}
#Get Devices from Workspace ONE API
$getDevices = Invoke-RestMethod -Uri "$addy/API/mdm/devices/search?platform=Android" -Headers $headers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment