Exchange Powershell Exchange and Powershell Helps, Tips, and Tricks

Archive for the ‘Powershell’ Category

List of Hidden Distribution Group

07.06.2010 · Posted in GAL - Global Address List, Powershell

You may find that you need to get a list of all of the distribution groups in your Exchange Organization that are hidden from the GAL (Global Address List). The following command is a simple powershell command that will accomplish this. get-distributiongroup | select name, hiddenfromaddresslistsenabled | WHERE {$_.HiddenFromAddressListsEnabled -eq $true } This will give ...

How to hide a Distribution Group from the GAL with Powershell

07.06.2010 · Posted in GAL - Global Address List, Powershell

Here is a simple command that will save you some time. Instead of having to open up a GUI, you can just type this command in a PowerShell window and hide a Group from the GAL (Global Address List) set-distributiongroup [GROUPNAME] -HiddenFromAddressListsEnabled $true This will then hide the list from the GAL. No need to ...

Delete all messages after date from mailbox

11.24.2009 · Posted in Exchange, Powershell

I was asked to delete everything from a mailbox called familydomains that was older than 2009. Here is the Exchange Powershell command that I used to delete everything earlier than 12/31/2008 to a PST file located in my C:\temp directory. export-mailbox familydomains -PSTFolderPath C:\temp\ -DeleteContent -endDate 12/31/2008 The advantage to doing it this way is ...

Command to list all messages to a specific domain for the day

11.20.2009 · Posted in Exchange, Powershell

If you want to list all of the messages sent to a recipient with a specific domain, you can run this command. It will export a list of all message from 8:00AM – 5:00PM on 10/17/2009 that were to someone on the domainname.com domain. The list will be saved to c:\send.xls get-transportserver | Get-MessageTrackingLog -ResultSize ...