Licensing: Calculation of the relevant AD accounts

Use the following script to correctly read out the relevant user accounts (registered within the last 90 days):

(Get-ADUser -Filter *).Count - (Get-ADUser -Filter * -Properties LastLogonTimeStamp | select @{Name="LastLogonTimeStamp";Expression={([datetime]::FromFileTime($_.LastLogonTimeStamp))}} | where {$_.LastLogonTimeStamp -lt (Get-Date).AddDays(-90)}).Count

Permanent link to this post: https://help.migraven.com/berechnung-der-relevanten-ad-konten-in-migraven-24-7/