Exchange Server Forums
Forums |
Register |
Login |
My Profile |
Inbox |
RSS
|
My Subscription |
My Forums |
Address Book |
Member List |
Search |
FAQ |
Ticket List |
Log Out
Powershell Help Please
|
Users viewing this topic:
none
|
Logged in as: Guest
|
Login | |
|
Limited time MSExchange.org offer! -- 1.Sep.2008 1:00:00 PM
|
|
TechGenix and SolarWinds have partnered to provide free copies of SolarWinds Exchange Monitor to all visitors who join the MSExchange.org Forums. SolarWinds Exchange Monitor is a handy desktop dashboard that continuously monitors Microsoft Exchange to deliver real-time insight into Exchange services, mail queue sizes, and host server health. Learn more about Exchange Monitor and the free offer!
|
Powershell Help Please - 30.Jul.2008 7:04:10 AM
|
|
|
charliegadget
Posts: 50
Joined: 16.Nov.2007
Status: offline
|
Hi All Please could someone help with the correct command to run to get a list of users permitted to send to a distribution list. We have a large number of people in the "acceptmessagesonlyfrom" part but all the commands i run it always only gives me the first 10 or so. Here is the command I am using.. [PS] C:\Documents and Settings\Administrator\Desktop>Get-Distribution Group -id "all-uk" | fl name, acceptmessagesonlyfrom | out-file c:\che.txt I get the info in a file bit it looks like this: Name : All UK List AcceptMessagesOnlyFrom : {Blah Blah, Blah Blah, Blah Blah, Blah Blah, Blah Blah, Blah Blah, Blah Blah, Blah Blah, Blah Blah, Blah Bla...} I would like it to list everyone! Thanks in advance for your help. Charlie
|
|
|
|
RE: Powershell Help Please - 5.Aug.2008 3:29:48 PM
|
|
|
a.grogan
Posts: 1887
Joined: 12.Apr.2005
From: London
Status: offline
|
Hiya chap - have a play with: $MyMembers = Get-DistributionGroup -id "all-uk" | Select acceptmessagesonlyfrom Foreach ($Item in $MyMembers){ Write-Host $MyMembers.acceptmessagesonlyfrom } Cheers A
_____________________________
Andy Grogan MSExchange.org Forums Moderator For my general ramblings about Exchange please visit my blog: W: http://telnetport25.wordpress.com/ M: manifoldmaster@gmail.com
|
|
|
|
RE: Powershell Help Please - 5.Aug.2008 4:46:07 PM
|
|
|
charliegadget
Posts: 50
Joined: 16.Nov.2007
Status: offline
|
Hi Andy, Many thanks for the response... I will try tomorrow!! Not seen that in my powershell bible!! Will let you know! Thanks Charlie
|
|
|
|
RE: Powershell Help Please - 6.Aug.2008 5:54:36 AM
|
|
|
charliegadget
Posts: 50
Joined: 16.Nov.2007
Status: offline
|
Hi, Yep... that worked... although in a very unformatted way! but it is the means to an end... i had a quick plat to see if I could get it to format a bit better.. if you remove the "-host" from "Write-host" it will give you a list with the full user AD details.. any idea how i can output that to a txt or csv? Thanks Carlie
|
|
|
|
RE: Powershell Help Please - 6.Aug.2008 6:30:26 AM
|
|
|
a.grogan
Posts: 1887
Joined: 12.Apr.2005
From: London
Status: offline
|
Hiya you could try; $MyMembers = Get-DistributionGroup -id "all-uk" | Select acceptmessagesonlyfrom Foreach ($Item in $MyMembers){ Out-File -Append -InputObject $MyMembers.acceptmessagesonlyfrom -FilePath C:\Dist.txt }
_____________________________
Andy Grogan MSExchange.org Forums Moderator For my general ramblings about Exchange please visit my blog: W: http://telnetport25.wordpress.com/ M: manifoldmaster@gmail.com
|
|
|
|
RE: Powershell Help Please - 6.Aug.2008 7:10:15 AM
|
|
|
charliegadget
Posts: 50
Joined: 16.Nov.2007
Status: offline
|
Lovely... just the job! Many thanks Charlie
|
|
|
|
RE: Powershell Help Please - 6.Aug.2008 10:50:18 PM
|
|
|
TXB2
Posts: 53
Joined: 20.Mar.2008
Status: offline
|
Thanks Andy. I don't seem to stop learning when it comes to Powershell!
|
|
|
|
RE: Powershell Help Please - 12.Aug.2008 12:02:57 AM
|
|
|
ccolantonio
Posts: 1
Joined: 11.Aug.2008
Status: offline
|
Hi, I have a somewhat related question about the acceptmessagesonlyfrom attribute. I apologize if it should be in a separate thread. What is the syntax to add multiple email addresses (only 2) to mailboxes within a particular OU? So far, I've got: get-mailbox -organizationalunit trustees | set-mailbox -acceptmessagesonlyfrom user@domain.com... which only adds one address. Subsequent attempts only replace existing addresses within mailbox. I beleive I need to create a variable with an array assigned to it, but having only read about arrays, I'm having difficulty applying to this context. Any help would be greatly appreciated. P.S. long time reader, first time poster.
|
|
|
|
RE: Powershell Help Please - 12.Aug.2008 4:18:00 AM
|
|
|
charliegadget
Posts: 50
Joined: 16.Nov.2007
Status: offline
|
Hi I have not tried this, as we have no need for it in our production environment and my test environment is hosed at present. have you tried putting user1@domain.com, user2@domain.com, user3@domain.com ? i.e. separating several users with a comma? Regards Charlie
|
|
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts |
|