SCCM Site Systems and Components Summarizer Reports

I received an email today from someone who downloaded my SCCM Health Check Script 3.5. He asked me if I can help to modify the script to only display Site Systems and Components status. I thought this can be easily achieved by creating few simple reports inside SCCM. If you are running SCCM 2007 R3 and have Reporting Service Point configured, you can publish these reports to SQL Reporting Services and create some schedules to email out daily. So I quickly wrote 3 reports: 1. Site Status Overview Report – A high level overview of site status 2. Site System

Continue reading

PowerShell Script: Remove All Packages From A SCCM Distribution Point

Often, SCCM administrators found packages still assigned to distribution points that no longer exist. There are scripts available to remove these “orphaned” package distributions via SMS Provider. i.e. This one called DPClean.vbs from TechNet Blog: Removing a retired DP from all your packages. It was written for SMS 2003. I’m not sure if SMS 2003 works differently when deleting package distribution via SMS Provider as I don’t have a SMS 2003 environment around that I can test. But, this script may not work in a multi-tiered SCCM environment (multiple primary sites below a central site). This script only tries to

Continue reading

PowerShell Script: Get SCCM Management Point server name from AD

I wrote this function as a part of a script that I’m working on. it searches AD for the management point server name for a particular SCCM site: [sourcecode language=”Powershell”] Function Get-MPFromAD ($SiteCode) { $domains = Get-AllDomains Foreach ($domain in $domains) { Try { $ADSysMgmtContainer = [ADSI]("LDAP://CN=System Management,CN=System," + "$($Domain.Properties.ncname[0])") $AdSearcher = [adsisearcher]"(&(Name=SMS-MP-$SiteCode-*)(objectClass=mSSMSManagementPoint))" $AdSearcher.SearchRoot = $ADSysMgmtContainer $ADManagementPoint = $AdSearcher.FindONE() $MP = $ADManagementPoint.Properties.mssmsmpname[0] } Catch {} } Return $MP } [/sourcecode] Note: This function uses another function called Get-AllDomains, which I’ve blogged before here: http://blog.tyang.org/2011/08/05/powershell-function-get-alldomains-in-a-forest/ So make sure you include BOTH functions in your script.

Continue reading

SCCM Report: Site Boundaries

I wrote this simple report yesterday to list and search site boundaries: Report Name: SCCM Site Boundaries SQL Query: [sourcecode language=”SQL”] SELECT distinct v_BoundaryInfo.DisplayName AS [Boundary Name], Case v_BoundaryInfo.BoundaryType When 0 then ‘IP Subnet’ When 1 then ‘AD Site’ When 2 then ‘IPV6 Prefix’ When 3 then ‘IP Range’ End As ‘Type’, v_BoundaryInfo.Value AS [Value], v_BoundaryInfo.SiteCode AS [Site Code] From v_BoundaryInfo WHERE DisplayName LIKE @BoundaryName [/sourcecode]   Prompts: Name: BoundaryName Prompt Text: Boundary Name Prompt SQL Statement: [sourcecode language=”SQL”] begin if (@__filterwildcard = ”) Select DisplayName from v_BoundaryInfo order by DisplayName else Select DisplayName from v_BoundaryInfo where DisplayName LIKE @__filterwildcard

Continue reading

SCCM Health Check Script Updated: Version 3.5

I have just updated the SCCM Health Check Script to from version 3.3 to 3.5 Version 3.4 was finished a while back but I never got time to publish it in this blog. I only emailed 3.4 to few people who contacted me from my blog. Now that I’ve updated it again to 3.5, I thought I’ll just publish version 3.5. What’s Changed Since 3.3? Added site system name under ‘site systems with issues’ section Detect site components that are missing heartbeats. Changed function Validate-DNSRecord to use Win32_ComputerSystem.caption rather than DNSHostname to retrieve computer name as DNSHostName is not available

Continue reading

Run 64-bit PowerShell via SCCM 2007 Advertisement

A colleague came across a problem today. He could run a SCDPM PowerShell script from PowerShell console successfully but could not run it when packaged it in SCCM. We soon found out it’s because SCCM 2007 is a 32-bit app and DPM PowerShell snapin is only available for 64-bit PowerShell because we could not run the script from a 32-bit PowerShell console. When a 32-bit application tries to access %WinDir%\system32, Windows redirects it to %WinDir%\SysWOW64. In order for the 32-bit app to access %WinDir%\System32 folder, we have to use %Windir%\sysnative. So, we set the command line of the program in

Continue reading

Extend ConfigMgr Hardware Inventory to capture OpsMgr configurations

Download: MOF Extension for OpsMgr Configurations I’ve been wanting to do this for a while now and finally found some spare time for it. I want to be able to target OpsMgr (SCOM) agents and servers in ConfigMgr (SCCM) in a more granular way (i.e. all OpsMgr agents that are reporting to a OpsMgr Management Server, or all OpsMgr agents within a OpsMgr management group or All OpsMgr management servers) Therefore, I created these extensions for configuration.mof and sms_def.mof so OpsMgr settings are captured as part of ConfigMgr client hardware inventory. Once loaded in to ConfigMgr and after clients have

Continue reading

Clean Up Old Hardware Inventory Data

In SCCM, after removing WMI classes that are no longer required from configuration.mof and sms_def.mof, the inventory data still exists in few places. If you decide to clean them up, MyITForum.com has a great WIKI page for SCCM hardware inventory which talked about different ways to clean up hardware inventory data. I have tried the free SiteSweeper tool from SCCMExpert.com which was mentioned in the WIKI page. It’s easy to use and you can remove multiple classes from site database at once: Other than removing the data from site databases throughout the hierarchy, the WMI class which you defined in

Continue reading

Error 80041001 in InventoryAgent.log after mof files modifications

I’ve been playing with SCCM mof files this weekend. After I’ve extended configuration.mof and sms_def.mof files to inventory a registry key during hardware inventory, I noticed below error logged in InventoryAgent.log on SCCM client: Unknown error encountered processing an instance of class <name of the WMI class>: 80041001 I checked the SCCM client, the WMI class was created correctly, but the inventory data was not loaded in the SCCM database therefore I could not view it in Resource Manager. After gone through both configuration.mof and sms_def.mof many times made sure they are 100% correct, I found this error is actually

Continue reading

“Orphaned” Maintenance Windows for SCCM clients

Last week, in my SCCM test environment, I noticed there are several maintenance windows applied to clients that I had no idea where were they come from. Symptoms: When using SCCM Client Center, it shows this particular client (MGMT01) has 3 maintenance windows (service window) assigned to it: PolicySpy from ConfigMgr 2007 Toolkit also shows the same: The problem is, there should ONLY be 1 maintenance window for this client: and actually, there is ONLY 1 maintenance window in total in my entire environment: I ran “SELECT * from v_ServiceWindow” against the site database and there is only 1 row

Continue reading
%d bloggers like this: