|
Replies:
6
-
Pages:
1
-
Last Post:
Nov 9, 2009 7:16 AM
by: FuserKill
|
|
|
Posts:
28
Registered:
9/29/08
|
|
|
|
query Multivalued Properties exchange 2007 GrantSendonBehalfto
Posted:
Nov 6, 2009 1:54 PM
|
|
|
On a Given Distribution list I get a {} instead of names when I run the following command in powershell. How do I get an output of the users in the GrantSendonBehalfto parameter?
[PS] C:\Windows\System32>Get-DistributionGroup "Choice - All Mailboxes" | Format -List Name, GrantSendOnBehalfTo Name : Choice - All Mailboxes GrantSendOnBehalfTo : {}
Many thanks 
Tom
|
|
|
Posts:
1,919
Registered:
1/31/08
|
|
|
Posts:
28
Registered:
9/29/08
|
|
|
|
Re: query Multivalued Properties exchange 2007 GrantSendonBehalfto
Posted:
Nov 9, 2009 6:08 AM
in response to: Shay Levy
|
|
|
|
|
Shay,
Thanks for the response, so I know this list has a list of approved senders, perhaps I am looking at the wrong parameter. See the attached screen shot.
I am trying to expose the list of usernames compiled under Accept Messages from Only the senders on this list.
The list is populated in the Gui as you can see, so I have to assume I am using the wrong parameter.
could you help me figure out what parameter would expose this list, and the syntax of that command?
Thx in advance ,
Tom
*****Update*******
Ok I have found the command
Get-DistributionGroup "Choice - All Mailboxes" | Select-Object -property DisplayName,AcceptMessagesOnlyFrom
When I run this in the command line I get a cutoff list
DisplayName ----------- Choice - All Mailboxes
AcceptMessagesOnlyFrom ---------------------- {Chalian, Hrag, Gonzalez, Elba, Belt...
So When I try to exportit to a csv or html I get an output like so...
DisplayName Choice - All Mailboxes
AcceptMessagesOnlyFrom Microsoft.Exchange.Data.MultiValuedProperty`1[Microsoft.Exchange.Data.Directory.ADObjectId]
How Do I get this thing exposed??
Message was edited by: FuserKill
|
|
|
Posts:
1,919
Registered:
1/31/08
|
|
|
Posts:
28
Registered:
9/29/08
|
|
|
|
Re: query Multivalued Properties exchange 2007 GrantSendonBehalfto
Posted:
Nov 9, 2009 6:49 AM
in response to: Shay Levy
|
|
|
Ok we are getting closer, I narrowed down your command to just the list I want but It cuts it off and does not seem to be exportable to csv or html. Now that we have properly identified the attribute how can I extract the full list? (I also tried a different set of commands with similar results that I posted as an edit before your last response)
[PS] U:\>Get-DistributionGroup "Choice - All Mailboxes" | Format-List Name,Accep tMessagesOnlyFrom Name : Choice - All Mailboxes AcceptMessagesOnlyFrom : {Chalian, Hrag, Gonzalez, Elba, Beltran, Wendy, Kearne y, Kate, Plonisch, Gregg, Baum, Helmuth, Lawson, Natha niel, Mullings, Leacer, Thomas, Darlene, Velasquez, Je nnie, McKoy, Larry, Somma, Vikki, Beros, Chris, Rolon, Hector, Iuzzini, Fran, Tolbert, Ernest...}
Thanks you for your help...
Message was edited by: FuserKill
|
|
|
Posts:
1,919
Registered:
1/31/08
|
|
|
|
Re: query Multivalued Properties exchange 2007 GrantSendonBehalfto
Posted:
Nov 9, 2009 7:05 AM
in response to: FuserKill
|
 |
Answered |
|
|
This will make output ready for exporting to csv file. It joins all the users name, delimited by semicolon:
Get-DistributionGroup "Choice - All Mailboxes" | select name,@{Name="AcceptMessagesOnlyFrom";Expression={[string]::join(";",($_.AcceptMessagesOnlyFrom | foreach {$_.Name}))}}
You should get results similar to:
Name AcceptMessagesOnlyFrom ---- ---------------------- TestDG Chalian, Hrag, Gonzalez, Elba, Beltran...
To save it to csv file pipe the command to export-csv.
|
Shay Levy [MVP]
http://blogs.microsoft.co.il/blogs/ScriptFanatic
PowerShell Toolbar
|
|
Posts:
28
Registered:
9/29/08
|
|
|
|
Legend
|
|
MVP: 2501
+
pts
|
|
Guru: 2001
- 2500
pts
|
|
Expert: 751
- 2000
pts
|
|
Enthusiast: 31
- 750
pts
|
|
Novice: 0
- 30
pts
|
|
Moderators
|
|
Helpful answer
(5 pts)
|
|
Answered
(10 pts)
|
|