Thursday, 9 September 2010

Managing conflicting records and duplicate GUIDs in Configuration Manager 2007

Thanks to elmunjo for this one!!!!!


General

ConfigMgr uses an ID that is generated on the Client to identify a machine inside the ConfigMgr hirarchy. This ID, also known as SMS GUID is generated during ConfigMgr Client installation.
An Algorithm, which combines the Timestamp (Time of ConfigMgr Client Installation) and the Universally Unique Identifier (UUID) is used to generate a unique Identifier.
A Client generates a new SMS GUID if the following things change


•the SMBIOS serial number
•the Machine SID
•the Hardware ID (see appendix)
There are several scenarios that may lead to problems with records in the ConfigMgr database.


Conflicting Records

Reinstallation of the operating system or changes to the Hardware components. In these cases a new SMS GUID is generated by the client and Conflicting Records are created. Conflicting records in ConfigMgr mean multiple DB records for one machine.
Conflicting records are created only in sites that run in ConfigMgr mixed mode. While in native mode, clients authenticate via certificates and thus when reinstalling a native mode client it gets a new certificate which contains the same subject (normally the Netbios computername).
Circumstances that trigger generation of a new Hardware ID:


1. some aspects accountable for the Hardware ID have changed.


There‘s 10 criteria monitored for Desktops, if 3 of them change, the ID also changes. For Notebooks 2 of 7 criteria have to change. The criteria are explained below.

2. the SMBios serial number has changed
3. the Computer SID has changed


In these cases the new HardwareID implies creation of a new SMS GUID what is why we get multiple entries in the ConfigMgr DB for just one machine.
The second scenario that leads to duplicate entries is the reinstallation of the operating system on existing hardware.


In both cases ConfigMgr reacts in the following way:
The Client is issued a new SCCM GUID, but the Hardware ID stays the same. A second record is created in the DB, a so called conflicting Record. SCCM 2007 can manage these Records automatically. In that case the old record is marked as obsolete and deleted according to the Delete obsolete Client Discovery Data Maintenance Task (Default= 7 days). If the site is not configured to handle conflicting records (Site Properties/ Advanced), both records are shown under the conflicting records node in the ConfigMgr console and the Administrator has to manually choose the method for managing these records. The easiest way would be a merge, which combines the old & new records to one while preserving all information of the older record.

How to Manage Conflicting Records for Configuration Manager Clients:
http://technet.microsoft.com/en-us/library/bb693963.aspx

Problems that can occur through conflicting records

Using the automatic method of ConfigMgr, a new record is always created and the old one is marked as obsolete. That means the history of the client is lost (Inventory etc.) and direct collection memberships won’t work anymore, as the collection contains the old client. Customers that make intense use of static collections cannot use this method. If you want to use merge mode this is always a manual action. Both records will stay under the node Conflicting Records. Management of this client is not possible until the administrator manually resolves the conflict.

Further methods for handling these records

Large ConfigMgr implementations will need other ways of handling these records. Microsoft has designed this procedure with respect of the security concerns. If the site was configured to automatically merge all conflicting records, it would be possible for an attacker to take over the identity of an already installed SCCM Client that is part of the ConfigMgr hierarchy. If you are not concerned with this kind of thoughts you can use a script to achieve auto merge functionality:
http://kristianfthomsen.spaces.live.com/blog/cns!59A30145A64F8A9F!156.entry

To avoid conflicting records during Wipe&Load installations, you can use the SMS Tool Tranguid. Tranguid can save the old GUID during the tasksequence before reinstalling the machine. Afterwards this file(Smscfg.ini ) is copied to thenew client which then uses the old GUID for communication with the ConfigMgr components.
http://technet.microsoft.com/en-us/sms/bb676787.aspx

Duplicate GUIDs

Cloning of Harddisks with installed ConfigMgr client, renaming a computer or DualBoot configurations may lead to duplicate GUIDs, which is absolutely not the same thing as conflicting records.

http://blogs.technet.com/carlossantiago/archive/2008/06/18/are-duplicate-guids-and-conflicting-records-the-same-thing.aspx

Duplicate GUIDs can occur in both site modes.

Duplicate GUIDs occur when
• Harddisks are duplicated with installed SCCM Client
• Computers are renamed with installed SCCM Client
• Computers are configured to dualboot, using the same PCName and having the SCCM Client installed in both configurations
In those cases multiple machines use the same record in the ConfigMgr database. ConfigMgr does not handle these records automatically. There is a predefined report showing possible conflicts:

Computers that may share the same SMS Unique ID (Nr. 71 assuming SP2)

Problems that can occur through duplicate GUIDs

Clients, that share one database record cannot be managed correctly. A collection will always show the client with the most recent discovery record. That means, the machine corresponding to the Collectionmember continiously changes. Thios is why software distribution to these clients will not be possible.

Methods for handling these records

As ConfigMgr anly offers a report to show the conflicts, but does not offer any means of remediation, the admin is forced to use other methods. There is a whitepaper from Microsoft for handling Duplicate GUIDs with SMS 2003 which is still valid:

http://www.microsoft.com/downloads/details.aspx?FamilyID=aaf6f10d-bd84-405e-9af3-b48ced1d7f2d&DisplayLang=en

The proposal is to generate a collection containing all DB records with duplicate GUIDs and then advertise a package that executes TRANGUID on the client and restarts the SMS Agent Host. The client will register with a new GUID. When the package has reached all machines, the collection will be empty.

Tuesday, 17 August 2010

Excluding Users using USMT 4.0 in SCCM SP2

Copied the following Article from http://t3chn1ck.wordpress.com/2010/08/13/excluding-users-using-usmt-4-0-in-sccm-sp2/

Excluding Users using USMT 4.0 in SCCM SP2


When it comes to backing up user data with USMT 4.0 [hardlinking] in SCCM, there are a few things that most people will want to do. Such as excluding local computer accounts and excluding domain user profiles older than XX days. It took a couple of days to get this figured out since there was no one blog post or forum topic which seemingly discussed both of these options.

First things first, read this excellent blog post on How to use USMT 4 hardlinking in a Configuration Manager 2007 Task Sequence

Now, USMT uses Scanstate.exe and Loadstate.exe to backup and restore users [respectively]. Local users can be excluded using switch /ue and old domain user profiles can be excluded using switch /uel. However, both of these switches cannot be used at the same time because of a precedence order. For more information, read Understanding USMT 4.0 Behavior with UEL and UE. So, to exclude local users and old domain users, set task sequence variables

•OSDMigrateAdditionalCaptureOptions = /nocompress /hardlink /uel:30 (or however many days you want it to be)
•OSDMigrateAdditionalRestoreOptions = /nocompress /hardlink /ue:%computername%\*

But there is also an undocumented problem. SCCM adds to the Scanstate/Loadstate parameters, specifically adding the /all switch which says to backup/restore ALL USERS. This completely goes against being able to use the /ue and/or the /uel switches and will cause scanstate/loadstate to fail!! So what must be done to fix the problem is to

1.Select the step to Capture User Files and Settings
2.Select option “Customize how user profiles are captured”
3.Click the Files… button
4.Add files MigUser.xml, MigApp.xml
5.Repeat the above steps for Restore User Files and Settings

USMT Best Practices states to not use MigUser.xml and MigDocs.xml together, so I’ve removed MigDocs from step 4.

Friday, 23 July 2010

USB Fob creation for OSD

Instructions to modify SSCM Win7 installation Fob to work on nearly every computer.

The installation Fob created by SSCM simply takes too long if your Task sequnece is quiet large.
The process listed below will create a new fob that achives the same like creating it from SCCM , but just much quicker.

The process requires the flashdrive crated by SSCM that will be called SSCM-Fob, and a hardware duplicate flashdrive we will just call Fob.

For easy creation of new duplicate flash drives the hardware should be as close to the SSCM-Fob as is possibly, and cannot be any smaller and size.

It should be at least 100mb more if from a differente manufacturer to account for varience.

Also a Windows 7 installation DVD will be needed.

1. Insert Fob into the system and backup all the data from the USB as we are going to format the to make it as bootable.

2. Open elevated Command Prompt.
To do this, type in CMD in Start menu search field and hit Ctrl + Shift + Enter. Alternatively, navigate to Start > All programs >Accessories > right click on Command Prompt and select run as administrator.

3. When the Command Prompt opens, enter the following command:

DISKPART and hit enter.

LIST DISK and hit enter.

Once you enter the LIST DISK command, it will show the disk number of your USB drive.

4. In this step you need to enter all the below commands one by one and hit enter.

SELECT DISK 1 (Replace DISK 1 with your disk number)

CLEAN

CREATE PARTITION PRIMARY

SELECT PARTITION 1

ACTIVE

FORMAT FS=NTFS

ASSIGN

EXIT

Don’t close the command prompt as we need to execute one more command at the next step. Just minimise it.

5. Insert your Windows DVD in the optical drive and note down the drive letter of the optical drive and USB media. Here I use “D” as my optical (DVD) drive letter and “H” as my USB drive letter.

6. Go back to command prompt and execute the following commands:

D:
Where “D” is your DVD drive letter.

CD BOOT and hit enter.

BOOTSECT /NT60 H:

(Where “H” is your USB drive letter)

Exit

7. Copy SSCM-Fob contents to Fob.


Note that this bootable USB guide will not work if you are trying to make a bootable USB Fob on a XP computer.

Thanks goes out to Mark D for coming up with this for me.

Monday, 12 July 2010

Importing E4310 Drivers into SCCM issue

I experienced an issue where I simply could not import any NIC drivers for a Dell E4310. Anyway after doing some research I came across this little gem:

http://social.technet.microsoft.com/forums/en-US/configmgrosd/thread/30b382fa-58d0-4d80-9675-d8bc803af57d/
Thank you jboehlke926 !!!!!!

I decided to edit the .inf file in the Dell driver. Here is the way the file looks now, what I did (bold) was to remark some lines and change one other line so that the only section was [Intel] as mentioned in the threads above.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[Manufacturer]
;%Intel% = Intel, NTx86.6.0, NTx86.6.0.1
%Intel% = Intel

[ControlFlags]


[Intel]

;[Intel.NTx86.6.0.1]
; DisplayName Section DeviceID
; ----------- ------- --------

%E10F5NC.DeviceDesc% = E10F5, PCI\VEN_8086&DEV_10F5
%E10F5NC.DeviceDesc% = E10F5, PCI\VEN_8086&DEV_10F5&SUBSYS_10F58086

;Dell
%E10F5NC.DeviceDesc% = E10F5, PCI\VEN_8086&DEV_10F5&SUBSYS_02331028
%E10F5NC.DeviceDesc% = E10F5, PCI\VEN_8086&DEV_10F5&SUBSYS_02341028
%E10F5NC.DeviceDesc% = E10F5, PCI\VEN_8086&DEV_10F5&SUBSYS_024D1028
%E10F5NC.DeviceDesc% = E10F5, PCI\VEN_8086&DEV_10F5&SUBSYS_024F1028
%E10F5NC.DeviceDesc% = E10F5, PCI\VEN_8086&DEV_10F5&SUBSYS_02501028
%E10F5NC.DeviceDesc% = E10F5, PCI\VEN_8086&DEV_10F5&SUBSYS_02771028

%E10BFNC.DeviceDesc% = E10BF, PCI\VEN_8086&DEV_10BF
%E10BFNC.DeviceDesc% = E10BF, PCI\VEN_8086&DEV_10BF&SUBSYS_10BF8086
%E10CBNC.DeviceDesc% = E10BF, PCI\VEN_8086&DEV_10CB
%E10CBNC.DeviceDesc% = E10BF, PCI\VEN_8086&DEV_10CB&SUBSYS_10CB8086

;[Intel.NTx86.6.0]
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>


After that, I was able to successfully import the Win7 driver into my driver package, update the DP.

Thursday, 24 June 2010

Duplicate PC's or GUIDS in my SCCM

THANKS TO James C Avery for this one!!!! SAVED ME A LOT OF TROUBLE

Have you ran across where you keep seeing PC's show up in your Collections with duplicate names and every time you update and refresh the collection you'll see a different set of PC's show duplicates.

I was seeing this happen while at a customer and it turned out they imaged a machine with ghost and then used that image over and over and over. Well, if they don't prep that machine correctly with sysprep and the have the SCCM or SMS client already installed, this will cause a problem that you could be tracking down for days.


To resolve this issue, let's see how many duplicates you have. Create a collection and add the following 3 queries as part of the collection. Then update and refresh your collection.

Query 1
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 ClientVersion = "2.50.4160.2000" or Client is NULL


Query 2
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 join SMS_G_System_System on SMS_R_System.ResourceID = SMS_G_System_System.ResourceID where SMS_R_System.Name <> SMS_G_System_System.Name



Query 3select 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 in (select SMS_GH_System_System.ResourceID from SMS_G_System_System join SMS_GH_System_System on SMS_G_System_System.ResourceID = SMS_GH_System_System.ResourceID where SMS_G_System_System.Name <> SMS_GH_System_System.Name)

Now you should have a list of machines showing duplicate GUIDS in your database. Just FYI, this isn't always the most accurate, but this allows you a starting place to attach the problem.

Next let's start attacking the problem, you know everyone has to start somewhere.


Create some scripts to fix this issue.


Create a directory called "FixMyGuids"
In that directory download the PSTOOLS from Microsoft. http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx

Download the Sleep.exe

Download the SMS 2003 Toolkit 2 http://technet.microsoft.com/en-us/sms/bb676787.aspx

Now create these batch files:
"CallFinalProcess.bat" Call FinalProcess.bat Call FinalProcess.bat Call FinalProcess.bat Etc….

"FinalProcess.bat" echo starting the FixMyGuid batch file 1copy /Y D:\DATA\Package$\FixMyGUID\fixmyguid.bat file://%251/c$./PSTools/psexec -accepteula file://%251/ -u deops\ -p /s c:\fixmyguid.bat
"FixMyGuid.bat" @echo off echo starting the FixMyGuid batch file 2 echo copy sleep.exe file copy /Y \\\package$\FixMyGUID\sleep.exe %windir% sleep 10 /quiet echo copy tranguid.exe file copy /Y \\\package$\FixMyGUID\tranguid.exe %windir% rem sleep 10 /quiet echo copy CCMDelCert.exe file copy /Y \\\package$\FixMyGUID\CCMDelCert.exe %windir% sleep 10 /quiet echo running CCMDelCert to repair GUID %windir%\CCMDelCert.exe sleep 10 /quiet net stop ccmexec net start ccmexec rem rem @echo rebooting workstation in 20 seconds rem \\ name>\package$\FixMyGUID\Pstools\PSSHUTDOWN -r -f \\ name>


Now you have the Duplicate GUIDS collection created. Downloaded the files required to reset the GUIDS in the SMSCFG.INI file and created the scripts to download certain files and run exe's on the workstation to resolve the issue.



What I would have liked to add is the last scripts a command to restart the workstation. If your calling the script and you know that no one is on that pc, you can remove the REM commands at the end. We're nearing the end of the process, we need do the following to prepare for deployment.


Go to SCCM Reports and run report #130 from the Duplicate GUIDS collection. Export the list to a CSV file and clean the file up. Then add "Call FinalProcess.bat" before the computer name as shown in #2. Copy and Paste the list to the CallFinalProcess.bat file Open a CMD Prompt and run CallFinalProcess.bat file form the server.

On average you'll have to give the machines at least 5 minutes to update before you'll see the difference on SCCM. Nothing will hurt if you would like to update and refresh the Duplicate GUID collection.

Also, you may have to run the process several times throughout a week or more since some laptops will be disconnected or not turned on.

Tuesday, 22 June 2010

Troubleshooting during OSD process

Thanks to Dave ( my collegue from Indy) for this!

Anytime the OSD process is in the WinPE state (up to the reboot to OS that displays the Win7 logo), you can hit the F8 key and a DOS window will appear. As long as the window is open, the imaging process will not reboot.
That means you can read logs and/or copy files off to a network share.

Create a network share: In the DOS window run the command net use q: \\server\share

Read logs: In the DOS window first type cd\ , then trace32 , click Yes. Now use the mouse to open a log file.

NOTE: See below for log file locations during OSD. They move around a lot depending upon where in the task sequence you are. Alternatively, map a drive as described above then copy and read the files off line.

The root of all Task Sequence troubleshooting is called smsts.log -- and this log is always the first step to troubleshooting any TS issue -- if you have an issue, look in here first!

Unfortunately, the smsts.log can be stored in one of 7 locations, depending on the stage of the build and the architecture of the OS:

WindowsPE, before HDD format:
x:\windows\temp\smstslog\smsts.log

WindowsPE, after HDD format:
x:\smstslog\smsts.log and copied to c:\_SMSTaskSequence\Logs\Smstslog\smsts.log

Full version windows, before SCCM agent installed:
c:\_SMSTaskSequence\Logs\Smstslog\smsts.log

Full version windows, after SCCM agent installed:
c:\windows\system32\ccm\logs\Smstslog\smsts.log

Full version x64 windows, after SCCM agent installed:
c:\windows\sysWOW64\ccm\logs\Smstslog\smsts.log

After Task Sequence has finished running
c:\windows\system32\ccm\logs\smsts.log

After Task Sequence has finished running(x64)
c:\windows\sysWOW64\ccm\logs\smsts.log


Checking Variable values: in the DOS window first type cd\ then type printtest.vbs .
Map a drive as described about and copy the file x:\osdvariables.txt off the computer to read. Alternatively, run the file test.vbs and read the variable one at a time in a pop up window, clicking OK or hitting Enter to go to the next one. NOTE: there are a LOT! This takes a while.

It is suggested that to read SCCM logs, you use the file trace32.exe.

http://www.experts-exchange.com/articles/OS/Microsoft_Operating_Systems/Server/Systems_Management_Server/SCCM-OSD-Basic-troubleshooting.html

Friday, 23 April 2010

Why do all packages get cached when steps to cache content from a specific package run

I have experienced an issue wheras USMT caches all Software Packages on the Distribution Server during the OS deployment Task sequence - even when the majority of packages are not needed.
In my opinion this is a bug and MS should really adress this.
in any case I have found this Blog entry and it solved the issue for me.

http://blogs.technet.com/osd/archive/2009/12/31/why-do-all-packages-get-cached-when-steps-to-cache-content-from-a-specific-package-run.aspx

Thursday, 8 April 2010

When using USMT 4 in SCCM OSD Task Sequence, files are captured successfully but settings are not!

When using USMT 4 in a Configuration Manager 2007 SP2 OSD Task Sequence, files are captured successfully but settings are not

Microsoft provided a really good working solution for this:

http://support.microsoft.com/kb/2018593

Thursday, 1 April 2010

Error " The hash value is not correct" when creating stand-alone TS media

Error " The hash value is not correct" when creating stand-alone TS media

Problem:
When creating a media from task sequence media wizard with cd/dvd or USB Hash mismatch error occures:

Error Creating Media. Error message is : The hash value is not correct.

Solution:
This error indicates that the files on the DP for one of the packages referenced by your task sequence does not match the hash we calculated when the package was imported. The CreateMedia log (in the AdminUILog directory) should indicate what package does not match. My guess is that it is your boot image (since we have seen some issues with this getting out of sync). Using the Manage Distribution Points Wizard try refreshing the boot image package on all distribution points and see if this fixes the problem.

And make sure you do "Refresh DPs" and not "Update DPs". You get to "Refresh DPs" from the "Manage DPs" wizard. "Update DPs" checks the versions number in the database to decide if new content needs to be copied to the DP. If the database thinks everything is OK, it will do nothing. "Refresh DPs" assumes something might be messed up on the DP and always copies the latest version out to the DP.

Do a refresh of the distribution point followed by and immediate update fo the DP. Sounds crazy but it has worked everytime for us.

Thank's to brothertu.blogspot.com for posting this originally

Tuesday, 30 March 2010

Laptops WinXP - NoSP3 - No KB893357

The below is a Query that shows
Laptops than run Windows XP , without SP3 installed and KB893357 missing!

select distinct 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_SYSTEM_ENCLOSURE on SMS_G_System_SYSTEM_ENCLOSURE.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SYSTEM_ENCLOSURE.ChassisTypes in ("8","9","10","14") and SMS_G_System_OPERATING_SYSTEM.Caption like "Microsoft Windows XP%" and SMS_G_System_OPERATING_SYSTEM.CSDVersion != "Service Pack 3" and SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName not like "Update for Windows XP (KB893357)"

Of course you can amend queries to fit your need , just posted this one as a reference.

Friday, 19 March 2010

Remove any KB with command line in Windows 7

To remove any KB in Windows 7 using a command line has changed from XP

Old Win XP command for removeing silently and force restart was:
%windir%\$NtUninstallKBXXXXXX$\spuninst\spuninst.exe /quiet /norestart

If you run this as part of a Task sequence make sure you select continue on error and add a Reboot to Currently installed OS as a next step as you want the Task sequence to control restarts.


For Windows 7 however it is:
%windir%\system32\wusa.exe /uninstall /kb:XXXXXX /quiet /norestart

If you run this as part of a Task sequence make sure you select continue on error and add a Reboot to Currently installed OS as a next step as you want the Task sequence to control restarts.

Thursday, 18 February 2010

USMT 4.0 vs USMT 3.0

Right!!
A big load of my mind...
USMT 4.0 does only work in these Scenarios

WIN7 to WIN7
Vista to Vista
Vista to WIN7
Win7 to Vista
WinXP to Vista
WinXP to WIN7

However it does not work for:
Win XP to Win XP
you have to create and use a USMT 3.0 Package for that!!

Wednesday, 17 February 2010

Capture and Restore Headache

Right!!!!

When using Capture and restore Task sequence for USMT there are a few things that no one tells you - but are crucial to keep your sanity - This one is probaly the most annoying!

You cannot capture user data from Win7 and restore it to any OS other that Vista or Win 7

Tuesday, 16 February 2010

USMT 4.0 and SCCM Working together Start to Finish Guide

USMT 4.0 and SCCM

1. Install the WAIK – or just the USMT on your Central Site Server (not Distribution Server)

2. Create a USMT package – pointing source files to C:\Program Files\Windows AIK\Tools\USMT ( if this is indeed where you installed the WAIK) - no program is needed

3. Distribute that package to all required Distribution Servers

4. Add the State migration Point role to your distribution Servers – and a folder will be created on the destination you specify, I have called the Folder UserStateMigrationData.

5. Make sure you share that folder on the Distribution Point and give Domain Users write access.

6. The Network Access acoount specified on your Central Site will need to have separate Full access rights to the share/folder.


Creating a task Sequence with USMT

1. Create a new task Sequence and select Install an existing Image package ( Wizard Driven)

2. Name your Task Sequence and select a Boot Image

3. Specify your Image package – for Win7 do NOT enter a Product key as this will be handled through the Authentication Services already in place on my network – enter a local admin password if required.

4. Configure your desired network Settings

5. Choose your standard Configuration manager Client Install and specify any installation Properties if you need to. In my case I have disabled changing of cache and site option and specified which Server locator point the client should have.

6. Select the State migration package Created earlier.

7. Please do not install any windows updates during the Task Sequence or any OSD process as this is not necessary and will only delay the OSD process. Once the Computer has been setup and the SCCM client installed , relevant updates will be using the SCCM client as a vehicle.

8. Click Next and you can choose to install any additional Software during the Task sequence - very useful if your Image is out of date and you do not want to create a new one from scratch. Or if you need to apply a Service pack e.g. Office 2007 SP2.

9. After going through the Summary screen and the Progress screen you will be presented with the Completion Screen

10. Currently there is a issue with KB974571 on all Windows XP/7 Clients when using USMT. This KB974571 will have to be uninstalled before this Task Sequence can run. A hot fix has been released by Microsoft for this issue – however it simply did not work for my environment. Read Hotfix

11. You can do that manual before running the Task sequence or create a package that can then be added into the task sequence to run first before continuing with backup up user settings.

12. Open your Task sequence and select Add – general – Run Command line

13. Specify your Task with the following details
Name: Uninstall KB974571
Command Line: %windir%\$NtUninstallKB974571$\spuninst\spuninst.exe /quiet /norestart
Package; Select your KB Uninstall package

14. A reboot is required but has to be initiated by the Task sequence and not by the Uninstall of the KB, so that is why a Restart command has to be the next step in the Task sequence. Simply go to Add – General – Restart Computer and select to boot into Current installed Operating System.

15. Advertise the Task sequence to a Collection that consists of Computers that need Imaging and it should capture users settings - save them on the Distribution point for that Boundary - applies the image – applies Network Settings – installs added Software – and restores user settings.

Tuesday, 9 February 2010

SCCM Client Log files

CAS.log
Content Access service. Maintains the local package cache.

CcmExec.log
Records activities of the client and the SMS Agent Host service.

CertificateMaintenance.log
Maintains certificates for Active Directory directory service and management points.

ClientIDManagerStartup.log
Creates and maintains the client GUID.

ClientLocation.log
Site assignment tasks.

ContentTransferManager.log
Schedules the Background Intelligent Transfer Service (BITS) or the Server Message Block (SMB) to download or to access SMS packages.

DataTransferService.log
Records all BITS communication for policy or package access.

Execmgr.log
Records advertisements that run.

FileBITS.log
Records all SMB package access tasks.

Fsinvprovider.log
Windows Management Instrumentation (WMI) provider for software inventory and file collection.

InventoryAgent.log
Creates discovery data records (DDRs) and hardware and software inventory records.

LocationServices.log
Finds management points and distribution points.

Mifprovider.log
The WMI provider for .MIF files.

Mtrmgr.log
Monitors all software metering processes.

PolicyAgent.log
Requests policies by using the Data Transfer service.

PolicyAgentProvider.log
Records policy changes.

PolicyEvaluator.log
Records new policy settings.

RemoteControl.log
Logs when the remote control component (WUSER32) starts.

Scheduler.log
Records schedule tasks for all client operations.

Smscliui.log
Records usage of the Systems Management tool in Control Panel.

StatusAgent.log
Logs status messages that are created by the client components.

SWMTRReportGen.log
Generates a usage data report that is collected by the metering agent. (This data is logged in Mtrmgr.log.)

Thursday, 4 February 2010

USer Driven OS deployment with Modena

Modena is a tool, developed by Microsoft IT, that enables the ability of an End-User Experience by using a powerful OSD Wizard.



When you are searching for a way to get your users “involved” in an OS Deployment, then I would recommend you to take a look at Modena.
The OSD Wizard of Modena can be changed in a lot of different way’s. As an administrator you can select which settings can be done by a user and which are pre-set. By these customizable settings you can think about things like computername, domain, local administrators, language, time, image, backup (via USMT 4.0) and the applications. The nice thing about the applications is that you can first do a scan of the computer to see what applications are currently installed.

Based on the results of this scan, applications can get pre-selected (or not). Besides al of these settings Modena also provides a better insight in what is happening with the computer during the Task Sequence.

To make a long story short, take a look at Microsoft Connect to get Modena: https://connect.microsoft.com/site868

Also take a look at the following links for setting up Modena…
1. Getting started with Modena – Step 1 – Installing Modena: http://blogs.technet.com/osd/archive/2009/12/15/getting-started-with-modena-step-1-installing-modena-rc2.aspx







…and take a look at these links for the story behind Modena.
General Cravings of OSD: http://blogs.technet.com/osd/



Wednesday, 27 January 2010

Computers not in AD for longer than 15 days

Query to find computers in the console that have not been on the Domain for the last 15 days

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.Name in (select Name from SMS_R_System where ((DATEDIFF(day, SMS_R_SYSTEM.AgentTime, getdate()) >=45) and AgentName = "SMS_AD_SYSTEM_DISCOVERY_AGENT")) and SMS_R_System.Name in (select Name from SMS_R_System where ((DATEDIFF(day, SMS_R_SYSTEM.AgentTime, getdate()) >=45) and AgentName = "Heartbeat Discovery"))

All Virtual Computers Query

All virtual Computers query


select SMS_R_System.Name, SMS_G_System_COMPUTER_SYSTEM.Manufacturer, SMS_R_System.SMSAssignedSites, SMS_R_System.IPAddresses, SMS_R_System.IPSubnets, SMS_R_System.OperatingSystemNameandVersion, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.LastLogonUserDomain, SMS_R_System.LastLogonUserName, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.NetbiosName 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.Manufacturer in ("VMware, Inc.","Microsoft Corporation")

Wednesday, 20 January 2010

Mount and modify a current WIM file

This is an incredibly valuable task


An admin can capture a custom .WIM windows image and mount the WIM to add/modify/remove files. Did you know you can also edit the registry?



  • Prerequisites

Before you can mount and manipulate an image with ImageX, you must perform the following tasks:


Install Windows OPK tools or Windows AIK tools on your technician computer.
Use ImageX to capture (and, optionally, to compress) your installation to an image (.wim) file.
Create a folder on the c drive and call it: mount



  • To mount an image

On your technician computer, at a command prompt, open the ImageX directory.
c:\Program Files\\Tools\
.
Mount the image. For read-only permissions, use
imagex /mount d:\imaging\data.wim 2 c:\mount
For read/write permissions, use
imagex /mountrw d:\imaging\data.wim 2 c:\mount
where c:\mount is the location of the mount directory, d:\imaging\data.wim is the name and the location of the .wim file to mount, and 2 is the reference number of the specific volume in the .wim file.
Now you can open the mounted Image just like a folder structure through explorer, but the best part is that you can also modify the Registry setting
Load the registry hive you need. In this case let's mount HKLM\Software under the TEST name to identify the String in the registry.
C:\mount>reg load HKLM\TEST c:\mount\windows\system32\config\software
The operation completed successfully.
Open Regedit to make changes under the TEST string
Unload the reg hive.
C:\mount>reg unload HKLM\test
Then Unmount the Image with Commit switch to apply the changes to the WIM file – make sure you have closed explorer windows etc.
On your technician computer, at a command prompt, open the ImageX directory.
c:\Program Files\\Tools\
where can be Windows OPK or Windows AIK and can be x86, amd64, or ia64.
Then type:
imagex /unmount /commit c:\mount

If you do not use the commit switch no changes will be saved.

Tuesday, 19 January 2010

Windows 2008 Server settings to change prior to any SCCM installation

When installing Windows Server 2008, I recommend making the following changes.

1. Run this command to keep the hibernation file from growing out of control (gigabytes!) Also works for Vista.
powercfg -h off

2. Go into Administrative Tools>Local Security Policy>Local Policies>Security Options and change Network security. LAN Manager authenticaton level to Send LM & NTLM - use NTLMv2 session security if negotiated.

3. Install IIS and add following features;

BITS
Remote Differential Compression
ASP.NET
ASP
Windows Authentication
IIS 6 Metabase Compatibility
IIS 6 WMI Compatibility

WebDav - please follow exact steps for configuring Webdav!

1.Enable WebDAV and create an Authoring Rule, as follows:

a.Navigate to Start / All Programs / Administrative Tools / Internet Information Services (IIS) Manager to start Internet Information Services 7 Application Server Manager.


b.In the Connections pane, expand the Sites node in the navigation tree, and then click Default Web Site if you are using the default Web site for the site system or SMSWEB if you are using a custom Web site for the site system.


c.In the Features View, double-click WebDAV Authoring Rules.


d.When the WebDAV Authoring Rules page is displayed, in the Actions pane, click Enable WebDAV.


e.After WebDAV has been enabled, in the Actions pane, click Add Authoring Rule.


f.In the Add Authoring Rule dialog box, under Allow access to, click All content.


g.Under Allow access to this content to, click All users.


h.Under Permissions, click Read, and then click OK.


2.Change the property behavior as follows:

a.In the WebDAV Authoring Rules page, in the Actions pane, click WebDAV Settings.


b.In the WebDAV Settings page, under Property Behavior, set Allow anonymous property queries to True.


c.Set Allow Custom Properties to False.


d.Set Allow property queries with infinite depth to True.


e.If this is a BITS-enabled distribution point, under WebDAV Behavior, set Allow hidden files to be listed to True.


f.In the Action pane, click Apply.

PXE settings for DHCP options

066 Boot Server Hostname - SERVER.FQDN.COM
067 Bootfile Name - \SMSBoot\x86\wdsnbp.com

On PXE server open WDS and make sure it is set to not respond to clients and delay of 1 second.
On SCCM Console set delay for PXE to 0 seconds and the Database access has to be a Network account - not a machine account

Monday, 18 January 2010

USMT does not work in Task Sequence

OSD Task Sequence Fails on requesting state storage - The reason for that is KB974571.

Uninstall that Patch from the Target Client and USMT will work fine.

Microsoft are still working on releasing a patch that fixes that issue as of 12th January 2010

Fix has been released:
http://support.microsoft.com/kb/977203/en-us

Boot with 64Bit and deploying 32Bit OS....

Well folks let me tell you that if you use a 64Bit WinPe and you want to deploy a 32Bit Operating system it will not work.

You have to use the same PE build as the OS you want to deploy.

Example error from my OSD Task sequence:
It is not supported to deploy an x86 architecture OS from a amd64 boot image Installation of image 1 in package EUR000E8 failed to complete.. The request is not supported. (Error: 80070032; Source: Windows)

Monday, 11 January 2010

Forward slashes and Percentage signs in Advertisements

Thanks to George for the article below:

We had a problem last month where advertised programs stopped getting pushed out

http://social.technet.microsoft.com/Forums/en-US/configmgrswdist/thread/087262f4-18e8-46a0-876d-77027b5a74ce/

Anyway, the upshot is do not use forward slashes and percentage signs in advertisement names. They are special characters in SQL and mess everything up!

Friday, 8 January 2010

How to delete a duplicate Computer entry on SCCM the database

To delete a duplicate Computer entry on SCCM the database

!!!!only when you cannot find the duplicate within the sccm console itself!!!!
Make sure the DB has been backed up before you continue

The example below looks for a duplicate called PCNAME and removes the non valid entry.

select name0 , count (*) from v_r_system GROUP BY name0 having count (*) > 1;.
Should show duplicates

select * from v_R_System where Name0 = 'PCNAME'
Should show duplicates and more details. You now choose which duplicate to remove ( in this case Resource ID 12989 because Active0 is NULL)

delete from v_R_System where ResourceID = 12989
Deletes the choosen entry

Use ALT-X to execute single lines in a query

SQL query to identify missing SMS/ConfigMgr boundaries

SQL query to identify missing SMS/ConfigMgr boundaries

This came up on the MSSMS list from myitforum. Here is the final result of the collaboration. Here is a SQL query you can use to help identify missing boundaries for clients that are discovered.



SELECT DISTINCT

-- v_R_System.Name0

--, v_R_System.Client0

--, v_RA_System_IPAddresses.IP_Addresses0

v_RA_System_IPSubnets.IP_Subnets0

--, v_RA_System_SMSAssignedSites.SMS_Assigned_Sites0

FROM v_R_System LEFT OUTER JOIN

v_RA_System_IPSubnets ON v_R_System.ResourceID = v_RA_System_IPSubnets.ResourceID LEFT OUTER JOIN

v_RA_System_IPAddresses ON v_R_System.ResourceID = v_RA_System_IPAddresses.ResourceID LEFT OUTER JOIN

v_RA_System_SMSAssignedSites ON v_R_System.ResourceID = v_RA_System_SMSAssignedSites.ResourceID

WHERE (v_RA_System_SMSAssignedSites.SMS_Assigned_Sites0 IS NULL)

AND (NOT (v_RA_System_IPAddresses.IP_Addresses0 IS NULL))

AND (v_R_System.Client0 IS NULL)

AND (NOT (v_RA_System_IPSubnets.IP_Subnets0 IS NULL))

order by v_RA_System_IPSubnets.IP_Subnets0

Tuesday, 5 January 2010

Collection of computers that don't have software X installed

Create a collection of computers that needs to have software x installed but doesn't have it according to hardware inventory (Add/Remove Programs)

Sometimes you want to create a collection that will find all the computers that don't have a particular software installed and push it to it. This is a good dynamic way to create a collection instead of direct computer addition.

Assuming you have Adobe Reader setup to install to all computers you can key this off of the Workstation collection or limit it to a OU collection. You notice that I use the "LIKE" condition instead of the "equals." I do this because you never know what version you might have. Look at Reader 7.09, even though you update your package with the latest reader you would need to change the collection.
This way it will always look for the computers with no reader. This is assuming of course, that you push the updates to reader and not uninstall and reinstall the whole application each time.
As the hardware inventory updates the computers will be removed from the collection at refresh time.

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_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId
where SMS_G_System_COMPUTER_SYSTEM.Name not in
(select distinct SMS_G_System_COMPUTER_SYSTEM.Name
from SMS_R_System
inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId
inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId
where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "%Adobe Reader 8%")

Collection of computers with a specific file or older version

Create a collection of computers that is based on a file found during Software inventory. these collections could be used to add a computer if the file is missing or if the file is the wrong date.

Sometimes you need to send a file to the computer multiple times. This is true with the Outlook.hol file. For those that are new to it, this file contains calendar entries for custom and standard information. Use this to file to give the dates of company vacations or events.
To acomplish this we will create a collection using 2 queries. This will pull in computers that are missing the file or have an old version of the file.
As the file changes add the package and changed the date in the query pull the computers back in.


Please note that you need to turn on File Inventory and search for the outlook.hol file.

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_SoftwareFile on SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SoftwareFile.FileName = "OUTLOOK.HOL" and SMS_G_System_SoftwareFile.FileModifiedDate < "20070206 23:00:00.000" ------------------------- Query 2: No HOL file ------------------ 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_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.Name not in (select distinct SMS_G_System_COMPUTER_SYSTEM.Name from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_SoftwareFile on SMS_G_System_SoftwareFile.ResourceID = SMS_R_System.ResourceId where SMS_G_System_SoftwareFile.FileName = "OUTLOOK.HOL")

Query to find all Laptops

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_SYSTEM_ENCLOSURE on SMS_G_System_SYSTEM_ENCLOSURE.ResourceID = SMS_R_System.ResourceId where
SMS_G_System_SYSTEM_ENCLOSURE.ChassisTypes in ( "8", "9", "10", "14" )

You may change this as needed here is the complete list from Micrsoft:
Value Description
1 Other
2 Unknown
3 Desktop
4 Low Profile Desktop
5 Pizza Box
6 Mini Tower
7 Tower
8 Portable
9 Laptop
10 Notebook
11 Hand Held
12 Docking Station
13 All in One
14 Sub Notebook
15 Space-Saving
16 Lunch Box
17 Main System Chassis
18 Expansion Chassis
19 Sub Chassis
20 Bus Expansion Chassis
21 Peripheral Chassis
22 Storage Chassis
23 Rack Mount Chassis
24 Sealed-Case PC

Monday, 4 January 2010

Best Free SCCM Tools

This time I want to devote a post to some of the best (free) tools for ConfigMgr 2007. These tools can make it a lot easier to manage, troubleshoot and develop you ConfigMgr 2007 environment.

SCCM Right Click Tools - SCCM Right Click Tools are an easy solution for managing all client action from the ConfigMgr Console by right clicking the client. Website: http://myitforum.com/cs2/blogs/rhouchins/archive/2008/04/09/sccm-right-click-tools.aspx

SCCM Client Center - SCCM Client Center is a tool to help troubleshoot and manage SCCM 2007 advanced clients (force inventory, show execution history, show running executions). Website: http://myitforum.com/cs2/blogs/rzander/archive/2009/11/30/sccm-client-center-v2-0-2-released.aspx

OSD++ - OSD++ is a better way to get input from the user and populate task sequences variables. Website: http://myitforum.com/cs2/blogs/jsandys/pages/osdplusplus.aspx

SMSMap - SMSMap is a freeware SCCM 2007 / SMS 2003 hierarchy drawing tool. It is an all-in-one solution for creating Visio drawings of any combination of SCCM 2007 and SMS 2003 site servers. Website: http://www.tondtware.com/default.htm

SCCMAutoDoc - SccmAutoDoc is a command-line utility that documents a System Center Configuration Manager 2007 site in a human-readable format. Website: http://scug.be/blogs/sccm/archive/2009/10/21/sccmautodoc-by-oscc-goes-beta-1.aspx

SCCM 2007 SDK - The SDK enables developers to build plug-ins for the Configuration Manager console, to build automation scripts for batch processing to the SMS Provider, and to manipulate client settings. Website: http://www.microsoft.com/downloads/details.aspx?familyid=064a995f-ef13-4200-81ad-e3af6218edcc&displaylang=en

SCCM-Tools.com – SCCM-Tools.com is a central place to find, request, and submit Configuration Manager 2007 tools. Website: http://www.sccm-tools.com/
BitsAdmin - BITSAdmin is a command-line tool that you can use to create download or upload jobs and monitor their progress. Website: http://msdn.microsoft.com/en-us/library/aa362813(VS.85).aspx

WMI Administrative Tools - WMI Tools include: WMI CIM Studio: view and edit classes, properties, qualifiers, and instances in a CIM repository; run selected methods; generate and compile MOF files. WMI Object Browser: view objects, edit property values and qualifiers, and run methods. Website: http://www.microsoft.com/downloads/details.aspx?familyid=6430F853-1120-48DB-8CC5-F2ABDC3ED314&displaylang=en

WMI Diagnosis Utility - WMIDiag.vbs is a VBScript script designed to help you ascertain the current state of the WMI service on a computer. Website: http://www.microsoft.com/downloads/details.aspx?familyid=d7ba3cd6-18d1-4d05-b11e-4c64192ae97d&displaylang

Friday, 18 December 2009

The following steps describe the overall process for booting into a boot image from the network

The following steps describe the overall process for booting into a boot image from the network:

1. The BIOS or Extensible Firmware Interface (EFI) of the computer signals a request to boot from the network.

2. PXE ROM gets an IP address from a Dynamic Host Control Protocol (DHCP) server and locates a server.

3. PXE ROM downloads a network boot program (NBP) by using Trivial File Transfer Protocol (TFTP). For EFI, skip to step 5.

4. The NBP downloads the operating system loader by using TFTP, using the User Data Protocol (UDP) stack from the PXE ROM.

5. The loader downloads (using TFTP) the associated files needed to boot into Windows PE from RAMDISK. These files include the following:

a. A Boot Configuration Data (BCD) store. This replaces the Boot.ini file, which tells the loader how to boot the operating system.

b. An .sdi disk image.

c. The boot image, in .wim format.

d. Font files for the boot menu. You can configure the boot menu to be in a different language, so these files are downloaded to display the localized boot menu.
The TFTP download occurs using the UDP stack from the PXE ROM. The TFTP protocol is implemented in the loader, so the user can see a progress bar.

6. The RAMDISK is produced by creating the disk image in memory and appending the .wim file to the disk.

7. Windows PE boots by using the image in the .wim file.
The following diagram illustrates what happens in the RAM of a client computer.


To enable PXE Booting in your environment the Distribution Server will have to be a PXE booting point, the Boot Images will have to be distributed to it and DHCP options will have to be changed.

Can you please set the following options on your DHCP Server
066 Boot Server Hostname – MyServerName.MyDomain.COM
067 Bootfile Name - \SMSBoot\x86\wdsnbp.com

This applies to all Distribution points if you require PXE imaging.

Apply a current Windows XP WIM Image

Apply a current Windows XP WIM Image:

Once the desired Image has been captured we can use it to deploy to new PC’s or use it to reimage current PC’s.

1. Add Operating System to SCCM
UNC browse to the WIM file
Click next and accept all defaults until the Wizard completes

2. The operating System will appear under Operating System Images, add and update a Distribution Point to the Image.

3. Assuming Drivers have already been imported you can proceed to the next step of creating a task sequence.

We are still using the Vista Boot images shipped with SCCM 2007 however because the way Vista formats the HDD a few changes will need to be made to the process.

4. Create a new task Sequence
5. Follow the Wizard and make sure the task sequence mirrors the sequence below.
6. Highlight restart in Windows PE and select the Options Tab, make sure the following exists
7. Set the task sequence variable to be OSDDiskpartBiosCompatibilityMode = TRUE
8. Highlight Partition Disk and select the Options Tab, make sure the following exists
9. Highlight Apply Windows Settings and enter the Product key and Local Admin password
10. Join the Computer to a Domain in the Apply Network settings Task
11. Advertise the Task sequence to a collection consisting of at least 1 computer.

Import drivers, create driver packages and add them to WinPe boot images

Import drivers, create driver packages and add them to WinPe boot images:

First do the following:a. Download and extract the drivers to a network shareb. Create a network share that will be used for drivers storage.(I’ve created this on one of the SCCM servers)
Once you have the thing above you can Open Configuration Manager Console

1. Go to Computer Management>Operating Systems Deployment>Drivers

2. Now you can right click on Drivers and choose import but I would recommend first to create some kind of folder structure(like model\device) as this will make things easier in the future. Once you have folders created right click on it and select Import.

3. Import New Driver wizard will start.Here you have 2 options to import all the drivers that you have in the folder or to import a specific driver by pointing to *.inf file. In my case I have selected the folder which includes all network drivers for my laptop model. You have to enter UNC path to the folder location(You have this done in step a). Click Next

4. Now you will get a list of all drivers that SCCM found in that folder and its sub-folders. I have assigned the drivers to a category but it is not necessary. It just makes administration easier when you have many packages.

Click Next.

5. Here you can add the drivers to the existing drivers package or create a new one. To create a new one click on New Package

6. Enter the package name and UNC path for Driver package source(this is the one you created in step b)Note: You don’t need to create new share for every package.Click OK.

7. Select Update distribution points when finished. Click Next.

8. In this step you can select to update Boot images. Select the boot images you want to update.

Select Update distribution points when finished. Click Next.Note: You don’t need to update Boot images with every driver you have because the drivers will not be used and and the Boot image will grow in size, which will slow down imaging process. The only drivers that you most likely need are NIC drivers. I have selected to update because as you can see the drivers are for the NIC and as I found out earlier HP 6720s laptop does not work with standard SCCM Boot image. Without those NIC drivers OSD does not work.

9. Review the summary and click Next.

10. Wait until the progress is finished. Review the confirmation and click Close.Note: In the confirmation window you may find that some drivers were not imported because they are not correct format. Most likely these are DOS drivers and you need not to worry about them. All other drivers still be imported.

How to capture a Win XP Image

How to capture a Windows XP image:


1.First you have to make a Capture Media.


2.Remove PC from the domain


3.Create a folder called sysprep in boot partition

4. Extract and copy the files from deploy.cab from OS media to sysprep folder


5. Put the capture media into CD/DVD drive. Wait until Image Capture Wizard starts and click Next


6. Enter the destination and file name where you want your image to be created. You can create directly on a network share but then you have to provide login details for it.

7. Enter Image information


8. Click Finish on the Summary screen


9. Image capturing should start now.


10. At first Capture wizard will prepare the OS for imaging. After that PC will reboot and it will copy the image to the provided location. When copying is finished it will display a dialog screen saying that image capture was successful. Press OK and wait until PC reboots. Because the PC was syspreped you will have to provide all the information(name, serial key,regional settings etc.) as the PC was just installed. After setup is finished you should login and locate your image file.

How to create a Capture Media CD

How to create a Capture Media CD:

1. Start Configuration Manager consoleGo to Site Database>Computer Management>Operating System DeploymentRight Click on Task Sequences and select Create Task Sequence Media

2. Select Capture Media in the Task Sequence Media Wizard

3. Enter the file name and location where you want to safe the image file and click Next


4. Select the Boot image and choose Distribution point that you wan to use(The distribution point will be used to download the boot image)
5. Click Next 2 times. Wait until the image is created then click Close.Burn the image to a CD.

Rename the MY COMPUTER icon on the Desktop for Win 7 only

Rename the MY COMPUTER icon on the Desktop for Win 7 only:

Create a .vbs file withe the red below:

option explicit
dim objNetwork, objShell, strComputer, objFolder, objFolderItemConst MY_COMPUTER = &H11&
Set objNetwork = CreateObject("Wscript.Network")Set objShell = CreateObject("Shell.Application")
strComputer = objNetwork.ComputerName
Set objFolder = objShell.Namespace(MY_COMPUTER)Set objFolderItem = objFolder.SelfobjFolderItem.Name = "My Computer " & strComputer

Rename the MY COMPUTER icon on the Desktop for Win XP only

Rename the MY COMPUTER icon on the Desktop for Win XP only:

  1. create a .reg file consisting of the entry in red below

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}]@="My Computer""InfoTip"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,\ 6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\ 00,53,00,48,00,45,00,4c,00,4c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,\ 2d,00,32,00,32,00,39,00,31,00,33,00,00,00"IntroText"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,\ 6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\ 00,53,00,48,00,45,00,4c,00,4c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,\ 2d,00,33,00,31,00,37,00,35,00,31,00,00,00"LocalizedStringold"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,\ 00,6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,\ 32,00,5c,00,53,00,48,00,45,00,4c,00,4c,00,33,00,32,00,2e,00,64,00,6c,00,6c,\ 00,2c,00,2d,00,39,00,32,00,31,00,36,00,00,00"LocalizedString"=hex(2):4d,00,79,00,20,00,43,00,6f,00,6d,00,70,00,75,00,74,00,\ 65,00,72,00,20,00,25,00,43,00,4f,00,4d,00,50,00,55,00,54,00,45,00,52,00,4e,\ 00,41,00,4d,00,45,00,25,00,00,00
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\DefaultIcon]@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\ 00,5c,00,45,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,2e,00,65,00,78,00,\ 65,00,2c,00,30,00,00,00
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\InProcServer32]@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\ 00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,53,00,48,00,\ 45,00,4c,00,4c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,00,00"ThreadingModel"="Apartment"
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell]@="none"
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\find]@=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,\ 00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,53,00,\ 48,00,45,00,4c,00,4c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,38,\ 00,35,00,30,00,33,00,00,00"SuppressionPolicy"=dword:00000080
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\find\command]@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\ 00,5c,00,45,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,2e,00,65,00,78,00,\ 65,00,00,00
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\find\ddeexec]@="[FindFolder(\"%l\", %I)]"
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\find\ddeexec\application]@="Folders"
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\find\ddeexec\topic]@="AppProperties"
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Manage]@=hex(2):40,00,25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,73,00,79,\ 00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,79,00,63,00,6f,00,6d,00,\ 70,00,75,00,74,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,34,00,30,00,30,00,00,\ 00"SuppressionPolicy"=dword:4000003c
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Manage\command]@=hex(2):25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,73,00,79,00,73,\ 00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,6d,00,63,00,2e,00,65,00,78,00,\ 65,00,20,00,2f,00,73,00,20,00,25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,\ 00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,6f,00,\ 6d,00,70,00,6d,00,67,00,6d,00,74,00,2e,00,6d,00,73,00,63,00,00,00
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\ShellFolder]"HideOnDesktopPerUser"=""

Now create a bat file that calls up the reg file and runs it silently.

regedit /s MyComputer_onDesktop.reg

Create a package and the Icon will be renamed to show My Computer "COMPUTERNAME" below


Extending SCCM to cover another Domain Forest

  • Extending SCCM to cover another Domain Forest

    Scenario:
    I have two Forests, Forest A (DomainA.COM) and Forest B (DomainB.COM). Forest A has an existing SCCM implementation of workstations and servers . SCCM in Forest A seems to work fine. Forest B is all servers. We are beginning to use SCCM to deploy software updates to servers and we want to be able to manage the servers in the other forest. There is a two-way trust between the two forests.

    Configure a SLP (Server Locator Point) on your Central site in DomainA.COM
    Give read access to the DomainA.COM\SCCM-SITESERVERS group on the DomainB.COM\SYSTEM container.

    Specify Custom LDAP Query in AD System Discovery on relevant Distribution Point to include DomainB.COM, for example (DomainB.COM Servers for Frankfurt)
    ldap://OU=SERVERS,OU=Frankfurt,DC=,DC=DomainB,DC=COM/


    Click on polling schedule and run discovery as soon as possible – to monitor progress look in adsysdis.log on relevant distribution point

    · Add IP Subnet boundary in relevant Distribution Server – for example in Frankfurt

    To find out what the IP boundary is go to one server you want to manage and run ipconfig, take a note of the IP and subnet

    · Add DomainA.COM\SCCMCLIENT account to local admin on all DomainB.COM managed Servers Local admin group.

Remove old Computer accounts after 6 months

Remove old Computer accounts after 6 months:

dsquery computer "LDAP Query of your workstations" -inactive 26 -limit 0 dsrm -noprompt –c

Disable old Computer accounts after 3 months

Disable old Computer accounts after 3 months.bat:

cd c:\dsquery computer "LDAP query of your Workstations" -inactive 13 -limit 0 dsmod computer -disabled yes

Find Computer accounts older than 3 months

Find Computer Accounts older than 3 months:

cd c:\dsquery computer "LDAP Query of your Local Computer Accounts" -inactive 13 -limit 0 > c:\dsquery.csv
start c:\dsquery.csv

Clients outside Boundaries

Clients outside Boundaries:

SELECT DISTINCT
-- v_R_System.Name0
--, v_R_System.Client0
--, v_RA_System_IPAddresses.IP_Addresses0
v_RA_System_IPSubnets.IP_Subnets0
--, v_RA_System_SMSAssignedSites.SMS_Assigned_Sites0
FROM v_R_System LEFT OUTER JOIN
v_RA_System_IPSubnets ON v_R_System.ResourceID = v_RA_System_IPSubnets.ResourceID LEFT OUTER JOIN
v_RA_System_IPAddresses ON v_R_System.ResourceID = v_RA_System_IPAddresses.ResourceID LEFT OUTER JOIN
v_RA_System_SMSAssignedSites ON v_R_System.ResourceID = v_RA_System_SMSAssignedSites.ResourceID
WHERE (v_RA_System_SMSAssignedSites.SMS_Assigned_Sites0 IS NULL)
AND (NOT (v_RA_System_IPAddresses.IP_Addresses0 IS NULL))
AND (v_R_System.Client0 IS NULL)
AND (NOT (v_RA_System_IPSubnets.IP_Subnets0 IS NULL))
order by v_RA_System_IPSubnets.IP_Subnets0

Workstation Inventory Domain OU specific

Workstation Inventory Domain OU specific:

SELECT DISTINCT
SYS.Netbios_Name0 "Hostname", SYS.User_Name0, SYS.AD_Site_Name0,
ADCON.System_Container_Name0 "AD Location",
ADOU.System_OU_Name0 "AD OU",
ADGRP.System_Group_Name0 "AD Group",
OPSYS.Caption0 as C054, OPSYS.Version0,
MEM.TotalPhysicalMemory0 "RAM",
CSYS.Manufacturer0, CSYS.Model0,
Processor.Manufacturer0, Processor.Name0, Processor.MaxClockSpeed0,
DSYS.Size0 "HD Size (MB)"
FROM v_R_System SYS
LEFT JOIN v_RA_System_IPAddresses IPAddr on SYS.ResourceID = IPAddr.ResourceIDLEFT JOIN v_GS_X86_PC_MEMORY MEM on SYS.ResourceID = MEM.ResourceIDLEFT JOIN v_GS_COMPUTER_SYSTEM CSYS on SYS.ResourceID = CSYS.ResourceIDLEFT JOIN v_GS_PROCESSOR Processor on Processor.ResourceID = SYS.ResourceIDLEFT JOIN v_GS_OPERATING_SYSTEM OPSYS on SYS.ResourceID = OPSYS.ResourceIDLEFT JOIN v_GS_DISK DSYS on SYS.ResourceID = DSYS.ResourceIDLEFT JOIN v_RA_System_SystemContainerName ADCON on ADCON.ResourceID = SYS.ResourceIDLEFT JOIN v_RA_System_SystemOUName ADOU on ADOU.ResourceID = SYS.ResourceIDLEFT JOIN v_RA_System_SystemGroupName ADGRP on ADGRP.ResourceID = SYS.ResourceID
WHERE SYS.AD_Site_Name0 LIKE 'FRANKFURT'
ORDER BY ADOU.System_OU_Name0

Specific Machine Detail

Specific Machine Detail:

SELECT SYS.Netbios_Name0, SYS.User_Name0,
OPSYS.Caption0 as C054, OPSYS.Version0,
MEM.TotalPhysicalMemory0, IPAddr.IP_Addresses0, Processor.Manufacturer0,
CSYS.Model0, Processor.Name0, Processor.MaxClockSpeed0,
DSYS.Size0
FROM v_R_System SYSLEFT JOIN v_RA_System_IPAddresses IPAddr on SYS.ResourceID = IPAddr.ResourceIDLEFT JOIN v_GS_X86_PC_MEMORY MEM on SYS.ResourceID = MEM.ResourceIDLEFT JOIN v_GS_COMPUTER_SYSTEM CSYS on SYS.ResourceID = CSYS.ResourceIDLEFT JOIN v_GS_PROCESSOR Processor on Processor.ResourceID = SYS.ResourceIDLEFT JOIN v_GS_OPERATING_SYSTEM OPSYS on SYS.ResourceID = OPSYS.ResourceIDLEFT JOIN v_GS_DISK DSYS on SYS.ResourceID = DSYS.ResourceIDWHERE SYS.Netbios_Name0 = @variableORDER BY SYS.Netbios_Name0, SYS.Resource_Domain_OR_Workgr0

All Workstations detail

All Workstations detail:

SELECT DISTINCT
SYS.Netbios_Name0 "Hostname", SYS.User_Name0,
OPSYS.Caption0 as C054, OPSYS.Version0,
MEM.TotalPhysicalMemory0 "RAM",
CSYS.Manufacturer0, CSYS.Model0,
Processor.Manufacturer0, Processor.Name0, Processor.MaxClockSpeed0,
DSYS.Size0 "HD Size (MB)"
FROM v_R_System SYSLEFT JOIN v_RA_System_IPAddresses IPAddr on SYS.ResourceID = IPAddr.ResourceIDLEFT JOIN v_GS_X86_PC_MEMORY MEM on SYS.ResourceID = MEM.ResourceIDLEFT JOIN v_GS_COMPUTER_SYSTEM CSYS on SYS.ResourceID = CSYS.ResourceIDLEFT JOIN v_GS_PROCESSOR Processor on Processor.ResourceID = SYS.ResourceIDLEFT JOIN v_GS_OPERATING_SYSTEM OPSYS on SYS.ResourceID = OPSYS.ResourceIDLEFT JOIN v_GS_DISK DSYS on SYS.ResourceID = DSYS.ResourceIDWHERE SYS.Netbios_Name0 LIKE '%'ORDER BY SYS.Netbios_Name0

Missing SCCM Client

Missing SCCM Client:

SELECT DISTINCT
SYS.Netbios_Name0 "Hostname", SYS.User_Name0, SYS.Client0 "Client", SYS.Client_Version0 "Client Version", SYS.Client_Type0 "Client Type",
OPSYS.Caption0 as C054, OPSYS.Version0,
MEM.TotalPhysicalMemory0 "RAM",
CSYS.Manufacturer0, CSYS.Model0,
Processor.Manufacturer0, Processor.Name0, Processor.MaxClockSpeed0,
DSYS.Size0 "HD Size (MB)"
FROM v_R_System SYSLEFT JOIN v_RA_System_IPAddresses IPAddr on SYS.ResourceID = IPAddr.ResourceIDLEFT JOIN v_GS_X86_PC_MEMORY MEM on SYS.ResourceID = MEM.ResourceIDLEFT JOIN v_GS_COMPUTER_SYSTEM CSYS on SYS.ResourceID = CSYS.ResourceIDLEFT JOIN v_GS_PROCESSOR Processor on Processor.ResourceID = SYS.ResourceIDLEFT JOIN v_GS_OPERATING_SYSTEM OPSYS on SYS.ResourceID = OPSYS.ResourceIDLEFT JOIN v_GS_DISK DSYS on SYS.ResourceID = DSYS.ResourceIDWHERE SYS.Client0 IS NULLORDER BY SYS.Netbios_Name0

Incorrect hostname Syntax

Incorrect hostname Syntax:

SELECT DISTINCT
SYS.Netbios_Name0 "Hostname", SYS.User_Name0,
OPSYS.Caption0 as C054, OPSYS.Version0,
MEM.TotalPhysicalMemory0 "RAM",
CSYS.Manufacturer0, CSYS.Model0,
Processor.Manufacturer0, Processor.Name0, Processor.MaxClockSpeed0,
DSYS.Size0 "HD Size (MB)"
FROM v_R_System SYSLEFT JOIN v_RA_System_IPAddresses IPAddr on SYS.ResourceID = IPAddr.ResourceIDLEFT JOIN v_GS_X86_PC_MEMORY MEM on SYS.ResourceID = MEM.ResourceIDLEFT JOIN v_GS_COMPUTER_SYSTEM CSYS on SYS.ResourceID = CSYS.ResourceIDLEFT JOIN v_GS_PROCESSOR Processor on Processor.ResourceID = SYS.ResourceIDLEFT JOIN v_GS_OPERATING_SYSTEM OPSYS on SYS.ResourceID = OPSYS.ResourceIDLEFT JOIN v_GS_DISK DSYS on SYS.ResourceID = DSYS.ResourceIDWHERE SYS.Netbios_Name0 Not Like 'VARIABLE%'ORDER BY SYS.Netbios_Name0

Duplicate Computer names

Duplicate computer names:

select name0 , count (*) from v_r_system GROUP BY name0 having count (*) > 1;

Server uptime

Server uptime:

Select cs.Name0, DateDiff(hour,os.LastBootUpTime0,ws.LastHWScan) as 'Uptime (in Hours)', os.LastBootUpTime0 as 'Last Reboot Date/Time', ws.LastHWScan as 'Last Hardware Inventory'From dbo.v_GS_WORKSTATION_STATUS ws Left Outer Join dbo.v_GS_Operating_System os on ws.ResourceID = os.ResourceID left outer join dbo.v_GS_COMPUTER_SYSTEM cs on cs.ResourceID = os.ResourceID left outer join dbo.v_GS_SYSTEM sys on sys.ResourceID = os.ResourceID Where Sys.SystemRole0='Server'Order by Cs.Name0

List Computers by Manufacturer and Model

List Computers by Manufacturer and Model:

SELECT SYS.Netbios_Name0, SYS.User_Name0, CSYS.Manufacturer0, CSYS.Model0 FROM v_R_System SYS RIGHT JOIN v_GS_COMPUTER_SYSTEM CSYS on SYS.ResourceID = CSYS.ResourceID ORDER BY CSYS.Manufacturer0, CSYS.Model0, SYS.Netbios_Name0

List all discovered devices which are not a client

List all discovered devices which are not a client:

select Name0, Resource_Domain_Or_Workgr0, Operating_system_name_and0, AD_Site_Name0, Community_name0 from v_R_System Rwhere R.ResourceID Not in (Select CS.ResourceID From v_GS_Computer_System CS)Order by Name0

Count of all Computer Models

Count of all computer models:

select Model0, Count(*) from dbo.v_GS_COMPUTER_SYSTEM CS, dbo.v_FullCollectionMembership FCMWhere CS.ResourceId = FCM.ResourceId And CollectionID = 'SMS00001'Group by Model0

Count of all operating Systems

Count of all operating Systems:

select OS.Caption0, CS.SystemType0, Count(*)from dbo.v_GS_COMPUTER_SYSTEM CS Left Outer Join dbo.v_GS_OPERATING_SYSTEM OS on CS.ResourceID = OS.ResourceIdGroup by OS.Caption0, CS.SystemType0Order by OS.Caption0, CS.SystemType0

Count computers with a specific filename Collection based

Count computers with a specific filename Collection based:

select SF.FileName, SF.FileDescription, SF.FileVersion, count(distinct SF.ResourceID) as 'Count', FCM.CollectionIDfrom v_GS_SoftwareFile SF JOIN v_FullCollectionMembership FCM ON SF.ResourceID = FCM.ResourceID where SF.FileName Like @variable and FCM.CollectionID=@CollIDGroup By FCM.CollectionID, SF.FileName, SF.FileDescription, SF.FileVersion

Computers without a file - Collection based

Computers without a file - Collection based:

select distinct SYS.Netbios_Name0 'Name', SYS.Operating_System_Name_and0 'Operating System', LSS.LastScanDate, FCM.CollectionIDFrom v_GS_SoftwareFile SFjoin v_R_System SYS on SYS.ResourceID = SF.ResourceIDjoin v_FullCollectionMembership FCM ON SF.ResourceID = FCM.ResourceIDjoin v_GS_LastSoftwareScan LSS on LSS.ResourceID=SF.ResourceIDWhere SYS.ResourceID not in (select distinct SF.ResourceID from v_GS_SoftwareFile SFjoin v_FullCollectionMembership FCM ON SF.ResourceID = FCM.ResourceIDwhere FCM.CollectionID=@CollID and SF.FileName=@variable) and FCM.CollectionID=@CollIDORDER BY SYS.Netbios_Name0

Computers with a specific File - Collection based

Computers with a specific File - Collection based:

select SYS.Netbios_Name0, SF.FileName, SF.FileDescription, SF.FileVersion, SF.FileSize, SF.FileModifiedDate, SF.FilePath, FCM.CollectionIDFrom v_GS_SoftwareFile SFjoin v_R_System SYS on SYS.ResourceID = SF.ResourceIDjoin v_FullCollectionMembership FCM ON SF.ResourceID = FCM.ResourceIDWhere SF.FileName LIKE @variable and SF.FileVersion=@Version and FCM.CollectionID=@CollIDORDER BY SYS.Netbios_Name0

Computers Operating Systems and BIT versions

Computers Operating Systems and BIT versions:

select OS.Caption0, CS.SystemType0, Count(*)from dbo.v_GS_COMPUTER_SYSTEM CS Left Outer Join dbo.v_GS_OPERATING_SYSTEM OS on CS.ResourceID = OS.ResourceIdGroup by OS.Caption0, CS.SystemType0Order by OS.Caption0, CS.SystemType0

All Computers with Spotify installed query

All Computers with Spotify installed query:

select SMS_R_System.Name, SMS_R_System.LastLogonUserName from SMS_R_System where SMS_R_System.ResourceId in (select SMS_R_System.ResourceID from SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = "Spotify") and SMS_R_System.Obsolete = 0 and SMS_R_System.Client = 1 and SMS_R_System.OperatingSystemNameandVersion like "Microsoft Windows NT Workstation%" and SMS_R_System.ResourceDomainORWorkgroup = "DOMAINNAME" and SMS_R_System.Name not in ("MACHINE NAMES","Machine Names")

SCCM Clients missing

SCCM Clients missing:

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.Client is null order by SMS_R_System.Client

Office 2007 SP2 required query

Office 2007 SP2 required query
select SMS_R_System.Name, SMS_R_System.LastLogonUserName 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_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = "2007 Microsoft Office Suite Service Pack 2 (SP2)" or SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = "2007 Microsoft Office Suite Service Pack 2 (SP2)") and SMS_R_System.Obsolete = 0 and SMS_R_System.Client = 1 and SMS_R_System.OperatingSystemNameandVersion like "Microsoft Windows NT Workstation%" and SMS_R_System.ResourceDomainORWorkgroup = "DOMAINNAME" and SMS_R_System.Name not in ("MACHINE NAMES","Machine Names")

Office 2007 SP installed query

Office 2007 SP2 Installed Query
select SMS_R_System.Name, SMS_R_System.LastLogonUserName from SMS_R_System where SMS_R_System.ResourceId in (select SMS_R_System.ResourceID from SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = "2007 Microsoft Office Suite Service Pack 2 (SP2)" or SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = "2007 Microsoft Office Suite Service Pack 2 (SP2)") and SMS_R_System.Obsolete = 0 and SMS_R_System.Client = 1 and SMS_R_System.OperatingSystemNameandVersion like "Microsoft Windows NT Workstation%" and SMS_R_System.ResourceDomainORWorkgroup = "DOMAINNAME" and SMS_R_System.Name not in ("MACHINE NAMES","Machine Names")

All Windows 7 Worstation Query

All Windows 7 Worstation Query:

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.OperatingSystemNameandVersion like "Windows 7%"