Private/Get-NSPEntraHardMatchQueueBlock.ps1
|
function Get-NSPEntraHardMatchQueueBlock { <# .SYNOPSIS The reasons a whole queue cannot be written, or nothing. #> [CmdletBinding()] [OutputType([string[]])] param( [Parameter(Mandatory)]$Queue, [Parameter(Mandatory)][int]$MaxRevalidationAgeMinutes ) if ($Queue.needsRevalidation -or -not $Queue.revalidatedAtUtc) { 'The queue has not been revalidated. Run Sync-NSPEntraPairingQueue against a fresh inventory.' } else { $age = ([datetime]::UtcNow - (ConvertTo-NSPEntraPairingUtcTime $Queue.revalidatedAtUtc)).TotalMinutes if ($age -gt $MaxRevalidationAgeMinutes) { "The queue was revalidated $([int]$age) minutes ago, over the limit of $MaxRevalidationAgeMinutes. Run Sync-NSPEntraPairingQueue again." } } if ($Queue.sourceAnchor.status -ne 'verified' -or $Queue.sourceAnchor.strategy -notin @('ObjectGuid', 'ConsistencyGuid', 'ConsistencyGuidWithObjectGuidFallback')) { 'The source anchor is not Verified.' } } |