Export Mailbox Hierarchy Information Only?
Is there a way to export to a file of some sort ONLY the mailbox hierarchical information (not data as well)? We need to provide this information to another employee so they can set their structure up the same way. Thanks! Mike
August 17th, 2010 7:25pm

Exchange version?[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Free Windows Admin Tool Kit Click here and download it now
August 17th, 2010 7:32pm

do u mean the folder structure in your mailbox? Thiyagu | MCTS/MCITP - Exchange 2007 | MCSE 2003[Messaging] | http://www.myExchangeWorld.com. This posting is provided "AS IS" with no warranties, and confers no rights.
August 17th, 2010 7:33pm

Yes, I have one user mailbox in Exchange 2007 that I need an output of the hierarchy only, for purposes to show another user how he organizes his folders, sub folders, etc, but I do not want an export of the data in the mailbox. Is there a PowerShell command?
Free Windows Admin Tool Kit Click here and download it now
August 17th, 2010 7:42pm

Try this (assumes you mailbox folder structure doesn't go more than 10 levels deep). get-mailboxfolderstatistics <mailbox> |% {$_.identity.tostring().split("\")[1..10] -join "\"}[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
August 17th, 2010 7:51pm

That is beautiful! Anyway to go more than 10 levels (just curious) and also I assume I can pipe it to a CSV?
Free Windows Admin Tool Kit Click here and download it now
August 17th, 2010 7:57pm

i tested what mjolinor posted in exchange 2010. it works Thiyagu | MCTS/MCITP - Exchange 2007 | MCSE 2003[Messaging] | http://www.myExchangeWorld.com. This posting is provided "AS IS" with no warranties, and confers no rights.
August 17th, 2010 7:58pm

you can increase the [1-10] to [1-100] whichever you want, but more numbers u put there, longer for the command to finish Thiyagu | MCTS/MCITP - Exchange 2007 | MCSE 2003[Messaging] | http://www.myExchangeWorld.com. This posting is provided "AS IS" with no warranties, and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
August 17th, 2010 8:00pm

you can use " | out-file "C:\folder_export.txt"Thiyagu | MCTS/MCITP - Exchange 2007 | MCSE 2003[Messaging] | http://www.myExchangeWorld.com. This posting is provided "AS IS" with no warranties, and confers no rights.
August 17th, 2010 8:02pm

You can increase to an arbitrary maximum by changing the [1..n] - eg get-mailboxfolderstatistics <mailbox> |% {$_.identity.tostring().split("\")[1..20] -join "\"} would go to a maximum level of 20. Since the depth of any folder is arbitrary, it's going to be a "jagged" array, and not something that's easily converted to csv. You can pipe to out-file and just create a list. If you just want to send the user the information, you can do this: get-mailboxfolderstatistics <mailbox> |% {$_.identity.tostring().split("\")[1..10] -join "\"} | clip then just open up an email to the user, right click in the body and hit "Paste".[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Free Windows Admin Tool Kit Click here and download it now
August 17th, 2010 8:03pm

Clip was unrecognized as a valid Powershell command (maybe because I don't have V2 on my desktop?), but the Out-File is perfect! Thanks so much for the very fast reply and sharing your great knowledge. -Mike
August 17th, 2010 8:20pm

clip is an exe so if u have the .exe somewhere in ur path variable location then it will work. http://technet.microsoft.com/en-us/library/dd996683%28WS.10%29.aspxThiyagu | MCTS/MCITP - Exchange 2007 | MCSE 2003[Messaging] | http://www.myExchangeWorld.com. This posting is provided "AS IS" with no warranties, and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
August 17th, 2010 8:28pm

Nice utility! Thansk again for your help!
August 17th, 2010 9:21pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics