Today I started a Cumulative Update 3 installation, which is the most recent one on ConfigMgr 2012 R2. As always (?) a reboot is needed before installation is started. This will be mentioned in the prerequisites wizard. After reboot however, installation hung on the first step. Stopping services.. This on the Windows Management Instrumentation (WMI) service. Let's have a look how to stop this service manually.
First have a look in the Services console for the service name. In this case the service is called WinMgmt. Then open a Command Prompt and type in the following command:
-sc queryex [servicename]
Replace [servicename] with the services registry name.
After running the query the PID is showed, which is 836 in my case. Type in the following command to stop it definitely:
-taskkill /f /pid [PID]
Replace [PID] with the number showed before.
This will forcefully kill the hung service! After that installation can be continued as expected.
Showing posts with label Query. Show all posts
Showing posts with label Query. Show all posts
Friday, December 12, 2014
Stop a hung service during Cumulative Update installation
Labels:
Kill service,
PID,
Query,
Service,
Stop service,
Taskkill,
WMI
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:
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 ;)
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 ;)
Labels:
11171,
Collection,
Completing Statistics,
Message ID,
Query,
ResourceID,
ResourceType,
SMS_R_SYSTEM,
Status,
Success,
Successfully,
WQL
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:
Let's have a look at the possibilities:
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
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
Labels:
Chassis Type,
Collection,
PCSystemType,
Query,
System Enclosure,
WMI,
WMI Query,
WMIC
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".
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".
Labels:
Collection,
Computername,
Group Policy,
PowerShell,
Queries,
Query,
Scripts,
Task Sequence,
Toolkit,
Tools
Tuesday, November 1, 2011
Create new Windows collections based on Query rules
Collections in ConfigMgr can be used for dynamic view. This will happen when a Query rule is used, based on Operating Systems or Active Directory containers (for example). There are a few blogs which describes this functionality already:
How to create a query based on Direct membership is described here:
How to configure ConfigMgr collections to Active Directory containers is described here:
In this blog I will describe how to create a new collection with Query rule.
First create a new collection in ConfigMgr and choose Membership rules based on Query rule. Click the [yellow database icon] and choose the query explained below. Choose "Dynamically add new resources" when using ConfigMgr R3 to automatically add new devices.
In this case I'm using a Resource class based on System Resource and "Edit Query Statement" for creating a new Query rule.
Select the Criteria tab and the [yellow star icon] for that. Click "Select" afterwards.
In this case I'm using a Attribute class based on System Resource and a Attribute based on "Operating System Name and Version".
When choose OK in the screen before (Select Attribute) the above screen will be displayed. Choose [Operator: Is Like] and Value based on Operating System variable here.
When choose OK in the screen before (Criterion Properties) the above screen will be displayed. Click OK afterwards.
The new collection with Query rule is ready now. All Windows 7 systems (in my case) will be automatically added in this new collection.
For new Windows releases use the following queries:
That way it's possible to create new collections with support on new Operating Systems. I will add support for new Operating Systems later when available.
How to create a query based on Direct membership is described here:
How to configure ConfigMgr collections to Active Directory containers is described here:
- Creating dynamic collections in ConfigMgr
- Configure dynamic collections in ConfigMgr
- Query ConfigMgr collections with Active Directory
In this blog I will describe how to create a new collection with Query rule.
First create a new collection in ConfigMgr and choose Membership rules based on Query rule. Click the [yellow database icon] and choose the query explained below. Choose "Dynamically add new resources" when using ConfigMgr R3 to automatically add new devices.
In this case I'm using a Resource class based on System Resource and "Edit Query Statement" for creating a new Query rule.
Select the Criteria tab and the [yellow star icon] for that. Click "Select" afterwards.
In this case I'm using a Attribute class based on System Resource and a Attribute based on "Operating System Name and Version".
When choose OK in the screen before (Select Attribute) the above screen will be displayed. Choose [Operator: Is Like] and Value based on Operating System variable here.
When choose OK in the screen before (Criterion Properties) the above screen will be displayed. Click OK afterwards.
The new collection with Query rule is ready now. All Windows 7 systems (in my case) will be automatically added in this new collection.
For new Windows releases use the following queries:
- Windows Vista: Value = %Workstation 6.0%
- Windows 7: Value = %Workstation 6.1%
- Windows 8: Value = %Workstation 6.2%
- Windows Server 2008: Value = %Server 6.0%
- Windows Server 2008 R2: Value = %Server 6.1%
- Windows Server 8: Value = %Server 6.2%
That way it's possible to create new collections with support on new Operating Systems. I will add support for new Operating Systems later when available.
Labels:
Active Directory,
Collections,
Membership Rules,
Query
Thursday, October 20, 2011
How to create or change new Windows collections in ConfigMgr
By default there are 17 collections in ConfigMgr. Most of them will never be used, so they can be moved as subcollection for overview reasons. How to do that is described here: Move default collections in ConfigMgr 2007. That way collections for Windows 2000, Mobiles devices and Windows XP (for example) will be out of sight in collections overview.
Collections that can be moved (in my case) are:
Most of times I create a "_Unused Microsoft Collections" collection to move old/not used collections too. That way the Collection ID and used query will retained. Now it's time to create new collections or change existing collection queries. This for new Operating Systems like Windows Vista, Windows 7, Windows Server 2008 and Windows Server 2008 R2 (for example). The steps needed for that I will describe here.
First create a new collection in ConfigMgr and choose Membership rules based on direct membership. Click the [blue computer icon] and choose the query explained below. In this case I'm using a Resource class based on System Resource and a Attribute name based on "Operating System Name and Version". Choose "Dynamically add new resources" when using ConfigMgr R3 to automatically add new devices.
Furthermore don't use Collection limiting and select resources needed when displayed. Otherwise the query will not be saved. Then choose Finish, Next (3x) and Finish to save the new collection with query created. To change an existing collection query, choose collection properties, go to Membership Rules, edit the query, choose "Edit Query statement" and Criteria. Then choose edit to change the existing query.
For new Windows releases use the following queries:
That way it's possible to create new collections with support on new Operating Systems. I will add support for new Operating Systems later when available.
Collections that can be moved (in my case) are:
Most of times I create a "_Unused Microsoft Collections" collection to move old/not used collections too. That way the Collection ID and used query will retained. Now it's time to create new collections or change existing collection queries. This for new Operating Systems like Windows Vista, Windows 7, Windows Server 2008 and Windows Server 2008 R2 (for example). The steps needed for that I will describe here.
First create a new collection in ConfigMgr and choose Membership rules based on direct membership. Click the [blue computer icon] and choose the query explained below. In this case I'm using a Resource class based on System Resource and a Attribute name based on "Operating System Name and Version". Choose "Dynamically add new resources" when using ConfigMgr R3 to automatically add new devices.
Furthermore don't use Collection limiting and select resources needed when displayed. Otherwise the query will not be saved. Then choose Finish, Next (3x) and Finish to save the new collection with query created. To change an existing collection query, choose collection properties, go to Membership Rules, edit the query, choose "Edit Query statement" and Criteria. Then choose edit to change the existing query.
For new Windows releases use the following queries:
- Windows Vista: Value = %Workstation 6.0%
- Windows 7: Value = %Workstation 6.1%
- Windows 8: Value = %Workstation 6.2%
- Windows Server 2008: Value = %Server 6.0%
- Windows Server 2008 R2: Value = %Server 6.1%
- Windows Server 8: Value = %Server 6.2%
That way it's possible to create new collections with support on new Operating Systems. I will add support for new Operating Systems later when available.
Labels:
Active Directory,
Collections,
Membership Rules,
Query
Monday, March 7, 2011
Move default collections in ConfigMgr 2007
When installing ConfigMgr 2007, there are many default collections in the console. Most collections will be never used actually. Only the "All Systems" is handy for recognizing all devices. Best thing is to move the default collections to a new collection. How this works I will explain in this blog.
In ConfigMgr 2007 there are 17 default collections after installation. In ConfigMgr 2012 there will be default 2 User collections and 5 Device collections. Much better that way!
Because all these collections are filling up the console, it's better to moves the ones not using. To do this create a new collection (for example: All Microsoft collections). Now right-click on this collection, and choose New - Link to collection. Browse for the collection you want to move, and choose OK. This will copy the collection (and query) to the new collection.
Do this for every collection that's not used. Most of times only the "All Systems" collection is handy for use. The other collections becomes sub-collections of the new "All Microsoft collections" collection (and will be still available afterwards)! Delete the original collections after copying, these are not necessary anymore. In my console it will looks like this (after copying and deleting):
Beneath "All Microsoft collections" and "Software Distribution" are my sub-collections. The first for moved default collections, and the second for all Applications that are bound to user groups. That way the console is clear of collections that are not used often!
The moved collections can still be used for advertisements, so don't worry about that. It's only handy for a clear view in ConfigMgr 2007.
In ConfigMgr 2007 there are 17 default collections after installation. In ConfigMgr 2012 there will be default 2 User collections and 5 Device collections. Much better that way!
Because all these collections are filling up the console, it's better to moves the ones not using. To do this create a new collection (for example: All Microsoft collections). Now right-click on this collection, and choose New - Link to collection. Browse for the collection you want to move, and choose OK. This will copy the collection (and query) to the new collection.
Do this for every collection that's not used. Most of times only the "All Systems" collection is handy for use. The other collections becomes sub-collections of the new "All Microsoft collections" collection (and will be still available afterwards)! Delete the original collections after copying, these are not necessary anymore. In my console it will looks like this (after copying and deleting):
Beneath "All Microsoft collections" and "Software Distribution" are my sub-collections. The first for moved default collections, and the second for all Applications that are bound to user groups. That way the console is clear of collections that are not used often!
The moved collections can still be used for advertisements, so don't worry about that. It's only handy for a clear view in ConfigMgr 2007.
Labels:
Active Directory,
Collections,
Query
Friday, March 4, 2011
Query ConfigMgr collections with Active Directory
When I'm implementing ConfigMgr 2007 at customers, default collections are almost not used. Only the "All Systems" is handy for recognizing devices. Mostly I create collections for existing or new Active Directory OU's. (for example: Desktops, Laptops, VDI). When devices are placed in this OU's you can browse for this. Use "Active Directory System Group Discovery" for that, and the query can be created.
Read the blog: "Configure dynamic collections in ConfigMgr" for a complete guide to create dynamic collections.
http://henkhoogendoorn.blogspot.com/2011/01/configure-dynamic-collections-in.html
But what to do when there are no devices found in OU's, or worst, the OU's doesn't yet exist? In that case you cannot browse for this, so queries must be manually filled in. If you are specifying a full path, the FQDN of the Active Directory domain and a path to the OU is used to locate the OU in question.
So, in my example, the path is "SYSTEMCENTER.COM/VIRTUAL MACHINES" for the OU. With this information it's not needed to link ConfigMgr collections to existing Active Directory OU's anymore!
Read the blog: "Configure dynamic collections in ConfigMgr" for a complete guide to create dynamic collections.
http://henkhoogendoorn.blogspot.com/2011/01/configure-dynamic-collections-in.html
But what to do when there are no devices found in OU's, or worst, the OU's doesn't yet exist? In that case you cannot browse for this, so queries must be manually filled in. If you are specifying a full path, the FQDN of the Active Directory domain and a path to the OU is used to locate the OU in question.
So, in my example, the path is "SYSTEMCENTER.COM/VIRTUAL MACHINES" for the OU. With this information it's not needed to link ConfigMgr collections to existing Active Directory OU's anymore!
Labels:
Active Directory,
Collections,
Query
Subscribe to:
Posts (Atom)