Export "showInAddressBook" attribute of a distribution group

xmuff
xmuff used Ask the Experts™
on
Dear all,

I woul'd like to export "showInAddressBook" attribute of a distribution group (Exchange 2010) in PS script. I know how to do for user but not for group.

Thank you for help!

XMU
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Will SzymkowskiSenior Solution Architect
Most Valuable Expert 2015
Top Expert 2015

Commented:
I think you are talking about "HiddenFromAddressList"? There is not "ShowInAddressBook" attribute. Use the following script below...

Get-DistributionGroup -ResultSize "unlimited" | ? { $_.HiddenFromAddressList -eq $False } |
Select DisplayName, PrimarySmtpAddress, GroupType |
Export-csv "c:\DistributionGroups.csv" -nti

Open in new window


Will.
Hello

Check out this

http://www.experts-exchange.com/Programming/Languages/Scripting/Powershell/Q_27859729.html
or
Get-DistributionGroup -resultsize unlimited |  Select name, @{Name='AddressListMembership`;Expressi
on={[string]::join(";", ($_.AddressListMembership))}} | Export-Csv C:\export.csv

Author

Commented:
Thank you all for your answers but I'm searching for "showInAddressBook" like in this picture. Does anyone know how to get this information (exporting in a CSV or on the PowerShell prompt).showInAddressBook
Really thank you for help!
Get-ADGroup -Filter 'groupcategory -eq "distribution"' -Properties ShowInAddressBOok | Select Name,  @{name=”ShowInAddressBook”;expression={$_.ShowInAddressBook -join “;”}}  | Export-csv C:\Expt.csv

Author

Commented:
PER-FECT!!!!!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial