What is wrong in the following command shell Exchange 2007 command
Need help to verify what is wrong with this command
$usergroup=get-group "Exchange S1" $usergroup.members | set-Mailbox -UseDatabaseQuotaDefaults:$false -IssueWarningQuota 100MB -ProhibitSendQuota 120MB -ProhibitSendReceiveQuota unlimited
and the error message i am getting is :
Get-Group : A parameter cannot be found that matches argument '$null'.
At line:1 char:21
+ $usergroup=get-group <<<< "Exchange S1" $usergroup.memb
ers | set-Mailbox -UseDatabaseQuotaDefaults:$false -IssueWarningQuota 100MB -Pr
ohibitSendQuota 120MB -ProhibitSendReceiveQuota unlimited
ThanksInderjit
February 3rd, 2011 3:05am
Try splitting the command up and set the variable $usergroup=get-group "Exchange S1" first. Then on a new rown run the rest of the command.Martin Sundstrm | Microsoft Certified Trainer | MCITP: Enterprise Messaging Administrator 2007/2010 |
http://msundis.wordpress.com
Free Windows Admin Tool Kit Click here and download it now
February 3rd, 2011 3:34am
Nice Catch, that works..Thanks
what attribute should i add to get the output in a text file, i remember we use to add "command" > test.txt whenever we run similar kind of commands in windowsInderjit
February 3rd, 2011 3:52am
I dont have a test machine to test it.
First check if you are able get the first set of result. (usergroup=get-group "Exchange S1" $usergroup.members)
Second part looks good.
Also you can export the members to excel and inport the excel sheet and run Set-Mailbox.
http://www.ocsblogs.org/blogs/exchange/archive/2008/07/03/Exporting-distribution-list-membership-to-Excel.aspx
Free Windows Admin Tool Kit Click here and download it now
February 3rd, 2011 3:54am
Thanks a ton, thats a cool tip you gave.
-IJInderjit
February 3rd, 2011 3:59am
When i ran the command
usergroup=get-group "Exchange S1" $usergroup.members
The term 'usergroup=get-group' is not recognized as a cmdlet, function, operabl
e program, or script file. Verify the term and try again.
At line:1 char:20
+ usergroup=get-group <<<< "Exchange S1" $usergroup.memb
ers
And
$usergroup=get-group "Exchange S1" $usergroup.members
Get-Group : A parameter cannot be found that matches argument '$null'.
At line:1 char:21
+ $usergroup=get-group <<<< "Exchange S1" $usergroup.mem
bersInderjit
Free Windows Admin Tool Kit Click here and download it now
February 3rd, 2011 4:05am
Just want to add that Exchange S1 is a security group.Inderjit
February 3rd, 2011 4:06am
Yes that's right, if you add | FL > filename.txt after the command the result is exported to a text file. You can also export it to a csv using the following: | Export-CSV "folderpath\filename.csv".Martin Sundstrm | Microsoft Certified Trainer | MCITP: Enterprise Messaging Administrator 2007/2010 |
http://msundis.wordpress.com
Free Windows Admin Tool Kit Click here and download it now
February 3rd, 2011 4:08am