I am looking for a sample script to Enable some disabled accounts and also
unhide them from the GAL. These users are in the one OU.
Once enabled I will do a mailbox move and then do the reverse of above -
i.e. disabled and hide from the GAL.
Any sample scripts would be appreciated.
Thanks, Peter
What Exchange version?
---
Shay Levy
Windows PowerShell MVP
http://blogs.microsoft.co.il/blogs/ScriptFanatic
DP> Hi,
DP>
DP> I am looking for a sample script to Enable some disabled accounts
DP> and also unhide them from the GAL. These users are in the one OU.
DP>
DP> Once enabled I will do a mailbox move and then do the reverse of
DP> above - i.e. disabled and hide from the GAL.
DP>
DP> Any sample scripts would be appreciated.
DP>
DP> Thanks, Peter
DP>
They are Exchange 2003 mailboxes. It was quite easy in the end though. I
messed around and came up with this...
I created an OU under Department Offices called Enabled Temp. I moved the
accounts I wanted to enable there.
Then I ran this Powershell command.
Get-mailbox –OrganizationalUnit ‘MyDomain.Com/Department Offices/Enabled
Temp’ | set-mailbox –HiddenFromAddressListsEnabled $false
I will run the same Powershell command with $true when I want them rehidden.
Hope this is useful to someone else and thanks anyway Shay.