from list
Hello, I put the Users'aliases in a Text file one in each line. I need to use the Get-content c:\TICK.txt and I already have the shell command:Get-Mailbox -ResultSize Unlimited | Where {$_.emailaddresspolicyenabled -like "false"} | Set-MailContact -emailaddresspolicyenabled:$True The thing is that I am not sure how to combine the two command together.Can you please help me? I thought about:Get-Mailbox -ResultSize Unlimited | Where {$_.emailaddresspolicyenabled -like "false"} | Set-MailContact -emailaddresspolicyenabled:$True (Get-Content C:\BlockedList.txt)
December 14th, 2009 12:55pm

Hi, If you have users which are not set with email address policy then Just start one liner with Get-Content <file name> and then pipe to your command. Get-Content c:\tick.txt | Get-Mailbox | Set-Mailbox -emailaddresspolicyenabled:$True No need to use where-object filter as you say that you already have the list of users aliases. (as i recall from previous posts). Above command will get the content of text file, get mailbox objects from AD, Set email address policy as true to enable that. Hope this helps. Thanks. Vishal Ramnani MCITP - Exchange 2007, MCSE Messaging, MCTS - Win 2008 Config
Free Windows Admin Tool Kit Click here and download it now
December 14th, 2009 1:00pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics