You are browsing the archive for configmgr2007.

SCCM R3 : Power Management In Practice (Lessons Learned)

6:56 am in ConfigMgr, ConfigMgr 2007, ConfigMgr SP2, configmgr2007, ConfigMgr2007 R3, Deployment, Power Management, R3, sccm, SCCM 2007 R3, sccm2007, Windows 7 by Kenny Buntinx [MVP]

Hi there ,

I have recently deployed Configuration Manager 2007 RTM in production at my TAP customer. Those who attended yesterday my Presentation at the Belgian System Center Day “http://scug.be/blogs/sccm/archive/2010/09/30/announcement-system-center-day-in-belgium.aspx” have seen already the best practices & lessons learned .

I want to thank everyone that has attended our event as it was a great success. The presentations and the links to the recordings will be uploaded very soon , but for those who cannot wait , I’ll post a few teasers below :

 

  • Communication and User Preparation :

We created a communication plan that supported two main objectives:

Drive awareness : Client power management can reduce client computer power consumption, which in turn reduces both the carbon footprint and operational expenses.

Allow users adequate time to decline participation in the program, prior to enforcement:

–Established a four-week period between initial communications and the enforcement of the power management settings.

–Clear communication about the program, the extent of impact, and a link to a process to decline participation were critical to the success of the program. Even though the majority of users would perceive little or no impact, it was key that they reach the few that might.

  • Operational remarks :

 

    • You must Reboot the computer after installing the power mgmt. hotfix.
    • If you create your own Package/Program to install the hotfix, you must select: The program restarts the computer setting, even though the hotfix DOES NOT reboot the computer.
    • If you want to install the power mgmt hotfix during a task sequence for new computers, select “Continue on error”. Put it as the last step of the task sequence.
    • A computer requires an active keyboard/mouse, otherwise it might not go to sleep at all. Mostly this affects KVMs, but we had few examples where a computer is only used remotely (no KVM or a mouse/keyboard) & they don’t fall a sleep.
    • The basic principle: get rid of all your XP machines!
    • Windows XP machines could been switched on for too long. There are multiple processes that can block sleeping!
    • Use correct drivers. Especially display drivers. Fortunately (Vista and higher), R3 report nicely shows those problem machines.
    • It could be very difficult to pinpoint what is the culprit of machines that will not sleep. It could be a client/server app , a remoteApp (TS connection , Citrix , etc ). Regular rebooting helps the situation!
    • Change currency symbol in your reports from $ to €.
    • The following (non limited list) could cause sleeping issues on windows XP or other machines :
    • •Anti Virus scanner

      •Video Card Drivers

      •Report on “Standard VGA Graphics Adapter”

      •Report on “Video Controller”

      •Report on “Video Controller (VGA Compatible)”

      •Check at vendor if Video card supports S3/S4 principle (white brand desktop)

      •Capable hardware with power management features disabled in BIOS ( S3/S4 )

      •HW BIOS version ( Put them on the same level )

 

These lessons learned sections has been build up by sharing our own experiences at our TAP Customers. Thanks to Panu Saukko (MVP) for also sharing his experiences during his TAP assignment with me.

 

Hope it Helps ,

Kenny Buntinx

SCCM OSD issue with Win7 x64 bit deployment on HP 8740W

12:16 pm in ConfigMgr, ConfigMgr 2007, ConfigMgr 2007 R2, ConfigMgr SP2, configmgr2007, ConfigMgr2007 R3, Deployment, Drivers, Installation, Operating System Deployment, OSD, sccm, SCCM 2007, SCCM 2007 R2, SCCM 2007 R3, SCCM 2007 SP2, sccm2007, Windows 7 by Kenny Buntinx [MVP]

Hi,

I was deploying a windows 7 64 bit, at a customer on a HP 8740W , witch is a monster machine ( core I7 , Nvidia Quatro 512 mb graphics , etc ) but during the step “setup windows and Configmgr” it fails with the following error :

Windows setup failed, code 31

Failed to run the action: Setup Windows and ConfigMgr.
Unspecified error (Error: 80004005; Source: Windows)

Looking further in the SMSTS.log it looks like :

——SMSTSLog—–

Command line for extension .EXE is "%1" %*    OSDSetupWindows    4/29/2010 7:45:19 PM    1576 (0x0628)
Set command line: "\\<yourSCCMServer>\SMSPKGE$\ABC00014\SOURCES\SETUP.EXE" "/unattend:C:\_SMSTaskSequence\unattend.xml" /noreboot    OSDSetupWindows    4/29/2010 7:45:19 PM    1576 (0x0628)
Executing command line: "\\<yourSCCMServer>\SMSPKGE$\ABC00014\SOURCES\SETUP.EXE" "/unattend:C:\_SMSTaskSequence\unattend.xml" /noreboot    OSDSetupWindows    4/29/2010 7:45:19 PM    1576 (0x0628)
Process completed with exit code 31    OSDSetupWindows    4/29/2010 7:45:34 PM    1576 (0x0628)
Windows Setup completed with exit code 31    OSDSetupWindows    4/29/2010 7:45:34 PM    1576 (0x0628)
Entering ReleaseSource() for \\<yourSCCMServer>\SMSPKGE$\ABC00014\    OSDSetupWindows    4/29/2010 7:45:34 PM    1576 (0x0628)
reference count 1 for the source \\<yourSCCMServer>\SMSPKGE$\ABC00014\ before releasing    OSDSetupWindows    4/29/2010 7:45:34 PM    1576 (0x0628)
Released the resolved source \\<yourSCCMServer>\SMSPKGE$\ABC00014\    OSDSetupWindows    4/29/2010 7:45:34 PM    1576 (0x0628)
exitCode == 0, HRESULT=80004005 (e:\nts_sms_fre\sms\client\osdeployment\setupwindows\setupwindows.cpp,440)    OSDSetupWindows    4/29/2010 7:45:34 PM    1576 (0x0628)
Windows setup failed, code 31    OSDSetupWindows    4/29/2010 7:45:34 PM    1576 (0x0628)
setup.run(), HRESULT=80004005 (e:\nts_sms_fre\sms\client\osdeployment\setupwindows\setupwindows.cpp,1707)    OSDSetupWindows    4/29/2010 7:45:34 PM    1576 (0x0628)
Exiting with code 0x80004005    OSDSetupWindows    4/29/2010 7:45:34 PM    1576 (0x0628)
Process completed with exit code 2147500037    TSManager    4/29/2010 7:45:34 PM    1384 (0x0568)

——SMSTSLog—–

 

This error (error 31) could have multiple causes in my environment. I will summarize them below :

  • As I was deploying from OEM Media  kit ( Yes , I know , companies should have a volume license key ) , it could cause some issues as on the OEM Media there is no such thing as a Pid.txt where the product key is stored . OEM media uses the unique key that has been sticked under your pc/ Laptop
  • A badly written Unattend.xml , but as that xml has been used at other customers as well and posted on my blog , it seems unlikely .
  • The Product key mentioned in the Task Sequence . Checked it , no product key mentioned .This error usual happens though because you are using an MAK key when you should not be using any key during the TS — you can use the KMS client key (this is different than the KMS Server key you get from the MVLS site), but this is not required as your KMS client key is embedded in the OS source files in a file called pid.txt mentioned earlier.
  • Faulty Drivers ….

 

I eliminated very soon 2 of the 4 options and was left over with :

  • As I was deploying from OEM Media  kit ( Yes , I know , companies should have a volume license key ) , it could cause some issues as on the OEM Media there is no such thing as a Pid.txt where the product key is stored . OEM media uses the unique key that has been sticked under your pc/ Laptop
  • Faulty Drivers ….

 

Next step I have disabled the step “Auto apply drivers” and magically the setup continued …. That’s funny  , so it has to be a driver….

Now that I know my root cause , lets investigate. The fun part is that Configmgr has the possibility to disable drivers on an easy way.

After some testing it became clear that the “IDT High Definition Audio Codec” was giving me error 31 because it has been written very crappy !

Solution :

  1. Remove the driver from the database
  2. Create a software Package and launch the setup via Setup.exe in your Task Sequence .

 

It now works like a charm .

 

Hope it Helps ,

Kenny Buntinx

Softgrid 4.1 migration towards ConfigMgr with App-V 4.6 Integration : The story of automation , Part 2.

11:13 am in App-V, AppV, ConfigMgr, ConfigMgr 2007, ConfigMgr 2007 R2, ConfigMgr SP2, configmgr2007, ConfigMgr2007 R3, migration, R3, sccm, SCCM 2007, SCCM 2007 R2, SCCM 2007 R3, SCCM 2007 SP2, sccm2007, script, Softgrid, WMI by Kenny Buntinx [MVP]

Yesterday , I have started explaining my little migration project to migrate away from a standalone Softgrid 4.1 infrastrucure towards a fully integrated SCCM2007 SP R2 App-V 4.6 infrastructure . You can read my previous post right here : http://scug.be/blogs/sccm/archive/2010/10/18/softgrid-4-1-migration-towards-configmgr-with-app-v-4-6-integration-the-story-of-automation-part-1.aspx

Below I will discuss the migration scenario once more in a few bullet points to migrate away from the Softgrid 4.1 standalone environment :

  1. Deploy the new app-V 4.6 clients on all workstations and check for inconsistencies (luckily all packages where sequenced with 4.2)  DONE in Part 1
  2. Pull all existing Softgrid 4.2 sequenced packages thru the new App-V 4.6 Sequencer to avoid any complications. DONE in Part 1
  3. Import all packages into ConfigMgr 2007 SP2 R2 DONE in Part 1
  4. Create all necessary collections and create a dynamic membership query with a AD group name.
  5. Create all the necessary advertisements.
  6. Switch over from Softgrid standalone to Configmgr 2007 R2 SP2. (Think about network impact !)

 

So that will leave us to creating all the necessary collections ( remember 400 Pieces ) and their lovely 400 AD Group Memberships as this was how the Softgrid environment worked (User Group Based) before.

You could accomplish this in basically 2 ways , with a Direct or Dynamic collection membership. Both will have different pro’s  & cons and I will try to explain the difference below :

1. Creating a Dynamic collection membership based on the User Group Resource that will point to an AD Security Groups that contains users in AD for Collection Population.

Assuming there is a best case ( not best practice ! ) scenario where  it can take at least a maximum possible latency (In the case below) of = 3hrs 15 minutes

  • AD Replication to happen – 15 minutes.
  • AD Security Group Discovery – 60 minutes (this is a very short setting – default is a day). ( R3 could save you another 55 minutes here with Delta Discovery enabled )

          image

  • As this is a dynamic membership collection , it is bound to a Collection evaluation cycle – 60 minutes (this is a very short setting – default is a day).
  • Configuration Manager Client Policy Refresh – 60 minutes (Default).

2. Creating a Direct collection Membership based on the User Group Resource that will point to an AD Security Groups that contains users in AD for Collection Population.

Assuming there is a worst case scenario where  it can take at least a maximum possible latency (in the case below) of = 60 minutes

  • Configuration Manager Client Policy Refresh – 60 minutes (Default).
  • User may needs to log off and log-on again.

Option nr 1 is not an approach that I’m  in favor off  as it introduces a much higher latency then option nr 2. I can live with the fact that users may need to do a logon/Logoff to receive there applications. As we have decided to go for option nr2 , it is now time to create a script and to do the following :

  1. Create a collection based on the “Virtual app” name that is been extracted out of the manifest.xml found in the folder of the \\<Servername>\VirtualPackageSource\<Package Name> under a allready existing SUB – Collection
  2. When creating the collection , create a direct collection membership with the Application AD Security group Name . (based on the resourceID)

To accomplish step 2 , you will need as prerequisite to turn on AD Security group discovery in your site settings. When done, you could pull out of SQL a *.csv file with all your Security group names and resource id’s as shown below . Please save the file as you will need it in a later phase .

image

Figure 1: This is how SCCM stores their security group information in the SQL db ( ResourceID/SecurityGroup)

Now we start working on the script , as we need the ResourceID to make it work

Below I will post the VBS code to only create 1 collection and link 1 Security Group :


 

Now I need to figure out how to link the ResourceID’s & groups with my softgrid AppID’s & Security Groups ( as shown below )  . However this will not be an easy task as I need to convert a LDAP GUID to a readable security groupname , make the correlation between the previous exported ResourceID/Security group name  and the converted GUID SecurityGroupName/AppID .

image

Figure 2: This is how Softgrid stores their security group information in the SQL db ( AppID/SecurityGroup (GUID))

Stay tuned for Part 3 very soon ….

 

Hope it Helps ,

 

Kenny Buntinx

Softgrid 4.1 migration towards ConfigMgr with App-V 4.6 Integration : The story of automation , Part 1.

8:05 pm in App-V, AppV, ConfigMgr, ConfigMgr 2007 R2, ConfigMgr SP2, configmgr2007, ConfigMgr2007 R3, Installation, migration, R3, sccm, SCCM 2007 R2, SCCM 2007 R3, SCCM 2007 SP2, sccm2007, script, SDK, Softgrid, Toolkit by Kenny Buntinx [MVP]

Today we have reached the second phase of migrating the existing Softgrid 4.1 stand-alone infrastructure towards the already upgraded and optimized System Center Configuration Manager 2007 SP2 R2 that we did in fase 1.

We all know that integrating a standalone Softgrid/App-V infrastructure towards a integrated Configmgr 2007 SP2 R2 – App-V implementation could only be done with a big bang. It is either On or Off. We also know that Softgrid sequenced app’s lower then version 4.5 can cause issues and more important , they are lacking the manifest.xml file that is necessary to create virtual packages in ConfigMgr 2007 SP2 R2.

 

image

 

Below I will discuss the migration scenario in a few bullet points to migrate away from the Softgrid 4.1 standalone environment “

  1. Deploy the new app-V 4.6 clients on all workstations and check for inconsistencies (luckily all packages where sequenced with 4.2)
  2. Pull all existing Softgrid 4.2 sequenced packages thru the new App-V 4.6 Sequencer to avoid any complications.
  3. Import all packages into ConfigMgr 2007 SP2 R2
  4. Create all necessary collections and create a dynamic membership query with a AD group name.
  5. Create all the necessary advertisements.
  6. Switch over from Softgrid standalone to Configmgr 2007 R2 SP2. (Think about network impact !)

 

Step 1 :

As the old Softgrid 4.1 stand-alone infrastructure has around 400 virtual packages , and they need to pass thru the app-V 4.6 sequencer to avoid any inconsistencies or complications , the last thing you want to do is play the monkey and open up all packages in the sequencer and save them manually … For this part I had very good teamplayers that are very skilled VBscript writers , again a big thank you to Ewald Lieuwes ( http://www.wchulseiee.net/) & Wouter Schrijvens …

Below I will post the VBS code written for :

 

  1. Going thru the list of virtual packages stored at E:\Softgrid\<Package Name>….
  2. Open them one by one in the App-V 4.6 sequencer and save then to a new location called F:\App-V\<Package Name> to have a backup!
  3. As you see in this script ,we use E:\, F:\ and U:\. The U:\ is the virtual drive partition (default this is Q:\)
  4. Make sure the virtual drive partition is big enough for all of your packages. In this case, this was limited to 2 GB ( standard as Softgrid 4.1 has this limitation of 2 GB in the size of sequenced apps ). We had to resize this to 50 GB.

 

 The code :


 

Step 2 :

As we need to import all 400 upgraded App-V 4.6 virtual packages into ConfigMgr , the last thing you want to do is play the monkey and create all packages in ConfigMgr 2007 R2 SP2 by hand … For this part I had a very good teamplayers that are very skilled VBscript writers , again a big thank you to Ewald Lieuwes ( http://www.wchulseiee.net/) & Wouter Schrijvens …

 

You could do it by using the ConfigMgr SDK , located at http://www.microsoft.com/downloads/en/details.aspx?familyid=064a995f-ef13-4200-81ad-e3af6218edcc&displaylang=en or you could use a standard base script that is located under <Drive>\<PathWhereYouInstalledSCCM>\Tools\VirtualApp\ManageVappPackage.vbs and wrap another VB script around it to build in some other checks or functionalities.

I used the default script located  under <Drive>\<PathWhereYouInstalledSCCM>\Tools\VirtualApp\ManageVappPackage.vbs and wrap another VB script around it .

Below I will post the VBS code written for :

 

  1. Going thru the list of upgraded 4.6 virtual packages stored at a DFS share \start\sccmsrc\[VIRTUALPACKAGESRC]\">\start\sccmsrc\[VIRTUALPACKAGESRC]\">\start\sccmsrc\[VIRTUALPACKAGESRC]\">\\<YourDomainName>\start\sccmsrc\[VIRTUALPACKAGESRC]\<Package Name>….
  2. Create a Source directory App-V package Folder for SCCM , In this case \\<ServerName\VIRTUALPKG$\<Package Name>… , if not exists.
  3. Import the App-V Package in ConfigMgr and add it to the distribution points , called \\CMSRV and \\CMDPMP
  4. Run this script on your SCCM box where your SCCM provider is installed !!

 

The code :


 

In Part 2 , I will continue to blog , if I technically manage to succeed in the following days to do the following :

  • Create all necessary collections and create a dynamic membership query with a AD group name on a automated fashion.
  • Create all the necessary advertisements on an automated fashion.

     

    Come back and check soon.

     

    Hope it Helps ,

     

    Kenny Buntinx

  • System Center Configuration Manager 2007 R3 has arrived

    6:11 pm in configmgr2007, ConfigMgr2007 R3, R3, SCCM 2007 R3 by Kenny Buntinx [MVP]

    Today Jeff Wettlaufer has announced at http://blogs.technet.com/b/systemcenter/archive/2010/10/14/configuration-manager-2007-r3-is-here.aspx that ConfigMgr R3 has been RTM’ed.

    You must all known as well that this is the FIRST release EVER within Microsoft been made that carries the name R3.

    Soon I will write a blog on how to install the final RTM code & if you really want to know how it really works in practice and what the caveats are , come to my session “ConfigMgr R3 , Notes from the field” at our own Belgian System Center Day at November 3thd. Register at http://systemcenterday.eventbrite.com/

    I am very excited to announce and to talk about the release of System Center Configuration Manager 2007 R3. ConfigMgr R3 drives new scenario support to existing world class capabilities.

    Below I will list a few :

    • Power Management for Green IT. When combined with competitive, environmental and regulatory pressure, it is really exciting to deliver centralized, policy based Power Management in ConfigMgr.
    • With ConfigMgr R3, 300,000 managed clients per hierarchy could be managed.
    • By tightening the key relationship to Active Directory with finer, more granular polling and delta monitoring, and marrying this with a new ability to rapidly populate those changes into collections. 
    • Some additional OSD Scenarios , such a Pre-staged Media.
    • Some always wanted ConfigMgr Administrator console extensions , such as “Add a resource to a collection” on a simplified way.

     

    See you at 3 November @ Living Tomorrow when delivering an ConfigMgr R3 session .

     

    Kenny Buntinx.

    ConfigMgr Dashboards and Software Update General Compliance Gauge

    11:25 am in AdminUi, ConfigMgr, ConfigMgr 2007, ConfigMgr 2007 R2, ConfigMgr Dashboards, ConfigMgr SP2, configmgr2007, Dashboards, Reporting, sccm, SCCM 2007, SCCM 2007 R2, SCCM 2007 R3, SCCM 2007 SP2, SCCM Dashboards, sccm2007, SQL, SQL Reporting services, SRS by Kenny Buntinx [MVP]

    Microsoft released last year the Configuration Manager 2007 dashboards.A dashboard is basically a webpage containing multiple reports with graphs. The dashboard is a WSS 3.0 / MOSS 2007 solution that tries to give an high level graphical representation of the data contained in ConfigMgr. This enables ConfigMgr administrators to have multiple information in reports on a single page or in this case to help IT managers what is happening in their environment without all the report data .

    A manager at a customer asked me if it would be possible to have a general percentage of Software Update Percent Compliance spread over all the Software deployment Management advertisements that are targeted to Pre-Production and Production.

    To accomplish this written a SQL query to to this . As I don’t take all the credit for doing this , I will refer to them during my blog post .

    I started with getting my initial report SQL code from Kent Agerlund (MVP configMgr) on http://blog.coretech.dk/confmgr07/config-mgr-inventory-and-reporting/status-report-for-software-update-deployments/

    As soon as I used this SQL Query in My SCCM Dashboards , I quickly saw that I could not use the value “% Compliance” on the Y axis in combination with my “Deployment” name. It is shown below in the picture :

     

    image

     

    As I needed to have the Percentage of my total compliance spread over my SDM Lists ,  I needed to modify the query . I want to special thank Raghu Kethineni for his help understanding this query .This is how the SQL query should look like to use the value “% Compliance” on the Y axis in combination with my “Deployment” name :

     

    Select Deploymentname, Available, Deadline,

    cast(((cast([Compliant] as float) / (ISNULL([Compliant], 0) + ISNULL([Enforcement state unknown], 0) + ISNULL([Successfully installed update(s)], 0) + ISNULL([Failed to install update(s)], 0) + ISNULL([Installing update(s)], 0) + ISNULL([Waiting for another installation to complete], 0) + ISNULL([Pending system restart], 0) + ISNULL([Downloading update(s)], 0)))*100) as Numeric(10,2)) AS ‘% Compliant’,

      [Compliant],

      [Enforcement state unknown],

      [Successfully installed update(s)],

      [Failed to install update(s)],

      [Installing update(s)],

      [Waiting for another installation to complete],

      [Pending system restart],

      [Downloading update(s)]

    From

    (select

    a.AssignmentName as DeploymentName,

    a.StartTime as Available,

    a.EnforcementDeadline as Deadline,

    sn.StateName as LastEnforcementState,

    count(*) as NumberOfComputers

    from v_CIAssignment a

    join v_AssignmentState_Combined assc

    on a.AssignmentID=assc.AssignmentID

    join v_StateNames sn

    on assc.StateType = sn.TopicType and sn.StateID=isnull(assc.StateID,0)

    group by a.AssignmentName, a.StartTime, a.EnforcementDeadline,

          sn.StateName) as PivotData

    PIVOT

    (

    SUM (NumberOfComputers)

    FOR LastEnforcementState IN

    ( [Compliant],

      [Enforcement state unknown],

      [Successfully installed update(s)],

      [Failed to install update(s)],

      [Installing update(s)],

      [Waiting for another installation to complete],

      [Pending system restart],

      [Downloading update(s)])

    ) AS pvt

    ****** SQL Query end ******

    After modifying the SQL query , the value appeared in the list as shown below in the attached picture :

    image

     

    If you need to select specific SDM advertisements , like I had to split up “Pre-Production” from “Production” , I had to modify my SQL query once again by adding a filter as show in the code below . In this case we want to only have the Production .

    ****** SQL Query ******

    Select Deploymentname, Available, Deadline,
    cast(((cast([Compliant] as float) / (ISNULL([Compliant], 0) + ISNULL([Enforcement state unknown], 0) + ISNULL([Successfully installed update(s)], 0) + ISNULL([Failed to install update(s)], 0) + ISNULL([Installing update(s)], 0) + ISNULL([Waiting for another installation to complete], 0) + ISNULL([Pending system restart], 0) + ISNULL([Downloading update(s)], 0)))*100) as Numeric(10,2)) AS ‘% Compliant’,
      [Compliant],
      [Enforcement state unknown],
      [Successfully installed update(s)],
      [Failed to install update(s)],
      [Installing update(s)],
      [Waiting for another installation to complete],
      [Pending system restart],
      [Downloading update(s)]
    From
    (select
    a.AssignmentName as DeploymentName,
    a.StartTime as Available,
    a.EnforcementDeadline as Deadline,
    sn.StateName as LastEnforcementState,
    count(*) as NumberOfComputers
    from v_CIAssignment a
    join v_AssignmentState_Combined assc
    on a.AssignmentID=assc.AssignmentID
    join v_StateNames sn
    on assc.StateType = sn.TopicType and sn.StateID=isnull(assc.StateID,0)
    where AssignmentName NOT like ‘%_PREPROD_%’
    group by a.AssignmentName, a.StartTime, a.EnforcementDeadline,
          sn.StateName) as PivotData
    PIVOT
    (
    SUM (NumberOfComputers)
    FOR LastEnforcementState IN
    ( [Compliant],
      [Enforcement state unknown],
      [Successfully installed update(s)],
      [Failed to install update(s)],
      [Installing update(s)],
      [Waiting for another installation to complete],
      [Pending system restart],
      [Downloading update(s)])
    ) AS pvt

    ****** SQL Query end ******

     

    If done and you saved your dashboard  query , It will look like this :

     

    image

     

    Hope It Helps  ,

     

    Kenny Buntinx

    Configmgr OSD Task sequence ; Success or Failure notification

    2:12 pm in ConfigMgr, ConfigMgr 2007, ConfigMgr 2007 R2, ConfigMgr SP2, configmgr2007, ConfigMgr2007 R3, Operating System Deployment, OSD, R3, sccm, SCCM 2007, SCCM 2007 R2, SCCM 2007 R3, SCCM 2007 SP2, sccm2007 by Kenny Buntinx [MVP]

    A customers demanded for local support staff to have a simple feature in ConfigMgr 2007 . This feature would be that when operating system deployment has been launched in production , the Local Support staff would receive a simple email to say that their deployment was succeeded or not without touching any ConfigMgr console. Out of the box , this was not feasible . A colleague of mine ( Merlijn  Vanwaeyenberghe)  at  that particular customer found a rather simple but effective solution .

    The steps to reproduce this solution are mentioned below :

    1. Go to the Status filer Rules  in the following section  :

    image 

    2. Create two status filter rules as shown below .

    image

    3.Configure the Status filter Rules as shown below. Create a Status Filter Rule with the following properties:

    · To notify when a specific TS has succeeded:

      • Source: ConfigMgr Client
      • Site Code: site code
      • Message ID: 11143
      • Property: Package ID
      • Property Value: Package ID for the OSD Task Sequence to be monitored

    image

    · To notify when a specific TS has failed:

      • Source: ConfigMgr Client
      • Site Code: site code
      • Component: Task Sequence Engine
      • Severity: Error
      • Property: Package ID
      • Property Value: Package ID for the OSD Task Sequence to be monitored

    image

    · Actions for both cases:

      • Create 2 Powershell scripts on your local drive. In my case D:\scripts\TSSucceeded_Email_Notification.PS1 and D:\scripts\TSFailed_Email_Notification.PS1 with the following code snippets that are listed below.

    image

    **********Code Snippet – FAILED ***********

    param([string]$strComputerName)
    $erroractionpreference = "SilentlyContinue"
    $strSMTP = "Your SMTP server "
    $strSubject = $strComputerName+": OS Deployment FAILED"
    $strBody = @"
    The OSD Task Sequence "The name of your tasksequence" has

        * FAILED *

    op $strComputerName

    http://yourSCCMServer/SMSReporting_XXX/Report.asp?ReportID=143&AdvertID=90020066&ComputerName=$strComputerName&SortRs1Col=1&SortRs1Dir=2
    "@
    $MailMessage = New-Object System.Net.Mail.MailMessage
    $SMTPClient = New-Object System.Net.Mail.smtpClient
    $SMTPClient.host = $strSMTP
    $Sender = New-Object System.Net.Mail.MailAddress("zzz@Yourcompany.zzz ", "SCCM”)
    $Recipient = New-Object System.Net.Mail.MailAddress( “zzz@Yourcompany.zzz, "ZZZ")
    $MailMessage.Sender = $Sender
    $MailMessage.From = $Sender
    $MailMessage.Subject = $strSubject
    $MailMessage.To.add($Recipient)
    $MailMessage.Body = $strBody
    $SMTPClient.Send($MailMessage)

    ***********Code Snippet – FAILED ***********

    **********Code Snippet – SUCCEEDED **************

    param([string]$strComputerName)
    $erroractionpreference = "SilentlyContinue"
    $strSMTP = "Your SMTP server "
    $strSubject = $strComputerName+": OS Deployment Succeeded"
    $strBody = @"
    The OSD Task Sequence "The name of your tasksequence"" is

        * SUCCEEDED *

    op $strComputerName
    "@
    $MailMessage = New-Object System.Net.Mail.MailMessage
    $SMTPClient = New-Object System.Net.Mail.smtpClient
    $SMTPClient.host = $strSMTP
    $Sender = New-Object System.Net.Mail.MailAddress("zzz@Yourcompany.zzz ", "SCCM")
    $Recipient = New-Object System.Net.Mail.MailAddress("zzz@Yourcompany.zzz ", "ZZZ")
    $MailMessage.Sender = $Sender
    $MailMessage.From = $Sender
    $MailMessage.Subject = $strSubject
    $MailMessage.To.add($Recipient)
    $MailMessage.Body = $strBody
    $SMTPClient.Send($MailMessage)

    **********Code Snippet – SUCCEEDED ***********

     

      • Run a program: path to program with optional parameters !! DO NOT USE "QUOTES" !!

             image

             In this Case : c:\windows\system32\WindowsPowerShell\v1.0\powershell.exe -file D:\scripts\TSSucceeded_Email_Notification.PS1 %msgsys

     

    Status filter rules can be used to perform an action when an event has occurred, for instance when an OSD Task Sequence has completed successfully or has failed, an email can be sent out to the OS staging team to inform them as shown above . Don’t let it stop you doing it for other tasks as well . Special thanks to my colleague Merlijn Vanwaeyenberghe for sharing this with us .

     

    Hope it Helps ,

     

    Kenny Buntinx

    ConfigMgr : Query builder Values box cannot display large item list

    12:16 pm in AdminUi, ConfigMgr, ConfigMgr 2007, ConfigMgr 2007 R2, ConfigMgr SP2, configmgr2007, ConfigMgr2007 R3, sccm, SCCM 2007, SCCM 2007 R2, SCCM 2007 R3, SCCM 2007 SP2, sccm2007 by Kenny Buntinx [MVP]

    This is still an old one , but I can imagine some admins are still freaking out when seeing this .

    In Microsoft System Center Configuration Manager (SCCM) 2007 , when trying to build a query that contains add/remove programs , most of the times it does not gives you the complete list. To solve this , you need to do the steps below :

    In Microsoft System Center Configuration Manager (SCCM) 2007, find the registry key below :

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ConfigMgr\AdminUI\QueryProcessors\ValueLimit

    ValueLimit is a registry entry under the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ConfigMgr\AdminUI\QueryProcessors registry subkey.
    ValueLimit should be a dword value. The value signifies how many items are returned when the user clicks the values button in the criterion dialog box. This is an optional value. The default value is 2000 if no key exists. If users want to override the default value, they can create the registry key.

     

    Hope it Helps ,

    Kenny

    Configmgr Query : Not Installed Software & Subselect Query’s

    8:48 am in AdminUi, ConfigMgr, ConfigMgr 2007, ConfigMgr 2007 R2, ConfigMgr SP2, configmgr2007, ConfigMgr2007 R3, sccm, SCCM 2007, SCCM 2007 R2, SCCM 2007 R3, SCCM 2007 SP2, sccm2007 by Kenny Buntinx [MVP]

    Scenario :

    You need to make a query where following items need to be taking into consideration :

    • Dot.net Framework 3.5SP1 is not installed or visible in add/remove programs
    • The machine needs to be a windows XP client
    • The machine must have a SCCM client installed

    Problem :

    Add Remove Programs / Display Name DOES NOT EQUAL "Microsoft .NET Framework 3.5 SP1" , gives me way to much records.
    The problem that we are running into is that the query does not properly exclude the clients with .Net 3.5 SP1 because there are other programs on the Add Remove Programs list that aren’t .Net Framework 3.5 SP1. It simply does what you have been asking for.

    Solution :

    In Configmgr, you have to use a sub select query to accomplish this. To get the expected results you have to run one query that selects all computers that DO have .NET 3.5 SP1, then you run another query that gives you all of the computers that are NOT in the first query. This is called a subselect query. In my example we wanted all workstations without .NET 3.5 SP1.

    Create a query  “All systems with .NET 3.5 SP1” query. This will be used by the subselect query later on.

    ******************************** Code *****************************************

    select distinct SMS_R_System.ResourceId, SMS_R_System.Name from  SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = "Microsoft .NET Framework 3.5 SP1"

    ******************************** Code End *****************************************

    That query shows all computers that DO have .NET 3.5 SP1 installed. This will be used by the subselect query to not include those systems in the final results.

    Create the Subselect Dynamic Collection Query that will filter out only those machine that do not have a  .Net 3.5 Framework Sp1 installed

    ******************************** Code *****************************************

    select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.ResourceId not in (select distinct SMS_R_System.ResourceId from  SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName = "Microsoft .NET Framework 3.5 SP1") and SMS_R_System.Client = 1 and SMS_R_System.OperatingSystemNameandVersion = "Microsoft Windows NT Workstation 5.1"

    ******************************** Code End *****************************************

    Hope it Helps ,

     

    Kenny Buntinx

    Configmgr2007 : Change your packages source path after SCCM site migration with a script

    6:39 am in AdminUi, ConfigMgr, ConfigMgr 2007, ConfigMgr 2007 R2, ConfigMgr SP2, configmgr2007, ConfigMgr2007 R3, Installation, migration, sccm, SCCM 2007, SCCM 2007 R2, SCCM 2007 R3, SCCM 2007 SP2, sccm2007, script, SMS, Sms 2003 by Kenny Buntinx [MVP]

    A few days ago , I explained in this blogpost “http://scug.be/blogs/sccm/archive/2010/08/10/configmgr-connecting-primary-child-sites-to-central-primary-parent-site-in-and-out-of-same-domain.aspx“ on how I was busy migrating one SCCM 2007 Primary site to another , because we wanted to start with a complete new environment (w2k8 x64) .As there is no supported direct upgrade path, I built an entire new SCCM server with SP2 -R2.I made it a child site of the existing SCCM primary site and let all the packages replicate.

    After I solved a problem with locked padlocks on my packages in this blogpost :”http://scug.be/blogs/sccm/archive/2010/08/11/configmgr-locked-packages-after-sccm-site-migration-and-how-to-solve-it.aspx”, I needed to make sure that I would change all my old packages source paths ( a.e \\SCCM01\G$\src\<package folder> into my new package source paths (a.e \\Fileserver1\SCCMSRC\<package folder> that was residing on a DFS share .

    To do that I needed a script , as doing +- 100 packages was a little to much work for a lazy admin :-)

    I thought I had a great script from the site of Brian S. Tucker , as I used it already multiple times. It turned out that it was useless in this project as I needed to change not only the server name , but the complete path.

    Script 1 : If you only need to change the server name in the package source path. Otherwise use my script “script 2” in the section under “script 1” below .

    Copy code below this line—————————————————

    Dim oWbemServices
    If UCase(Right(Wscript.FullName, 11)) = "WSCRIPT.EXE" Then
        Wscript.Echo "This script must be run under CScript."
        Wscript.Quit
    End If
    If WScript.Arguments.Count <> 1 Then
        WScript.Echo "Wrong number of arguments were passed."
        WScript.Quit
    End If
    CONNSCCM()

    For Each oPackage In oWbemServices.execquery("select * from sms_package")
      sOldPathString = oPackage.pkgsourcepath
      If InStr(sOldPathString,"\\") Then
                    iStart = InStr(3,sOldPathString,"\")
                    sNewPathString = Right(sOldPathString,(LEN(sOldPathString)-iStart))
                    sNewPathString = "\\" & WScript.Arguments(0) & "\" & sNewPathString
                    WScript.Echo "Setting Package Path for " & oPackage.Name & " from " & sOldPathString & " to " &  sNewPathString
                    oPackage.pkgsourcepath = sNewPathString
                    oPackage.put_
      End If
    Next

    WScript.Echo "Done"

    Sub CONNSCCM()
      Set oWbemLocator = CreateObject("WbemScripting.SWbemLocator")
      Set oWbemServices = oWbemLocator.ConnectServer(".", "root\sms")
      Set oSCCMProvLoc = oWbemServices.InstancesOf("SMS_ProviderLocation")

      For Each oLoc In oSCCMProvLoc
            If oLoc.ProviderForLocalSite = True Then
                Set oWbemServices = oWbemLocator.ConnectServer(oLoc.Machine, "root\sms\site_" + oLoc.SiteCode)
            End If
      Next
    End Sub

    Copy code above this line—————————————————

    Thanks to my fellow Belgium MVP ”Kim Oppalfens” , I was able to alter the above script to my needs and change the complete source path , except for the package source folder .

    Script 2 : If you need to change the complete package source path , except the package folder name.

    Copy code below this line—————————————————

    on error resume next
    Dim oWbemServices
    Set fs = CreateObject ("Scripting.FileSystemObject")
    Set logFile = fs.CreateTextFile ("pkg_log.csv")
    CONNSCCM()

    For Each oPackage In oWbemServices.execquery("select * from sms_package")
      sOldPathString = oPackage.pkgsourcepath
      If InStr(sOldPathString,"\\") Then 
      arrsrcPath = Split( soldPathString, "\")
      snewpathString = "\\Fileserver1\sccmsrc\" & arrsrcPath(Ubound(ArrSrcPath)-0)

                    logFile.Write "Setting Package Path for " & oPackage.Name & " from " & sOldPathString & " to " &  sNewPathString
                    logFile.WriteLine ""
                    oPackage.pkgsourcepath = sNewPathString
                    oPackage.put_
      End If
    Next

    WScript.Echo "Done"

    Sub CONNSCCM()
      Set oWbemLocator = CreateObject("WbemScripting.SWbemLocator")
      Set oWbemServices = oWbemLocator.ConnectServer(".", "root\sms")
      Set oSCCMProvLoc = oWbemServices.InstancesOf("SMS_ProviderLocation")

      For Each oLoc In oSCCMProvLoc
            If oLoc.ProviderForLocalSite = True Then
                Set oWbemServices = oWbemLocator.ConnectServer(oLoc.Machine, "root\sms\site_" + oLoc.SiteCode)
            End If
      Next
    End Sub

     

    Copy code above this line—————————————————

     

    Hope it helps ,

     

    Kenny Buntinx