File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
EntraID/ConditionalAccess Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -236,22 +236,24 @@ if (-not $IncludeEmptyColumns) {
236236$ProcessedCount = 0
237237$OutputCount = 0
238238# Get all service principals
239- Write-Progress - Activity " `n Retrieving service principals..."
239+ Write-Host " [+] Retrieving service principals..."
240240$ServicePrincipalsHash = Get-MgBetaServicePrincipal - All | Group-Object - Property AppId - AsHashTable
241- Write-Progress - Activity " `n Retrieving named location ..."
241+ Write-Host " [+] Retrieving named locations ..."
242242$NamedLocationHash = Get-MgBetaIdentityConditionalAccessNamedLocation - All | Group-Object - Property Id - AsHashTable
243243Write-Host " Exporting CA policies report..." - ForegroundColor Cyan
244244
245245
246- # Processing all CA polcies
247- Get-MgBetaIdentityConditionalAccessPolicy - All | ForEach-Object {
246+ # Processing all CA policies
247+ $AllPolicies = Get-MgBetaIdentityConditionalAccessPolicy - All
248+ $total = $AllPolicies.Count
249+ $AllPolicies | ForEach-Object {
248250 $ProcessedCount ++
249251 $CAName = $_.DisplayName
250252 $Description = $_.Description
251253 $CreationTime = $_.CreatedDateTime
252254 $LastModifiedTime = $_.ModifiedDateTime
253255 $State = $_.State
254- Write-Progress - Activity " `n Processed CA policies count : $ProcessedCount " `n " Currently Processing: $CAName "
256+ Write-Progress - Activity " Exporting Conditional Access Policies " - Status " Processing : $CAName " - PercentComplete (( $ProcessedCount / $total ) * 100 )
255257
256258 # Filter CA policies based on their State
257259 if ($ActiveCAPoliciesOnly.IsPresent -and $State -ne " Enabled" ) {
You can’t perform that action at this time.
0 commit comments