Select Page

PowerShell Get-Service

Since I have written a process that checks all of our SQL Services I have been researching other methods and might have found a quicker way using Get-Service but would require an addition step to pass the arguments accordingly on a server by server basis. Potentially...

PowerShell Change Service Startup

In the event you need to change the service startup from either “Manual”, “Automatic”, or “Disabled” on a remote server, PowerShell makes it extremely easy and here’s one of likely many ways you can do it. function...

PowerShell: Monitoring Servers

I’m relatively new to PowerShell. I’ve known about it and have dabbled with it here and there but as of lately I’ve been digging in a bit deeper. One of my projects was to build a homegrown monitoring system. Being a DBA it’s natural that I...

Deleting a duplicate record

Recently a friend of mine asked me about deleting a duplicate record from a table without deleting both records. Having been in a situation I drafted up a sample script and emailed it to him. DECLARE @tbl1 TABLE ( id int, color varchar(50) ) INSERT INTO @tbl1 (id,...