profile for Hannel on Stack Exchange, a network of free, community-driven Q&A sites

Project Work Hours

Sat & Sun 6am - 9am

Subscribe via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.


MS Exchange

Includes everything Microsoft Exchange related

Showcasing my ‘ImmutableID Swiss Army knife’.  A tool that takes hours of Active Directory  Sync prep work and put it into a few click with worries about sync issues of loss of data. Even though script is currently design to work with AADConnect everything except the -ForceSync switch will work with DirSync and AADSync.

20160317 - AADConnect Automation

Script Output

Download Script Here


.\SyncMasterPlan.ps1 -O365Domain <Domianname> -O365Connect -PrepAD -ForceSync


.\SyncMasterPlan.ps1 -O365Domain -O365Connect -PrepAD -ForceSync


Continue reading

This is another script in my toolbox, I have tweaked it a little to look pretty and work in other environment.  The script is used to update certificates on the ADFS server and to update the ADFS signing certificate on Office 365 Federated domains. It’s not in any way a perfect script but gets the work done. Download script here

20151025 - AFDSCertUpdate1


Continue reading

Let me start off with state that i know there are other ways that might be simpler for other people (i.e. Performance Counter) but i still like the old fashion way. Below is how i check my exchange queues when someone reports a delay issue.

20151022 -Exchange Queue


Just 2 lines does the job effectively

$tServer = (Get-ExchangeServer | ? {$_.serverrole -like "*Mailbox*"}).name
$tServer | % {Get-Queue -Server $_ | ? {$_.messagecount -ge 0}}

Where the “0” in the script can be change to any thing you deem significant, example;

$tServer | % {Get-Queue -Server $_ | ? {$_.messagecount -ge 10}

Please note that this is only for Exchange 2013 and 2016 


The article covers storing credential ‘securely’ to be used later in a PowerShell script. It involves export credential into a xml file and importing that credential when need to authenticate.

I used the store credential process to customize an existing script, this method can be used anywhere where a PowerShell script needs a credential.

One of numerous videos in my Two-Click (2C) series

2C YouTube Playlist:
Other 2C Article:
Other PowerShell Article: