Hi,
We are trying to monitor last dir sync time on AADC Servers for our customers.
We would like to achieve this locally so we dont need to have credentials to use Connect-MsolService.
I had this up and running for a few months:
$connector = get-adsyncConnector | Where-Object {$_.name -like "*onmicrosoft*"} | Select-Object name
$tenant = $connector.Name
$LastSuccessRunTime = Get-CimInstance -ComputerName $env:computername -ClassName MIIS_RunHistory -Namespace "root\MicrosoftIdentityIntegrationServer" -Filter "RunProfile = 'Export' AND MaName = '$Tenant' AND RunStatus = 'success'" | Sort-Object runendtime | Select-Object -Last 1 runendtime
Unfortunately since a few days, i assume after some kind of update we made, i get an error.. i tried to check:
I cant seem to fix this and need your ideas :)
Thanks in advance!
Eve Meier