SCCM capture of Windows 8 fails during Sysprep stage – Fatal error occurred while trying to sysprep the machine

sccm logo 600x400

I’ve recently been trying to create a custom built Windows 8 image for future deployment using SCCM 2012 SP1. I built a clean Windows 8 base image and then installed all the programs that I wanted on the image and then run Windows Update.

I made some changes to the Metro front screen and updated, added and removed some apps using the Windows Store. Once I was happy with the build, I mounted the SCCM capture ISO and started the usual capture process.

However, when the process got to the Sysprep stage, it failed with the standard unhelpful Microsoft generic error code and message like the one below:

SCCM capture of Windows 8 fails during Sysprep stage - Fatal error occurred while trying to sysprep the machine 1

I started to look on the internet for a solution but there are so many mis-directions with this problem including trying the following:

  • Make changes to the registry
  • Change the re-arm settings
  • Deleting the user account and creating a new one
  • Manually sysprep the machine

There were many more but not one of these solutions worked so I’d suggest that you avoid all the above to avoid wasting more valuable time!

Something you may get if you do run the sysprep manually is an error like the one below:

SCCM capture of Windows 8 fails during Sysprep stage - Fatal error occurred while trying to sysprep the machine 2

Basically there is a reason the sysprep is failing and the reason can be found in your sysprep log files after a failed sysprep. You can find the following file:

setuperr.log

In a location around (may vary on your machine):

C:\Windows\System32\Sysprep\Panther

In there, you will find any errors that are stopping the sysprep from completing. In my case, the simple error was that the metro apps on my base image were not “generic” as I had updated, removed and amended them making them individual to the local administrator account.

The big problem with this is that no matter how many of the above methods I tried to fix this, they didn’t work and ended up making a complete mess of the base image I had created.

So, the solution to this problem is that you should not make any changes to the apps on the Windows 8 Metro. Updating, removing, adding or even OPENING one of these apps (you can open the Desktop!) will make your Sysprep fail.

I decided to start my base image again, but this time did not go anywhere near the Metro or apps, just installed Windows 8, put my custom software on the machine and ran the SCCM capture ISO again – this time it ran all the way through perfectly and I’ve been using this captured image for the last few days on a number of different machines.

If you have any questions or require any help, please leave a comment and I’ll get back to you when I can.

SCCM Console not connecting to the database

microsoft black logo

We have recently allowed a few more people to utilise some of the functionality that the SCCM Console offers and installed the console onto their machines (albeit with heavily restricted permissions and they have to pass a training session first!!).

However, a few of the machines were receiving the error that they could not connect to the SCCM database as per below:

SCCM Console not connecting to the database 3

If you are an SCCM administrator, the chances are that you are very familiar with this error page and most of the time a tweak of permissions is all it takes to fix it.

So, I checked permissions and fixed some errors, but still three machines had this problem and I couldn’t seem to find out why as everything did look ok. I checked the WMI, DCOM, update to CU1 and all seemed to be correct.

How to fix the console error

This then took me to the SMSAdminUI.log file usually located in this directory:

C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\AdminUILog

When I looked in here I had on all three machines the following errors:

The performance counter ‘# result objects in memory’ was not found

The performance counter ‘# exceptions’ was not found

The performance counter ‘# images’ was not found

This lead me to believe that the performance counter was corrupt. So, to fix this, I fully uninstalled the SCCM Console, once uninstalled, I run the following command on the affected machine:

LODCTR /R

Once complete, you should get a message as per below:

SCCM Console not connecting to the database 4

You should now re-install the SCCM Console and apply any necessary hotfixes (i.e. CU1) and you should now find that your console will open successfully.

Feedback

If you have any feedback on this guide, please feel free to leave us a message below in our comments section.

Install System Center Endpoint Protection (SCEP) During SCCM OSD Task Sequence Process

sccm logo

As stated in my previous post, I have been asked recently about installing Endpoint Protection (SCEP) during the SCCM OSD process. This is pretty easy to do and the knock on affect is that you also can have SCEP available to install from your Software Catalog.

To prepare the SCEP software for deployment in your OSD task sequence and also for making SCEP available in your Software Catalog, please see the instructions in my previous post below:

Install Endpoint Protection (SCEP) using the SCCM Software Catalog

Once you have completed this task and confirmed that it is working by installing to a test machine from your Software Catalog, you are now ready to add this installation step to your OSD task sequence.

To do this, you need to add an “Install Application” step towards the end of your task sequence and after the Configuration Manager client has been installed.

Once you have added the “Install Application” step, you need to give your step an appropriate name as below and then click the yellow star to add the SCEP application.

Install System Center Endpoint Protection (SCEP) During SCCM OSD Task Sequence Process 5

Then select the System Center Endpoint Protection from your own list of applications:

Install System Center Endpoint Protection (SCEP) During SCCM OSD Task Sequence Process 6

You should then have a step like below:

Install System Center Endpoint Protection (SCEP) During SCCM OSD Task Sequence Process 7

Now when your task sequence gets to this step, it will install the System Center Endpoint Protection with the default policy applied.

If you have any questions about this guide, please feel free to leave a comment and I’ll assist when I can.

Install System Center Endpoint Protection (SCEP) using the SCCM Software Catalog

sccm logo

]I’ve had a few requests recently asking whether it is possible to install System Center Endpoint Protection (SCEP) during the task sequence for an operating system deployment. I’ve also been asked if it is possible to put SCEP into the Software Catalog. Well, the answer to both questions is yes and I’ll be breaking the … Read more

How to add an icon to your SCCM Software Catalog Applications

System Center Configuration Manager SCCM

If you have a Software Center in your SCCM environment, you will want it to look as professional as possible.

There are a number of ways to do this, one is to add your corporate name, setup your customise colours, but to top it all off, you can add an icon to each application.

There are a few ways that you can do this, but this guide details the way that I use, it may not be the best way, but it works for me so I thought I’d share it with everyone else.

First of all, you need to create an open share on a server, somewhere that all users have at least read access to. I have a distribution server for all my applications so I have created a new folder on this server and given read access to all Authenticated Users.

Then, you can use the following website to find almost any software icon that you may use in your application catalog:

Icon Archive

Once you have gathered your .ico file (remember to download the .ico files and not JPG’s etc..) you should place it into your open share folder. Once you have your icons ready, you can now add them to your applications in SCCM.

To do this, go into your SCCM Console and into your application. You should then go into the Properties and click the Application Catalog tab. At the bottom of this page, you will see an Icon area and you can then Browse to the location where you had previously saved your .ico file.

How to add an icon to your SCCM Software Catalog Applications 8

Once you have selected the correct .ico file for your application, it should appear as a little picture on this page as you can see above. When you are happy you have the correct one, click OK and then go back into your Software Catalog.

As you can now see from below, you should now have a professional looking icon in your software catalog which all your users should be able to see:

How to add an icon to your SCCM Software Catalog Applications 9

If you have any questions in relation to this blog post, please leave a comment and we’ll get back to you when we can.

SCCM Global Condition Setup

System Center Configuration Manager SCCM

I had been given a task to build a Software Catalog application where Outlook must be closed to allow the successful installation of the software. We had previously just packaged the software and made it available to the Software Catalog with a message stating that users must first shut down Outlook before attempting to run the installation.  

However, like most users, they ignored the message, left Outlook open, ran the software installation and then complained when the software wasn’t immediately available to them!   So, the task was fairly simple, setup the Software Catalog application so that if a user had Outlook open and they tried to run the application installation, it would fail, if they had Outlook closed, it would run.

I started to come up with some weird and wonderful methods of doing this involving batch files and other such ways, but then I started to think in more simple terms – Global Conditioning and Powershell.   First, you need to use Powershell to identify the process that you want to check is running or not.

To do this (and using the example of Outlook for this purposes but this can be used for any running process…), start-up Outlook to ensure it is a running process. Then, go into Powershell and type in the following command:

 get-process

This will now list all the running processes on your machine, if you look down the list, you will find the process name for Outlook, which conveniently is called OUTLOOK (obviously not all process will be as easy to find..):

SCCM Global Condition Setup 10

Once you have the name of the process you are trying to work with, you can now use Powershell to output a true or false value for if that process is running on the target machine or not. So, for a quick demo, in Powershell (with Outlook still open) type in the following command:

[bool] (get-process OUTLOOK -ea 0)

This should now return a value of: True

SCCM Global Condition Setup 11

If you close Outlook down and run the command again, you should see that it now returns a False value.

So, now that we know how to use Powershell to return a true or false value, we can create a Global Condition in SCCM.

To do this, go into your SCCM console > Software Library > Global Conditions. You can then create a new Global Condition. You should then complete the settings as you wish, but you must have the Setting Type as Script and the Data Type as Boolean. Once you are happy with your setup, click the Add Script Button:

SCCM Global Condition Setup 12

You should then ensure that you select Windows Powershell and enter the script that we used earlier to report if the variable is True or False:

SCCM Global Condition Setup 13

  You can now click the OK buttons to save your new custom Global Condition.   Now that you have your new Global Condition, you can use it as a Requirement setting in your applications. This is a slightly strange example but hopefully you will understand, but if you wanted to make 7-Zip available in your Software Catalog, but you wanted to ensure that Outlook was not open before allowing the software to run, you should build your application as normal, however, under Deployment Types and then Requirements, you can now add the Global Condition:  

SCCM Global Condition Setup 14

Once you have clicked the Add button you can Create your requirement by selecting the following:  

Category: Custom

  • Condition: (the name of the Global Condition you have just created)
  • Rule Type: Value
  • Operator: Equals
  • Value: False   So, you should have a requirement that now looks like this:  
SCCM Global Condition Setup 15

This means that this software now has a requirement that the Powershell script that will run as part of the Global Condition must return a False value to allow the software to run.   You can now complete your application as normal and deploy to your users.

You should now notice that if Outlook is left open, the software will not attempt to install and fail. If you close Outlook, it will run successfully.   If you have any questions and further requests into this type of configuration, please leave a comment and I’ll reply when I can.

Email Notification at the end of a SCCM OSD Task Sequence

sccm logo

I have been working on a method to send our helpdesk an email notification when an OSD task sequence has completed.

I started by looking into using the Status Filters and Powershell but this didn’t seem to work well enough for what I wanted to do, which was to create a fancy looking email by using HTML for the outputed email.

So, I decided that as I have MDT integrated into my SCCM environment, I could use the Execute Runbook step and design a solution in Orchestrator.

Instructions

To do this, I created a new runbook in Orchestrator with two very simple steps, Initialize Data and Send Email and then link them together…

Email Notification at the end of a SCCM OSD Task Sequence 16

In the Initialize Data part, I added the OSDComputerName variable so that I could use that information in my email to be sent….

Email Notification at the end of a SCCM OSD Task Sequence 17

I’m not going to share my email settings as these are very personalised to almost every different setup so you can setup your own settings under the Send Email options, but remember that you can use HTML to design our email and you can use the Published Data to input the OSDComputerName of the machine that is being built by the task sequence where you will execute this runbook.

Once you have your runbook setup and you have checked it in, you can now edit your SCCM OSD task sequence. You should add your Execute Runbook right at the end of your task sequence (remember to add the Use MDT Toolkit Package step before you run the Execute Runbook step)…

Email Notification at the end of a SCCM OSD Task Sequence 18
As you can see from above, after you have added your Use MDT Toolkit Package, you should then add the Execute Runbook step (you can then rename it something more appropriate like I have above) and enter the settings like below:
Email Notification at the end of a SCCM OSD Task Sequence 19

As you can see, I’ve blocked out my Orchestrator Server but you obviously enter your own server name here. You can then browse to your runbook which will then give you the option to specify the OSDComputerName variable which should be entered as:

%_SMSTSMachineName%

You can then save your task sequence and when you run the process, at the end it should send the email you created under the Send Email option in Orchestrator.

Feedback

If you have any questions about this process, leave a comment and I’ll get back to you when I can.

Orchestrator Not Showing Newly Created Folders or Runbooks

SCORCH Logo

I ran into an issue today where my newly created folders and runbooks in Orchestrator were not showing up in my SCCM (MDT) Execute Runbooks task sequence.

I started to run some checks and found out that these folders and runbooks were not showing up in my Orchestrator Web Console either, although all my previous ones were showing.

After much frustration, I came across a simple fix….

If you have this issue, login to your SQL server where your Orchestrator database sits and run the following query on the database:

TRUNCATE TABLE [Microsoft.SystemCenter.Orchestrator.Internal].AuthorizationCache

Once you have run this query on your Orchestrator database, fresh your Web Console and if required, your Configuration Manager Console and you should now see all your newly created folders and runbooks.

SCCM 2012 SP1 CU1 Client Version Queries

sql2016

With the release of CU1 for System Center, you will notice that your Configuration Manager clients version will have changed to 5.00.7804.1202 from 5.00.7804.1000

If you would like to identify which of your clients have updated to the new version, you can use the query below:

select
 SMS_R_SYSTEM.ResourceID,
 SMS_R_SYSTEM.ResourceType,
 SMS_R_SYSTEM.Name,
 SMS_R_SYSTEM.SMSUniqueIdentifier,
 SMS_R_SYSTEM.ResourceDomainORWorkgroup,
 SMS_R_SYSTEM.Client
 from 
 SMS_R_System
 inner join
 SMS_G_System_SMS_ADVANCED_CLIENT_STATE
 on 
 SMS_G_System_SMS_ADVANCED_CLIENT_STATE.ResourceId = SMS_R_System.ResourceId
 where 
 SMS_G_System_SMS_ADVANCED_CLIENT_STATE.Version = "5.00.7804.1202"

You can also use the same query with a slight change to identify clients that have not yet updated to the latest version:

select
 SMS_R_SYSTEM.ResourceID,
 SMS_R_SYSTEM.ResourceType,
 SMS_R_SYSTEM.Name,
 SMS_R_SYSTEM.SMSUniqueIdentifier,
 SMS_R_SYSTEM.ResourceDomainORWorkgroup,
 SMS_R_SYSTEM.Client
 from 
 SMS_R_System
 inner join
 SMS_G_System_SMS_ADVANCED_CLIENT_STATE
 on 
 SMS_G_System_SMS_ADVANCED_CLIENT_STATE.ResourceId = SMS_R_System.ResourceId
 where 
 SMS_G_System_SMS_ADVANCED_CLIENT_STATE.Version = “5.00.7804.1000″

More Queries

Our full range of SQL and WQL Collection queries are available here.

Feedback

If you have any questions or feedback about this post, or if you would like us to create any queries for you, please go ahead and leave us a message below in the comments section and we will get back to you as quick as we can.

RSAT and RDCM for Windows 8

Microsoft Blue Logo

I’ve now taken the plunge and installed Windows 8 Enterprise on my testing laptop and I’m actually quite happy with it after spending the last few months moaning about my Windows 8 Home Premium laptop!

Some of the features are excellent and I’m getting used to not having a Start Menu (adding everything I need to my taskbar!). I’ve also now installed RSAT and Remote Desktop Connection Manager and both work fine so I’m pretty happy about that.

In case anyone is having any issues in finding either RSAT or RDCM for Windows 8, the links are below:

RSAT for Windows 8

RDCM for Windows