Getting email alert and smsts log when imaging fails via PowerShell

When Rebooting Is Not The Answer

So in follow up to my last post I have been testing a script to look for the smsts log when the task sequence fails and send me an email with the smsts.log as attachment.

I set this up in my MDT task sequence under the gather logs and statestore on failure section so that way whenever the task sequence has an error I get the logs.

I have a nice array of locations of the smsts log and a foreach loop to look through them test if they exist using Test-Path cmdlet and attach them to my email.

Seems to work well from what I have seen so far.

View original post

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s