Powershell Tangents

System Center Configuration manager (SCCM) 2007 R3 – Device Discovery Issue / Health Check script

Posted on April 18, 2012. Filed under: Powershell Tangents |

Thank you for visiting my blog. I’ve moved this article to my new book’s website at: http://masteringposh.com/system-center-configuration-manager-sccm-2007-r3-device-discovery-issue-health-check-script

A large hospital recently had been experiencing issues with their SCCM Server replication and SCCM Remote Console. Initially, they started to notice slow package replication which quickly expanded to the following list:

  • SCCM 2007 Remote Console Loading Slowly
  • SCCM 2007 Remote Console Not Connecting to Remote Clients
  • SCCM 2007 Packages Taking Hours for Replication
  • SCCM 2007 ‘My’ Computer freezing on server / drive not accessible
  • SCCM 2007 Explorer Crashes on Central Server / Cannot View InboxesAuth

SCCM Configuration

SCCMSetup

The hospital, with over 12,000 computers, hosted a central server and two primary child sites (as shown above). These servers are all Windows Server 2008 R2 servers and had been running functionally since February of 2012.  Site_101 and Site_102 were both configured to replicate their record sets to the central server.

Please note that there is an additional WDS deployment server which is not shown in the above image as it is irrelevant to this discussion.

SCCM issue: Device Discovery Records build-up

 

SCCMDiscoveryPattern

After a bit of research, it was determined that the issues above had to do with the configuration of the Discovery Methods. Site_100, Site_101, and Site_102 were configured to perform full Active Directory System Discoveries (DDR Record Generation) every 5 minutes (relevant to their respective AD hierarchy).

In the hospital’s case, the (DDR) records were being created by the two children sites and pushed up to the Central Server. The Central Server had to #1 process its own device discovery records, #2 process Site_101 and Site_102 discovery records. The Central Server could not process the DDRs as fast as they were being generated. Subsequently, the directory started to fill up with old device discovery information. By the time the device discovery record issue was discovered, the %drive%Program Files (x86)Microsoft Configuration Managerinboxesauthddm.box inbox had almost 22.1 million device discovery records.

The build up of files had the following effects on the server:

  • Disk Contention – Files were being written and deleted (delete is a disk write as well!) causing the disk queue to be in the upwards of 200 operations. This simply crippled the use of that RAID drive which affected all SCCM components rendering the Central Server useless.
  • Windows Indexing Issues – Due to the mere number of files (22.1 million), in addition to keeping track of those being added / removed, the indexing service could not keep up with the operations of the server. This was the cause of Windows Explorer to hanging and crashing as it was attempting to index the files.

Read the full article at: MasteringPOSH.com

Read Full Post | Make a Comment ( 1 so far )

PowerShell Script – SCCM 2007 Health Check

Posted on April 18, 2012. Filed under: Powershell Tangents |

Thank you for visiting my blog. I’ve moved this article to my new book’s website at: http://www.masteringPOSH.com/powershell-script-sccm-2007-health-check

System Center Configuration Manager 2007 is an extremely powerful tool that, when configured correctly, will provide deployment and reporting capabilities for your organization. As explored in a previous article (located here), there are situations where a health check is helpful to ensure stability of the SCCM 2007 servers.

The below PowerShell Script was designed to perform two operations:

  • Morning Report – To run as a scheduled task in the morning and email a distribution group (or individual email) if anything is potentially going wrong. (Warning Level to Critical Levels).
  • Hourly Status Check – To run as a scheduled task every hour and email a distribution group (or individual email) if anything is Critically wrong. (Critical Level Only).

The script performs the following at a high level:

  1. Loads the SCCM.XML File
  2. Determines from the SCCM.XML file where SCCM is installed.
  3. Using the SCCM.XML File, reads through the unique ID’s under the ‘filecheck’ and determines the file count for those directories.
  4. Using the SCCM.XML File, reads through the unique ID’s under the ‘servicecheck’ and determines the startup state, and running state of the services required for SCCM.
  5. Sends an email to the specified address with any warning or critical messages.

See the full article on MasteringPosh.com

 

Happy Coding!

Read Full Post | Make a Comment ( None so far )

PowerShell queryService–Wait for a Dependency Starting Service

Posted on June 3, 2011. Filed under: Powershell Tangents | Tags: , , , , , |

Thank you for visiting my blog. I’ve moved this article to my new book’s website at: http://masteringposh.com/powershell-queryservice-wait-for-a-dependency-starting-service

There have been several occasions while scripting in PowerShell that the script is dependent on a specific service in the running state. A good example is the need to wait for the WMI Service to startup prior to making a WMI call, or SQL Server where when you restart the services, you have to wait for the services to be in a running state before you can execute commands.

The following function solves this issue. It also displays the proper implementation of a PowerShell wait timer to wait for a service to become operational before continuing in the script.

Find the full article on MasteringPosh.com

 

Happy Coding!

Read Full Post | Make a Comment ( None so far )

Powershell Import-GPO : The Data Is Invalid Fixed

Posted on April 20, 2010. Filed under: Powershell Tangents |

Thank you for visiting my blog. I’ve moved this article to my new book’s website at: http://masteringposh.com/powershell-import-gpo-the-data-is-invalid-fixed

 

This article is to aid those who are receiving the “Data is Invalid” error message in Powershell on Windows Server 2008 R2. This issue occurs while trying to import policies from one domain into their a different domain using a migration table. This issue has to do with the migration table editor referring to the “Pre-Windows 2000 Username” to migrate users instead of their Standard Username.

See the full article on : MasteringPOSH.com

Happy Coding!

Read Full Post | Make a Comment ( 2 so far )

PowerShell Script: Encrypting / Decrypting A String – Function Encrypt-String

Posted on March 20, 2010. Filed under: Powershell Tangents |

Thank you for visiting my blog. I’ve moved this article to my new book’s website at: http://masteringposh.com/powershell-script-encrypting-decrypting-a-string-function-encrypt-string

The encryption and decryption of strings is essential when creating an enterprise product that has clear text passwords. This function displays how to encrypt and decrypt a string using Powershell using Richard’s code located at http://poshcode.org/116. While I found his code very useful, he didn’t explain the syntax and is why I am reposting this with the proper information.

I also decided to make this into an endless loop for an administrator to use to encrypt multiple passwords in a row. I found this to be useful as I never had to encrypt just one password.

 See the full article on MasteringPosh.com

Read Full Post | Make a Comment ( 4 so far )

PowerShell Script: Finding A Distinguished Name of a Group/User: Function Find-DN

Posted on March 8, 2010. Filed under: Powershell Tangents |

Thank you for visiting my blog. I’ve moved this article to my new book’s website at: http://masteringposh.com/powershell-script-finding-a-distinguished-name-of-a-groupuser-function-find-dn

This article explains the the method by which one would be able to Search Active Directory for the distinguished name of a User or Group. This is helpful when trying to add an object to Active Directory or adding Users to Groups.

See the full article at MasteringPOSH.com

Read Full Post | Make a Comment ( 8 so far )

PowerShell Script: Retrieving Distinguished name (DN) from A Fully Qualified Domain Name (FQDN)

Posted on February 22, 2010. Filed under: Powershell Tangents |

Thank you for visiting my blog. I’ve moved this article to my new book’s website at: http://masteringposh.com/powershell-script-retrieving-distinguished-name-dn-from-a-fully-qualified-domain-name-fqdn

While there are many posts that describe the code to do this function, there aren’t many posts that provide variables with meaning or actually describe the syntax. This post describes the method by which you can retrieve a Distinguished Name from a Fully Qualified Domain Name.

Quick Reference:

Fully Qualified Domain Name (FQDN): division.domain.root

Distinguished Name (DC): DC=division,DC=Domain,DC=root

Canonical Name(CN): division.domain.root/OrganizationalUnit/

If you are looking for a quick way to obtain a Distinguished Name or Fully Qualified Domain Name See this article.

See the full article at MasteringPOSH.com

Read Full Post | Make a Comment ( 3 so far )

PowerShell Script: Distinguished Name / Fully Qualified Domain Name to string

Posted on February 22, 2010. Filed under: Powershell Tangents |

Thank you for visiting my blog. I’ve moved this article to my new book’s website at: http://masteringposh.com/powershell-script-distinguished-name-fully-qualified-domain-name-to-string

This article is designed to be short and sweet. This article displays the method by which one would retrieve the FQDN or Distinguished Name of the Domain. This is code is very useful for any operations in Active Directory. A must know for any scripter that needs to call the domain on a system without hard coding the value in the script.

Lets take a theoretical network that consists of ‘division’ subdomain, ‘domain’ as the domain, and ‘root’ as the domain root.

See the full article on MasteringPOSH.com

Read Full Post | Make a Comment ( None so far )

    About

    Business and Information Technology Tangents is dedicated to providing quality content while informing the world about technology.

    RSS

    Subscribe Via RSS

    • Subscribe with Bloglines
    • Add your feed to Newsburst from CNET News.com
    • Subscribe in Google Reader
    • Add to My Yahoo!
    • Subscribe in NewsGator Online
    • The latest comments to all posts in RSS

    Meta

Liked it here?
Why not try sites on the blogroll...