Posts
49
Comments
69
Trackbacks
0
Sunday, October 22, 2006
How to get DL membership in Exchange 2007

Abshishek reminded me of this with his post on how to figure out Security Group membership using PowerShell. But Distribution Groups are a whole different beast. So how do you do it? One way is to use the GUI: the awesome Exchange Management Console already shows you group membership. And on the cmdline you can do this in Exchange 2007:

Using server side filtering (faster):

   $filterid = (get-user Administrator).Identity get-group -filter { Members -eq $filterid }

Using client side filtering (slower):

   get-group | where { $_.Members -like '*Admin*' }

This can be adapted to do nested membership as well---I'll leave it to you to figure out how.

posted @ Sunday, October 22, 2006 11:10 PM | Feedback (2)
How to record your shell session

PS> Start-Transcript
PS> # do a bunch of stuff
PS> Stop-Transcript # or just quit the shell

This will create a file (by default in your My Documents folder) that is a verbatim copy of your shell session. No more copy and paste needed from the shell to notepad! A few other things of note:

  • This is the only way to capture verbose and warning information as those cannot be redirected from the shell like errors can (don't ask me why, but make sure to tell Jeffrey Snover about this)
  • You can start a transcript by default every time you start your shell by putting 'start-transcript' in your profile.ps1 file
  • There can change the location of the text file that is created. Look at get-help start-transcript for more details
Have fun! 
posted @ Sunday, October 22, 2006 11:10 AM | Feedback (0)
News
A little slow these days as I'm busy working on exchangelabs.com. I will try and post tidbits when I get some time. Enjoy the older posts till then!