Showing posts with label Collection. Show all posts
Showing posts with label Collection. Show all posts

Wednesday, July 16, 2014

How to create a collection based on a Message ID 11171

At some customer they were asking me how to create a collection in ConfigMgr, based on a Message ID. In this case this must be Message ID 11171, which tells me that systems are deployed successfully. I did a lot of try outs, but none was successful after all. Let's have a look.

In this case some OS deployments are successful, some are in progress, in error, requirements not met, or unknown status. Because the information is in the ConfigMgr database, it must be easy (I guess) to show this information in collections as well. Strange thing is, I couldn't find it on all WQL options available..

After a few tries I did created a query which showed me some information. Unlucky me it showed around 240 systems, where Monitoring status showed me around 650 systems successful. Why not showing ALL systems deployed successfully? Limiting collection was "All Systems" which is limiting to, well.. ALL systems ;)

Let's have a look at the query used:
=========================
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  
 JOIN sms_statusmessage ON sms_R_System.netbios_name0 = sms_statusmessage.machinename   
 JOIN sms_StatMsgInsStrings ON sms_statusmessage.RecordID = sms_StatMsgInsStrings.RecordID  
WHERE sms_statusmessage.messageid = "11171" 
AND sms_StatMsgInsStrings.InsStrValue = "The task sequence manager successfully completed execution of the task sequence"

=========================

Does anyone knows how long this information can be used on collection membership? Because both Monitoring status and Reporting services are showing me around 650 systems, this must be possible in collection membership to? Hope to find a WQL query for doing that soon! When possible in WQL options I like to hear it also ;) 

Friday, April 4, 2014

Chassis Types and query-based Collections (part 2)

Last month I published a blogpost about WMI queries on PCSystemType. This blogpost can be found here: How to add devices to different OU’s during deployment. This can be used during a task sequence deployment to decide if the system is a desktop or laptop (for example). This time I want to create collections on PCSystemType. Because this can't be found in a collection query (no PCSystemType there) you can use the following configuration.
 
A good way to target systems in queries and collections is by Chassis Type. When using a query rule on collections, use these values:
Choose System Enclosure - Chassis Types in the query
 
Choose a value based on the Chassis Type (see list below)
 
Let's have a look at the possibilities: 
  • 1 Other (Virtual Machine)
  • 2 Unknown
  • 3 Desktop (Virtual machines as well)
  • 4 Low Profile Desktop
  • 5 Pizza Box
  • 6 Mini Tower
  • 7 Tower
  • 8 Portable (Laptop or Notebook)
  • 9 Laptop (Not as popular)
  • 10 Notebook (Popular)
  • 11 Hand Held
  • 12 Docking Station (Laptop or Notebook)
  • 13 All in One (Apple Inc.)
  • 14 Sub Notebook
  • 15 Space-Saving (Thin Client)
  • 16 Lunch Box
  • 17 Main System Chassis (Physical Server)
  • 18 Expansion Chassis
  • 19 Sub Chassis
  • 20 Bus Expansion Chassis
  • 21 Peripheral Chassis (Laptop or Notebook)
  • 22 Storage Chassis
  • 23 Rack Mount Chassis (Physical Server)
  • 24 Sealed-Case PC
 
To see which device you are using, use the following query: wmic systemenclosure get chassistypes. Because I have the choice between 1, 3, 10 and 15 (for example) this should be Other, Desktop, Notebook and Space-Saving (Thin Client).

Let's use query-based Collections in ConfigMgr as much as possible!

More blogposts on this topic:
How to add devices to different OU’s during deployment

Thursday, March 27, 2014

Most popular scripts, tools and queries for ConfigMgr usage

During ConfigMgr installation I'm using a lot of scripts, tools and queries. These are most used during or after OS deployment to get the job done. In this blogpost I mention a few of most popular scripts, tools and queries used. Have fun using them!
 
Adding Computer to AD groups during deployment
Application E-Mail Approval Tool
Automate Computer Name during OSD
ConfigMgr Console Extensions
Enabling and Disabling Microsoft Update in Windows 7
Group Policy WMI filters
Move computer object to another OU
Powershell Right Click Tools
Powershell script collection for ConfigMgr 2012
Remove from collection and clear PXE flag
Re-run Task Sequence Tool 1.0
RIGHT CLICK TOOLS FOR SCCM 2012 CONSOLE
SCCM 2012 Management Scripts
SCCM Client Actions Tool PowerShell Edition
Showing the Collection Membership of a Resource
System Center 2012 R2 Configuration Manager Toolkit

Update1:
Deploy Wifi profiles with SCCM
Endpoint Protection Definition Script
Remove Client from Collection after OSD 1.1
Show Collection Details right-click action
Show Maintenance Windows information for a device
 
Update 2:
Dell Command | Integration Suite for System Center
HP Client Integration Kit for ConfigMgr 2012 R2
Now Micro Right Click Tools (free)
Remove Expired & Superseded Updates in SUGs
Set of Operational SCCM Collections

Update 3:
Add computer to security group during OSD
System Center Endpoint Protection Policy Templates
ConfigMgr Prerequisites Tool 1.4.1

Even more scripts, tools and queries can be found here: "System Center - resources for IT professionals".