Microsoft System Center Configuration Manager Technical Preview Feature – Windows PE Peer Cache

Posted on

With the next version of Configuration Manager, Microsoft introduces Windows PE Peer Cache. This will allows clients to pull WinPE content from a computer that is local. This will reduces WAN traffic on the network and could reduce the need for a local distribution point at some locations.

Search for Windows PE Peer Cache

Tables and Views in the MDT Database

Posted on

I find it useful to keep a list of all the tables and views in the MDT database. This comes in handy when building a query or stored procedure. Below are the tables and views in the MDT database. This comes from the Microsoft Deployment Toolkit Documentation Library.




Remove Direct Membership Rules with PowerShell

Posted on

Recently, I had a need to remove multiple direct membership rules from several collections. Rather than use the console, I used the Configuration Manager PowerShell module. Below is what I ended up doing. It asks for the collection name, checks whether the name supplied is a device collection, checks whether the collection has members and removes them. From this base, I was able to incorporate these commands into other scripts with advanced functionality.

Import-Module (Join-Path $(Split-Path $env:SMS_ADMIN_UI_PATH) ConfigurationManager.psd1)

$CollectionName = Read-Host "Enter name of collection."
$Collection = Get-CMDeviceCollection -Name $CollectionName

If($Collection.CollectionType -eq 2 -and $Collection.MemberCount -gt 0){
    $Removals = Get-CMDeviceCollectionDirectMembershipRule -CollectionName $CollectionName
    ForEach($Removal in $Removals){
        $RemovalID = $Removal.ResourceID
        Remove-CMDeviceCollectionDirectMembershipRule -CollectionName $CollectionName -ResourceID $RemovalID -Force
        Write-Host "Removed $Removal" -ForegroundColor Green

SQL Server Query to Check Last Client Health Check on Specific Machine

Posted on Updated on

There are times when I need to check the last time a machine ran the SCCM client health check. There are several different ways to check this, from the using the console to reports. Since I have SQL Server Management Studio up the majority of the time, I find the easiest way for me is to run the below query. It will output the last time it was reported online, last hardware inventory, last time the client health check was run, and the status of the check.

SELECT S1.Netbios_Name0 AS [Machine Name], S2.LastOnline AS [Last Online], S2.LastHW AS [Last Hardware Inventory], S2.LastHealthEvaluation AS [Last Evaluation Time], S3.HealthCheckDescription AS [Last Evaluation Result] 
FROM v_R_System AS S1 INNER JOIN v_CH_ClientSummary AS S2 ON S1.ResourceID = S2.ResourceID INNER JOIN v_CH_EvalResults AS S3 ON S1.ResourceID = S3.ResourceID 
WHERE (S1.Netbios_Name0 = '<<insertmachinename>>')


Available views for SCCM 2012 custom reporting

Posted on Updated on

Microsoft has made it easy to locate a view to use when creating a custom report. On TechNet, they have grouped the reports into to categories such as Inventory Views , Discovery Views, and Software Update views. Below are links to two key categories that I use regularly along with a link to all views.

Discovery Views – Use to find machines and users discovered by SCCM.

Inventory Views – Use to find installed software, hardware information, and files on machines.

All Views

Automatically upgrade the SCCM 2012 Client

Posted on

Microsoft regularly releases updates for their System Center products. One of the nice features of SCCM 2012 R2 is the automatic client upgrade feature. By enabling it, all clients throughout the  environment (except clients on slow or unreliable networks, which must upgraded using another method) will automatically upgrade to the latest version. It can also be configured to upgrade within a certain period of time, with the default being within 7 days. Below are the steps to enable this feature.

  1. In the SCCM administrator console, select Administration.
  2. Expand Site Configuration.
  3. Right-click Sites and select Hierarchy Settings.
  4. Select the Automatic Client Upgrade tab.
  5. Check Upgrade client automatically when new client updates are available.
  6. Read the warning and click OK to enable automatic client upgrades.

SCCM and McAfee Problems

Posted on

Good post from Garth Jones about two SCCM errors when McAfee is in an environment.

Queries for Collections for a Specific Machine and All Software In Add/Remove Programs

Posted on Updated on

For a number of years, I have been collecting SQL Server queries that I use regularly. They allow me to get requested data much quicker without having to write a new query each time. Below are two queries that I use often and have saved me a lot of time.

All Collections that a Specific Machine is In

v_FullCollectionMembership AS S2 ON S1.ResourceID = S2.ResourceID INNER JOIN
v_Collection AS S3 ON S2.CollectionID = S3.CollectionID
WHERE (S1.Netbios_Name0 = '<<InsertMachineName>>')

All Software In Add/Remove Programs on a Specific Machine (x86 and x64)

SELECT S2.DisplayName0 AS 'Display Name', S2.Version0, S2.InstallDate0
WHERE (S1.Netbios_Name0 = 'CM12')
SELECT S2.DisplayName0 'Display Name', S2.Version0, S2.InstallDate0
v_GS_ADD_REMOVE_PROGRAMS_64 AS S2 ON S1.ResourceID = S2.ResourceID
WHERE (S1.Netbios_Name0 = '<<InsertMachineName>>')
ORDER BY 'Display Name'


PowerShell – Add comments to PowerShell

Posted on

I find it very useful when a scripter includes help in their PowerShell scripts. Simply including examples of how a script works can save a lot of time by showing how something is run and what the output will look like. I found it especially useful when using functions with parameters. Adding comment-based help on required parameters, description information, and examples can show the user how a function works via the command line rather than making them work through the script themselves if they have a problems.

Below is an example of help that I added to a simple function that looks for the specific process on a machine. The included help will assist the user with knowing the correct parameters to use, a description of what the function does, and several examples.

More information about comment based help