Skip to content

Commit abf80f4

Browse files
Intune
1 parent c91f25c commit abf80f4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Modules/CIPPCore/Public/Entrypoints/Invoke-ListIntunePolicy.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ Function Invoke-ListIntunePolicy {
5656

5757
$BulkResults = New-GraphBulkRequest -Requests $BulkRequests -tenantid $TenantFilter
5858

59-
$GraphRequest = $BulkResults.body.value | ForEach-Object {
60-
$URLName = (($_).split('?') | Select-Object -First 1) -replace 'https://graph.microsoft.com/beta/deviceManagement/', ''
61-
59+
$GraphRequest = $BulkResults | ForEach-Object {
60+
$URLName = $_.Id
61+
$_.body.Value | ForEach-Object {
6262
$policyTypeName = switch -Wildcard ($_.'[email protected]') {
6363
'*microsoft.graph.windowsIdentityProtectionConfiguration*' { 'Identity Protection' }
6464
'*microsoft.graph.windows10EndpointProtectionConfiguration*' { 'Endpoint Protection' }
@@ -97,7 +97,7 @@ Function Invoke-ListIntunePolicy {
9797
$_ | Add-Member -NotePropertyName PolicyExclude -NotePropertyValue ($PolicyExclude -join ', ')
9898
$_
9999
} | Where-Object { $_.DisplayName -ne $null }
100-
100+
}
101101
}
102102
$StatusCode = [HttpStatusCode]::OK
103103
} catch {

0 commit comments

Comments
 (0)