Parsing The SMSTS Log Using PowerShell

Overview

Have you ever been at the point where your eyes start “bleeding” because you’ve been staring at logs for way too long?  Look no further because I’ve created a script to ease some of your pain…well at least when it comes to reading the SMSTS Logs.

Every time one of my techs email me about an imaging issue – I tell them to check the logs and they always struggle to read them.  I created this script to help read the SMSTS Log to see which steps completed successfully and which failed.

Running The Script

There are two parameters available for this script:

  1.  Computer [optional]
    • Use this parameter when you want to read the SMSTS Log from a remote machine
    • If the parameter is not defined, the script will read the SMSTS Log from the local machine.
  2. Path [optional]
    • Use this parameter to define where the script will look for the SMSTS Log [Syntax: \\<computer name>\<path>]
    • If the parameter is not defined, the script will look at C:\Windows\CCM\Logs

Examples

Returns the failed/completed steps for the local machine.

Read-SMSTSLog.ps1

Returns the failed/completed steps from PC01.

Read-SMSTSLog.ps1 -Computer PC01

Returns the failed/completed steps for the local machine from X:\Windows\Temp\SMSTSLog\.

Read-SMSTSLog.ps1 -Path X:\Windows\Temp\SMSTSLog

Returns the failed/completed steps from PC01 located in \\PC01\C$\Windows\Logs.

Read-SMSTSLog.ps1 -Computer PC01 -Path \\PC01\C$\Windows\Logs

Output

Sample output of the script:


The Script

  Download

 

Leave a Reply

Your email address will not be published. Required fields are marked *