Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

System Center Configuration Manager 2007 : Configuration Manager Queries - Using Query Results & Status Message Queries

- How To Install Windows Server 2012 On VirtualBox
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire
1/6/2012 4:11:29 PM

Using Query Results

Building queries is a great way for administrators to review inventory data, discovery data, advertisement data, and other site information. You can also use information in query results to create collections as well as export data to a text file.

Exporting Query Results to a Text File

Execute the query so the results display in the results pane. Then right-click the query name and select View -> Export List. You can then specify to export to tab-delimited or comma-delimited files. You can also specify to use Unicode, if required.

Importing and Exporting Queries Between Sites

You can also import and export queries between sites, and share with your favorite ConfigMgr administrators. To export a query, right-click the query object and then select Export Objects. Follow the Export Objects Wizard, and specify a filename (with an .mof extension) to save the exported query.

To import a query at the receiving site, simply right-click the Queries node and select Import Objects. Follow the prompts in the wizard to complete the import process.

Creating a Collection Based on Query Results

Collections and queries both use WQL, making moving from a query to a collection fairly simple. It is a best practice to create a query to “test” the WQL before creating a query-based collection. When you create a query, you can review the values of the attributes that you used for the query criteria. If you build a collection, you probably will not be able to see the values of those attributes. So create the query, and verify that it performs exactly as expected, and then you can copy (or import) that query into a collection.

To use the WQL from a query in a collection, you must not specify any attributes to display.


Here’s the WQL for this query:

select SMS_R_System.Name, SMS_R_System.ADSiteName,
SMS_G_System_X86_PC_MEMORY.TotalPhysicalMemory,
SMS_G_System_WORKSTATION_STATUS.LastHardwareScan from
SMS_R_System inner join SMS_G_System_X86_PC_MEMORY on
SMS_G_System_X86_PC_MEMORY.ResourceID = SMS_R_System.ResourceId inner join
SMS_G_System_WORKSTATION_STATUS on SMS_G_System_WORKSTATION_STATUS.ResourceID =
SMS_R_System.ResourceId where
SMS_G_System_X86_PC_MEMORY.TotalPhysicalMemory > 2000000


Simply remove all attributes from the General tab so that only criteria information remains. Next, click the Show Query Language button to reveal the updated WQL statement, which appears as follows:

select * from SMS_R_System inner join SMS_G_System_X86_PC_MEMORY on
SMS_G_System_X86_PC_MEMORY.ResourceID = SMS_R_System.ResourceId
inner join SMS_G_System_WORKSTATION_STATUS on
SMS_G_System_WORKSTATION_STATUS.ResourceID = SMS_R_System.ResourceId
where SMS_G_System_X86_PC_MEMORY.TotalPhysicalMemory > 2000000

Finally, paste this new WQL into a query rule for a collection.

Status Message Queries

Use ConfigMgr status message queries to view information about ConfigMgr components, audit messages, and changed objects (such as advertisements). Status messages allow you to see a little deeper into the ConfigMgr site for tasks that occur on your site. You can create custom status messages, as well as use one of more than 60 standard status message queries. To view status message queries, perform the following steps:

1.
Expand Site Database -> System Status and then click Status Message Queries.

2.
You will now see all the standard status messages. Simply select a status message, right-click it, and select Show Message.

If the status message query requires additional information, you will receive a prompt. As an example, execute the All Audit Status Messages from a Specific Site status message query. You will be prompted for information, as shown in Figure 1.

Figure 1. The prompt for additional information on a status message query


3.
As shown for the Site Code value in Figure 17.12, you can directly specify the site code, or you can select the Load Existing radio button and ConfigMgr will populate the dropdown box with valid selections. (Use caution when selecting the Load Existing radio button—if the number of selections is large, such as for computer name, this process could take several hours!) Specify or select a site code and then click the Time option. For Time options, you can select an exact date and time, or you can use the built-in options for 1 hour ago, 12 hours ago, and other intervals.

Although the names of the status message queries are fairly descriptive, it is helpful to point out several queries that tend to be particularly beneficial when troubleshooting issues. Table 1 lists some favorite status message queries.

Table 1. Popular Status Message Queries
Query Nameescription
Advertisements Created, Modified, or DeletedAllows you to see advertisement changes in your environment. This status message query also tells you who performed which operations, as well as the computer from which the task ran.
All Status MessagesReturns every status message reported to the site. Use caution, because this can be a very large amount of data. It can also be handy in an “emergency” situation, where you need to quickly see everything that has changed in the site in the past hour.
All Audit Status Messages for a Specific SiteFor auditing purposes, this displays which user performed what action on the ConfigMgr site.
Collections Created, Modified, or DeletedReturns collection modification information, so you can see who deleted/modified what collection, and when.
Packages, Programs, AdvertisementsEach of these status message queries allows you to see changes to each of these ConfigMgr objects.

You may also want to review the following Microsoft TechCenter articles:

Other -----------------
- Windows Server Enterprise Administration : Planning for Data Sharing and Collaboration (part 2) - Planning a SharePoint Infrastructure
- Windows Server Enterprise Administration : Planning for Data Sharing and Collaboration (part 1)
- Sharepoint 2007 : Managing Security - Assign Permissions to a File or List Item
- Sharepoint 2007 : Managing Security - See What Permissions Are Set
- Microsoft Dynamics AX 2009 : Processing Business Tasks - Creating sales orders
- Microsoft Dynamics AX 2009 : Processing Business Tasks - Creating purchase orders
- Active Directory Domain Services 2008 : Delete a Computer Object
- Active Directory Domain Services 2008 : Create a Computer Object
- Windows Server 2008 Server Core : Managing the System Time with the W32Tm Utility
- Microsoft Dynamics CRM 4.0 Accelerators : Analytics Accelerator (part 2) - Analytics Accelerator Installation
 
 
25 Inspiring Game of Thrones Quotes
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us
Popular tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 windows Phone 7 windows Phone 8
programming4us programming4us
 
programming4us
Natural Miscarriage
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Game Trailer