PowerShell Script: SCCM Health Check

30/01/2012: This script has been updated to version 3.5. Details can be found HERE. The download link on this article has also been updated to version 3.5. 26/05/2011: Version 3.3 has been posted here. The download link to the script on this post is also updated to the new version 3.3. 21/04/2011: Please be advised that I have posted a newer version of the script here. The existing script download link on this page has also been updated to point to the newer version. For the chanages in newer version, please refer to my updated post. Over the last few

Continue reading

How to locate SCCM Collection Object based on the Collection ID

Often, I found it’s hard to locate the Collection object in the SCCM console if you only know the Collection ID. Couple of weeks ago I ran into a situation where I need to modify the settings of a bunch of collection objects and all I knew was the Collection ID. I wrote a script called Get-CollectionPath that identifies all possible paths to a particular collection (as a collection can be linked to multiple places). The Syntax is: .\Get-CollectionPath <SCCM Central Site Server Name> <Collection ID> Download the script here. [sourcecode language=”powershell”] param([string]$CentralSiteServer,[string[]]$CollectionID) Function Get-CollectionName ($CollectionID) { $CollectionName = (Get-WmiObject

Continue reading

Incorrect description in SCCM Report License 03B – Computers with a specific license status (Report ID 350)

On the SCCM Report “License 03B – Computers with a specific license status” (Report ID 350, category Asset Intelligence), the description states there are 5 possible values for license status: This is incorrect. SCCM collects licensing data from client’s WMI class SoftwareLicensingProduct in root\cimv2 namespace and regarding to below MSDN article, there are 7 possible values for LicenseStatus: http://msdn.microsoft.com/en-us/library/cc534596(VS.85).aspx Below is an example of a server with license status 5 showing up in the SCCM report:

Continue reading

Get SCCM site roles using Powershell

You can run the following on the site server to find out the servers holding each SCCM role: $SMSProvider = get-wmiobject sms_providerlocation -namespace root\sms -filter “ProviderForLocalSite = True” $SiteCode = $SMSProvider.SiteCode $ProviderMachine = $SMSProvider.Machine get-wmiobject -Class SMS_SystemResourceList -NameSpace root\sms\site_$SiteCode -Computername $ProviderMachine | format-list RoleName,ServerRemoteName,SiteCode

Continue reading
%d bloggers like this: