Powershell Schedule Task

I have a couple Powershell Scripts that I have written that do something useful for me, the problem is that these are useful to me because I am asleep when I usually want them to run. I thought it would be a good Idea to write another script that would put these into the Windows Task Scheduler for...
Powershell Email

The other day I was out reading some blog posts and I ran across one that talked about needing to send an email to a ridiculous number of people. So many that they could not all be fit into the to and cc fields of Outlook. So I thought why not Powershell this. All you would need is a listing of the...
MS SQL Server Monitoring Part 3

In MS SQL Server Monitoring Part 2 we talked about inserting the Marker into the ERRORLOG file. Now that we know we can do that we need to look at how we can scan the ERRORLOG file for errors, and only new...
Powershell Date Math

A few years ago my company wanted me to write a script to enforce a active directory policy that dealt with user accounts. They wanted all accounts that had not been used in 90 days to be automatically disabled and after not being used for 180 days the account to be deleted. In order to do this I...
Powershell: Verify SQL Server is running

I call this Pinging the SQL Server. I am just going to make a connection to verify that the server is running and then close the connection. This is something that I am running in conjunction with the SQL Server...
MS SQL Server Monitoring Part 2

OK so in MS SQL Server Monitoring we left off asking about how we can insert a Marker into the ERRORLOG file while the SQL Server is running and the SQL Server has the file locked. Actually, the answer is pretty...
ASE15 Stack Size

I am currently working on upgrading one of our applications from ASE12.5 to ASE15 and the developers are in the middle of testing. This morning I got a call saying that the developer working on this could no longer connect to the server. I looked into it and found that the server was shutdown. I...
Powershell Script to Monitor Disk Space

So today I got alerted by one of my old VBScripts about a disk having less than 5 Gigs free. I had this script in place so that the SQL servers that I manage do not run out of space on the disk that the mdf and ldf files are on. When I logged into see what the problem was I noticed that on both...
Why Powershell?

In my first few posts here I have done a lot of things in Windows Powershell. Some of you may be asking why Powershell and I am busy asking why not Powershell. Since being introduced to Powershell any time I hear a request to do just about anything in Windows I think about how I can script that...
Update Server DNS Search Order using Windows Powershell

Recently my company had a DR Test. This is a test we do a couple times a year to make sure that in case of a disaster we would still be able to put out a product. During this test we found the DNS Search Order for some of our Windows Servers was not set up to be as efficient as possible. We also...