V
V
Vladislav2015-03-27 09:16:48
Microsoft Exchange
Vladislav, 2015-03-27 09:16:48

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

1 answer(s)
O
oleg8, 2015-04-08
@oleg8

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 question

Ask a Question

731 491 924 answers to any question