Posted April 17th, 2009 by Matt Shadbolt
Here’s a quick and dirty Exchange 2007 command-let that will output all the outgoing emails that are not being delivered. It Checks the message status (NOT “Active) and the message retry count (GT 0) and outputs the results. Get-Message -Server SERVER01 -IncludeRecipientInfo | Where{$_.RetryCount -gt 0} | Where{$_.Status -ne “Active”} | SELECT FromAddress, Recipients, LastError [...]
Tags: EMS, Exchange 2007, Get-Message, PowerShell
Posted March 12th, 2009 by Matt Shadbolt
Man! I’m killing these powershell scripts today – and they’ve all been related to alerting/reporting via email. If you’ve missed my two other posts – there is a mailbox size report (http://mattlog.net/2009/03/12/auto-email-exchange-2007-mailbox-report/) and a StorageGroupCopyStatus report (http://mattlog.net/2009/03/12/auto-email-exchange-2007-storagegroupcopystatus/) This one is a little more useful. Basically, this PowerShell script checks the SummaryCopyStatus and checks that it’s [...]
Tags: Exchange 2007, PowerShell, SCR, StorageGroupCopyStatus
Posted March 12th, 2009 by Matt Shadbolt
Exchange 2007′s Storage Group Copy feature is one of my favourites, however the one area it is really lacking is the reporting. You need to manually run the Get-StorageGroupCopyStatus -Server INITIALSERVER -StandbyMachine TARGETSERVER to find that your SCR is Healthy. I’ve been playing around writing some simple PowerShell scripts today so I thought I would [...]
Tags: Exchange 2007, PowerShell, SCR, Standby Continuous Replication, StorageGroupCopyStatus
Posted March 12th, 2009 by Matt Shadbolt
Hi all. I’ve written this simple PowerShell script to output your user mailboxes, their total size and the item count – the script will then email the output to a specified account in a pretty HTML table format. Feel free to download the .ps1 file and run it as you wish. Remember that you need [...]
Tags: Email from PowerShell, Email Report, Exchange 2007, Mailbox Size, PowerShell
Posted December 15th, 2008 by Matt Shadbolt
I’ve had the need to remove a bunch of differential backup images from my backup server for a short while now – and thought this was the perfect opportunity to crack into powershell. I’m going to post the script and run through the important parts: dir C:\BACKUP -recurse -exclude SERVER1,SERVER2,SERVER3,SERVER4,SERVER1.IMG,SERVER2.IMG,SERVER3.IMG,SERVER4.IMG,FileClean.PS1 | where { ((get-date)-$_.creationTime).days -ge [...]
Tags: Get-Date, PowerShell, Remove-Item
Posted November 10th, 2008 by Matt Shadbolt
Here’s a handy file for remembering all of the default PowerShell Alias commands. These save so much time when working in the shell. Print it out and tape to your cubicle for easy access! powershellalias
Tags: Alias, PowerShell
Posted October 2nd, 2008 by Matt Shadbolt
Quick tip: You don’t need to browse to Start > Programs > Windows PowerShell 1.0 > PowerShell to launch a new PowerShell cmdlet – just open a Run box and type “powershell” Also, by default in Server 2008 the PowerShell console is coloured blue. This is for a good reason – it stops you from [...]
Tags: PowerShell