Friday, December 19, 2008

Exchange 2007 Powershell example

get-distributiongroupmember "administrative staff" | select-object displayname, primaryemailaddress, recipienttype | export-csv -path test.csv

This almost accomplishes what we want but we would like to limit the output to only where recipienttype="Usermailbox".  Whenever we try to use "select-string -pattern" (powershell's grep) we either only get the recipienttype module array or we get no output because recipienttype is not in the output.

Technorati Tags: , ,