sirichaiphumirat
asked on
exchange 2010 powershell command issue
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.
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.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER