exchange 2010 powershell command issue
Posted on 2013-05-13
Need some help with a powershell command. I'm kinda new with using powershell.
How can i append something to a current variable. Is it even possible. For example the command below
$mailbox = get-mailbox 'testuser'
now $mailbox holds the value for testuser,
how can i add other users into the variable also. For example I wanted to add testuser10 to the variable.
So when i run $mailbox i'll get the info for both user. My point for doing this is so i can run a command to delete some emails for a few users. The command i want to be able to run when i have all my users in the variables is below.
$mailbox| Search-Mailbox -SearchQuery 'Subject:"this is a test"' -DeleteContent
thanks in advance.