-
Notifications
You must be signed in to change notification settings - Fork 6
/
Get-AccStatus.ps1
44 lines (37 loc) · 1.08 KB
/
Get-AccStatus.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<#
.SYNOPSIS
Gets status of ACC for selected Workspace ONE UEM Organization Group
.DESCRIPTION
Gets status of ACC for selected Workspace ONE UEM Organization Group
.INPUTS
AirWatchConfig.json
.OUTPUTS
Outputs a log of ACC Status
.NOTES
Version: 1.0
Author: Joshua Clark @MrTechGadget
Creation Date: 10/14/2023
Update Date: 10/14/2023
Site: https://github.com/MrTechGadget/aw-bulkdevices-script
.EXAMPLE
.\Get-AccStatus.ps1
#>
Import-Module .\PSairwatch.psm1
Write-Log -logstring "$($MyInvocation.Line)"
$Logfile = "$PSScriptRoot\AccStatus.log"
Write-Log -logstring "$($MyInvocation.Line)" -logfile $Logfile
$OrgGroups = Get-OrgGroupUUID
$GroupUuid = Select-Tag $OrgGroups
$endpointURL = "system/groups/" + $GroupUuid[1] + "/cloud-connector/connection-status"
$results = Send-Get -endpoint $endpointURL
$results
try {
if ($results) {
Write-Log -logstring $results -logfile $Logfile
} else {
Write-Log -logstring "No Results" -logfile $Logfile
}
}
catch {
Write-Log -logstring "Error (maybe no results)" -logfile $Logfile
}