Collection of Virtual Machines

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 where SMS_R_System.ResourceId not in (select SMS_R_SYSTEM.ResourceID from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.Model like "%Virtual%")

Offline Serving a WIM without SCCM

Recently, I came across a problem while setting up OSD at one of my clients: I was unable to use install Windows 7 on a variety of their systems using the drivers from the manufacturer.  Specifically, with the Lenovo T440s, it would fail when booting up the first time, after successfully applying the driver pack.

The error read: Windows could not configure one or more system components.  To install Windows, restart the computer and then restart the installation.

This problem is caused by the drivers some of these newer systems are using, and their reliance on an updated version of the Kernel Mode Driver Framework.  The best approach, in my opinion, is to add the latest hotfix to the WIM so that Windows is ready when the drivers come down.  Normally this could be accomplished through the ConfigMan console with offline servicing.  However, my current client isn’t using SCCM for patching, so our site doesn’t have a SUP.  Furthermore, all I’m doing here is an OSD build out, so I’m not going to go setting one up.  Instead, I’m going to inject the hotfix the same way SCCM does, just manually.  This is also useful if you’ve ever just wondered what goes on under the hood.

To start, we’ll need the latest KMDF from Microsoft:

Once you’ve downloaded it to your SCCM server, you’ll need to extract it using a tool such as 7zip:

.\7za.exe x kmdf-1.11-Win-6.1-x64.msu


Also, we’ll need to find our WIM.  If you don’t know which image index you’re after, you can retrieve it using dism /get-wiminfo /wimfile:F:\source$\OSD\WIMs\MYWIM.wim like I did here.


Mount it using DISM:

dism /mount-wim /wimfile:F:\source$\OSD\WIMs\MYWIM.wim /mountdir:E:\Scratch /index:1


Inject the hotfix you extracted earlier:

dism /image:E:\Scratch /add-package /Packagepath:F:\source$\Hotfix\KMDF1.11


Since I still had the .MSU file in my directory, I got an error, but the hotfix (KB2685811) did install properly.  I can verify this with DISM:

dism /get-packages /image e:\scratch


Now all that’s left to do is unmount and commit:

dism /unmount-wim /mountdir:E:\Scratch /commit


That’s it!  Once it unmounts, just update your distribution points and we’re ready to support newer drivers for newer models.


Configuring Server 2008 x86 for use as a Distribution Point

So, I’m running into an interesting problem:

I have about 20 servers that are running 2008 SP2 x86 that are in remote offices that will be used as DPs in my customer’s 2012 site.  Installation is going well, and everything is working perfectly, except for these recurring errors in SMS_SITE_COMPONENT_MANAGER:

Severity,Type,Site code,Date / Time,System,Component,Message ID,Description
Error,Detail,PRI,8/1/2013 11:03:23 AM,PRIMARYSITESERVER.DOMAIN.local,SMS_SITE_COMPONENT_MANAGER,1039,Site Component Manager detected that the site server does not contain the binary files for the platform (processor architecture) of site system “\\REMOTEDP.DOMAIN.LOCAL”. Possible cause: When installing this site, you did not specify that the binary files for this site system’s platform should be installed on the site server. Solution: Use Configuration Manager Setup to modify the configuration of this site. When asked to select the server platforms for this site, select this site system’s platform. Possible cause: You accidently configured the site to use the wrong computer as a site system. Solution: Remove this site system from the list of site systems for this site, and add the correct site system to the list. The list appears in the Site Systems node of the Configuration Manager Console. Possible cause: The site system is turned off, not connected to the network, or not functioning properly. Solution: Verify that the site system is turned on, connected to the network, and functioning properly. Possible cause: Site Component Manager does not have sufficient access rights to remotely administer the site system. Solution: Verify that the Site System Installation accounts are properly configured to allow the site to remotely administer the site system. Possible cause: Network problems are preventing Site Component Manager from properly accessing to the site system. Solution: Investigate and correct any problems on your network.


I’m getting one every hour for each of the 2008 x86 servers.

WQL query to create a collection of newly installed systems

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_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceId = SMS_R_System.ResourceId where (DateDiff(day, SMS_G_System_OPERATING_SYSTEM.InstallDate, GetDate()) < 30)


Uninstall Internet Explorer 9 from Systems

Recently, I had to uninstall IE9 from a bunch of production machines for a client whose site I am working at. Because of other mitigating circumstances, this had to be done during the day, with notification to the user and without forcing a reboot. After a little bit of digging, I stumbled upon MS article 2579295, and after a little tweaking I was able to create a program with this command:

FORFILES /P %WINDIR%\servicing\Packages /M Microsoft-Windows-InternetExplorer-*9.*.mum /c “cmd /c echo Uninstalling package @fname && start /w pkgmgr /up:@fname /quiet /norestart”

Worked well executed in both a task sequence and as a program. Cheers.

Uninstalling Java Versions

Need to uninstall Java on a series of machines?  Either because, you need to do a fresh install, or updates are failing?  Or maybe your client is a public school system that has a mandate to remove all JRE 6 versions because of security issues?  …yeah that’s the one.

Remove JRE 6

wmic product where "name like 'Java(TM) 6%%" call uninstall /nointeractive

That’s the script that went into my package that I recently finished running on about 15,000 systems or so.  If you’d like to remove them all, you can do that too.

Remove all Java

wmic product where "name like 'Java%'" call uninstall /nointeractive