Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Other/Reports/Get-PMPCFoundApps.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ Function Request-Report {
try {
Write-Host ("Requesting the report for {0}..." -f $reportName) -ForegroundColor Cyan
$response = Invoke-MgGraphRequest -Uri $reportEndpoint -Method Post -Body $body -ContentType "application/json"
Write-Verbose ("Graph POST response: {0}" -f ($response | ConvertTo-Json -Depth 5))
}
catch {
Write-Error ("Failed to post the report {0}. Error: {1}" -f $reportName, $_)
Expand All @@ -301,6 +302,7 @@ Function Request-Report {
while ($reportStatus -ne "completed") {
try {
$jobStatusResponse = Invoke-MgGraphRequest -Uri $pollingEndpoint -Method Get
Write-Verbose ("Graph GET poll response: {0}" -f ($jobStatusResponse | ConvertTo-Json -Depth 5))
$reportStatus = $jobStatusResponse.status

# Display the elapsed time, overwriting the same line
Expand Down Expand Up @@ -334,6 +336,7 @@ function Get-IntuneDeviceCount {
# Make the request using Invoke-MgGraphRequest
Write-Host "Retrieving the number of Windows devices enrolled in Intune as this report does not contain device information..." -ForegroundColor Cyan
$response = Invoke-MgGraphRequest -Method Get -Uri $uri
Write-Verbose ("Graph GET device count response: {0}" -f ($response | ConvertTo-Json -Depth 5))

# Extract the count from the response
$windowsDeviceCount = $response.'@odata.count'
Expand Down
Loading