Category Archives: Scripting

MS SQL AlwaysOn – Is current node the Primary?

I’m not a DBA by any stretch of the imagination. I do, however, need to provide basic infrastructure support to a number of Microsoft SQL servers. A number of our MSSQL 2012 servers have been configured to use AlwaysOn. This … Continue reading

Posted in Scripting, SQL | Leave a comment

Remove IP from Exchange Relay Connectors

A simple script to compliment a previous post

Posted in Scripting | Leave a comment

Select menu item from a dynamic Powershell array

Whilst talking with a colleague, the topic of being able to create a selectable menu item from a dynamically generated array came up. This was in the context of having a script that would query a list of all mailbox … Continue reading

Posted in Scripting | Leave a comment

Powershell script to alert when someone RDP’s to a server

I’ve had a few issues with contractors logging directly into server, rather than using remote management tools. This script requires a scheduled tasks with a number of event triggers depending on what you want to alert on. I’m not too … Continue reading

Posted in Scripting | Leave a comment

Powershell script to alert on Server reboot

Just a quick powershell script that can be kicked off by a scheduled tasks that runs when Event ID 1074 is logged automatically by someone attempting to reboot a server.

Posted in Scripting | Leave a comment