Answer the question
In order to leave comments, you need to log in
Disable the mailbox for users who are in a specific OU by the LastLogonTime parameter?
Actually, this request does not work
Get-Mailbox -OrganizationalUnit "OU=users,DC=company,DC=ru" | GetMailboxStatistics | where {$_.LastLogonTime -lt (get-date).addDays(-90)} | Disable-Mailbox
What else could be an option?
Answer the question
In order to leave comments, you need to log in
Hello, the request itself works, but apparently, the logic messes up))
in the ekschencha, daily database maintenance climbs through the boxes under NT AUTHORITY\SYSTEM
and the backup also climbs according to its account.
all this is written in lastlogon, can it stupidly not find the account for the requirement?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question