Monthly Archives: August 2013

days since restart

The following script runs against a list of servers and determines the last restart time. It will report if the machine is not found via ping there is another kind of error with WMI or the last restart date is … Continue reading

Posted in Uncategorized

monitor

One place the powershell shines is in monitoring.  With full access to WMI and CMI cmdlets as well as the .NET tools, and with remoting or with -computername as a local option, it is reasonably easy to run monitors over … Continue reading

Posted in Uncategorized

backups

Backups in MS SQL are really easy – if you do them.  they are frightfully difficult if you don’t do them.  We don’t backup and use DPM (MS System Center Data Protection manager) to make backups.  We will not have … Continue reading

Posted in Uncategorized

screenscaping

Doug Finke has a short post (almost NO commentary) with code to get the catalog for Pluralsight. Basically, the variable contains the html code of the page after it is filled with invoke-werbrequest.  PS 3.0 needed. $courses = Invoke-WebRequest “http://pluralsight.com/training/Courses” … Continue reading

Posted in Uncategorized

get-content list of servers

get-process -computername (gc c:\list.txt)|select-object … assuming that list.txt is only a series of server names.

Posted in Uncategorized

get-content, last five lines

get-content c:\myfile gets and displays the contents of the file myfile.txt.  You can put the data into a variable and use it later.  If  you only want the end of the file, you can deal with it in the variable, … Continue reading

Posted in Uncategorized

SQL Backup file permissions

SQL will, using SSMS, SQL Agent or a Maintenance plan, backup files to a directory.  Default that location is X:\Backups.  Whatever.  You can specify it when you install.  Depending on where the location is, you might have a number of … Continue reading

Posted in Uncategorized