Menu
CCMEXEC.COM – Enterprise Mobility
  • Home
  • General
  • Configuration Manager
  • Windows 10
  • Windows 11
  • Intune
  • GitHub
  • About
CCMEXEC.COM – Enterprise Mobility

Prevent use of computers which failed during OSD

Posted on December 13, 2012 by Jörgen Nilsson

Sometimes an OS deployment fails for different reasons, one thing that can be a problem is that users in some cases don’t see the error message saying that the installation failed and starts using the computer. Even if we use “SMSTSErrorDialogTimeout” to change the default 15 minutes error dialog to 22 hours, the installation can be initiated over a weekend for instance.
If the installation fails near the end of the Task Seqeunce it could only be one application missing an nobody notice it.

I have written two small scripts for this, one that actually disables the computer account in AD if the TS fails and one that changes the logon background in Windows 7 to an awful looking background which cannot be missed by the user, of course this is just a sample.
If the Task Seqeunce fails it would look like this if the user tries to logon:

DisableComputer

Then no user cannot use the computer for sure.
I use it in an MDT task sequence so I put the two additional steps in the section “Gather Logs and StateStore on Failure” which is executed in case of a Task Sequence failure.

Here is how to implement it:

  1. Download the scripts needed here: TSerrorscript
  2. Place them in a folder that can be used as source folder as below.
    DisableComputer4
  3. In the backgrounds directory replace my ugly example logon background with your own.
  4. Create a package in Configuration Manager with the folder with the scripts as source folder and distribute it to your DP’s.
  5. In the Task Seqeunce add a step for disabling the computer account. I use the same account as I use to join the domain.
    DisableComputer5
  6. Set a condition to only run if not in WinPe as there is no account to disable if the computer is not in AD.
    DisableComputer6
  7. Then we add a step to change the background and use the same condition as above for this step.
    DisableComputer7That is it, now you are ready to test it out.

4 thoughts on “Prevent use of computers which failed during OSD”

  1. Micke Palmquist says:
    December 14, 2012 at 11:26 pm

    Hi!
    This one I like alot.

    I do use the Complete Wizard(former Modena). I am tweaking this one at the monemt, coz a miss a few things. 🙂

    Reply
    1. Jörgen Nilsson says:
      December 21, 2012 at 7:38 pm

      Hi,
      Nice to hear! Which features are you missing?
      /J

      Reply
  2. Henrik says:
    December 28, 2012 at 1:36 pm

    Nice background i will use that 🙂

    Reply
  3. Pingback: UDI FTW! | Deployment Witchcraft

Leave a Reply Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

My name is Jörgen Nilsson and I work as a Senior Consultant at Onevinn in Malmö, Sweden. This is my blog where I will share tips and stuff for my own and everyone elses use on Enterprise Mobility and Windows related topics.
All code is provided "AS-IS" with no warranties.

Recent Posts

  • Windows 365 Link – a week and some
  • Prevent software installations disguised as drivers
  • Tip when troubleshooting unexpected reboots during Autopilot – event ID 2800
  • New settings in Intune Security Baseline Windows 11 24H2 -2504
  • Managing extensions in Visual Studio Code
©2025 CCMEXEC.COM – Enterprise Mobility | WordPress Theme by Superb Themes
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.Accept Reject Read More
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT