Combining PowerShell Commands
Trying to combine several PowerShell commands to set the archive database, retention policy and OWA mailbox policy. Can I use something like this or do I need to separate these commands somehow?
Import-csv E:\users.csv | Foreach {Enable-Mailbox -Identity $_.Logon -ArchiveDatabase $_.ARDB Set-CasMailbox -OwaMailbox Policy $_.OwaPolicy Set-Mailbox -RetentionPolicy $_.RetentionPolicy}
MCITP Exchange 2010 | MCTS Exchange 2007 | MCITP Lync Server 2010 | MCTS Windows 2008 | MCSE 2003
July 15th, 2012 12:05pm
Thanks. We just used separate lines, but I can see using the other ones in the future as we move more mailboxes.MCITP Exchange 2010 | MCTS Exchange 2007 | MCITP Lync Server 2010 | MCTS Windows 2008 | MCSE 2003
Free Windows Admin Tool Kit Click here and download it now
July 16th, 2012 11:28am
Hi Vegas
If the issue is solved, please Mark As Answer and finish this thread
Cheers
Zi Feng
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contacttnmff@microsoft.com.
Zi Feng
TechNet Community Support
July 17th, 2012 10:00pm