Created
March 3, 2020 01:27
-
-
Save HawaiiRyan/98c00ce7b62a2db6719e073eaac37650 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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