SCCM 2007 OU exclusion

Exclude a sub-OU from a Collection in SCCM

If we want to make a collection based on a Parent OU and want to exclude one or more Sub-OUs, it is apparently not possible with the criteria selection. It only works well for getting all computers in the parent OU. But if you add another criteria and say System OU Name not like or not equal to the child OU, it does not work for the exclusion. You have to absolutely use a subquery in order to exclude computers from the sub OU.


After adding the simple criteria of Parent OU you can edit the query and add the sub query which I got from the link here:

In my case, OU3 is the parent OU and the query goes like this :

select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,
SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.SystemOUName = “DOMAIN.LOCAL/OU1/OU2/OU3″ and SMS_R_System.ResourceID Not In (Select ResourceID from SMS_R_System Where SystemOUName like  “DOMAIN.LOCAL/OU1/OU2/OU3/SUB-OU-1-TO-EXCLUDE” or SystemOUName like “DOMAIN.LOCAL/OU1/OU2/OU3/SUB-OU-2-TO-EXCLUDE”)

Exclude Active Directory OU’s from a Collection in System Center Configuration Manager 2007

Source: Http://

Create a “all computers” collection for software updates and exclude various OU’s that have computers not allowed to be updated for various reasons. Please modify the RED areas with the correct information. The great part is, you don’t have to spell out the full OU name to be excluded.


  • select sys.ResourceId, sys.ResourceType, sys.Name, sys.SMSUniqueIdentifier, sys.ResourceDomainORWorkgroup, sys.Client
    from SMS_R_System as sys where sys.SystemOUName like “TEST.COM/COMPUTERACCOUNTS
    and sys.ResourceId not in (select ResourceID from  SMS_R_System where SMS_R_System.SystemOUName like “%OuNameToNotInclude“)
    and sys.ResourceId not in (select ResourceID from  SMS_R_System where SMS_R_System.SystemOUName like “%OuNameToNotInclude“)
    and sys.ResourceId not in (select ResourceID from  SMS_R_System where SMS_R_System.SystemOUName like “%OuNameToNotInclude“)

SCCM 2007 PXE Notes

The PXE Service Point service that is running on the WDS server(s) reports it’s status to the adult primary Configuration Manager 2007 server and the results can be viewed in the component status messages on the adult primary Configuration Manager 2007 console.
1.Open the adult primary Configuration Manager 2007 server console.
2.Expand Site Database > System Status > Site Status > Site Code > Component Status.
3.Right click the SMS_PXE_Service_Point item and select Show Messages > All from the drop down menu.

These messages will report specific errors or events that have occurred with the PXE service point.

Basic Log Files

Basic PXE log files contain information about the configuration and setup of the PXE service point.

PXESetup.log will contain the installation logging for the PXE Service Point role that is added by the Configuration Manager 2007 console. Many installation and configuration errors can be seen in this log.

Log file location: <InstallationPath>smslogs

PXEMsi.log Provides information about the PXE service point and is generated when the PXE service point site server has been created.

Log file location: <ConfigMgrInstallationPath>smslogs

PXEControl.log provides information about the PXE Control Manager.

Log file location: <ConfigMgrInstallationPath>smslogs

Advanced Log Files

To enable WDS Logging set the following registry key:

HKLMSoftwareMicrosoftTracingWDSServerEnableFileTracing = 1

The log file generated from this setting will appear in %Windir%TracingWDSServer.log

To add additional logging features to the PXE Filter Script add the following style of code to the script: PXE.LogTrace “My log file comment”