Exchange Powershell Exchange and Powershell Helps, Tips, and Tricks

List Members of a Dynamic Distribution List

07.12.2010 · Posted in Exchange, GAL - Global Address List

This post was inspired by a post found on www.howexchangeworks.com But I have modified the commands some to get a better listing. $group = Get-DynamicDistributionGroup –identity “AllStaff” Get-Recipient –RecipientPreviewFilter $group.RecipientFilter | sort name | select name > d:\_temp\dlist_members.txt These changes will give you an alphabetical list of members, with names only in the list. I ...

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 ...

Script – Mailbox Audit

06.03.2010 · Posted in PowerShell V2, scripts

This is a script I wrote that will look for specific email accounts in an OU, and then send an email to all the people who have access to those email accounts. — Start of Script – #$ErrorActionPreference = "SilentlyContinue" $smtpServer = "[REMOVED]" $smtp = new-object Net.Mail.SmtpClient($smtpServer) $emailFrom = "mkieffer@[REMOVED]" $a = get-user -OrganizationalUnit "[REMOVED]/Corp/Email ...

Script – Check Message Queue

06.03.2010 · Posted in scripts

Here is a simple script I wrote that checks the message queue and then sends an email if the message queue goes over a specified limit. — Start of Script — function check_queue { $a = get-transportserver | get-queue | measure-object MessageCount -max if ($a.Maximum -gt 25) { send_email $a.Maximum Exit } start-sleep -s 60 ...

Exchange – Cannot remove ACE on object … because it is not present.

06.03.2010 · Posted in Exchange, PowerShell V2

I have run into a problem while doing some routine maintenance on some shared mailboxes for the company I work for. During the maintenance process, we audit the list of users that have full mailbox rights to any shared mailbox. In the process, I was trying to remove full permissions from several user accounts. Here ...

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 ...

Project Professional 2007 – Error

11.23.2009 · Posted in Server

I got a call from a user that was trying to use the web interface on a Project Server install, and was getting this error message when she was trying to edit a project that she created several days before: Project Professional 2007 is currently running under a profile that does not match your current ...

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 ...

IBM X3550 7978-AC1

11.13.2009 · Posted in General, Hardware, Server

We were having some issues with one of our X3550 servers from IBM.  The server kept doing a blue screen and hard stop.  The errors we were seeing indicated that it was probably the RAID controller, the system board raid controller.   To start trouble shooting the process, I ran UpdateXpress version 4.07 to update the ...