applywithforce
Technical User
Hi guys,
I am new to SMS and in the process trying to run a query to check for PC's that are able to upgrade to Windows XP SP2.
Here is what I have inserted into the Query Statement properties:
// ***** Class : SMS_Query *****
[SecurityVerbs(140551)]
instance of SMS_Query
{
Comments = "All Windows XP clients that have enough disk space to upgrade to Windows XP SP2";
Expression = "select SMS_R_System.Name, SMS_R_System.SMSInstalledSites, SMS_G_System_OPERATING_SYSTEM.Caption, SMS_G_System_OPERATING_SYSTEM.CSDVersion, SMS_G_System_LOGICAL_DISK.FreeSpace from SMS_R_System inner join SMS_G_System_LOGICAL_DISK on SMS_G_System_LOGICAL_DISK.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_LOGICAL_DISK.FreeSpace >= 1500 and SMS_G_System_LOGICAL_DISK.DeviceID = \"C:\" and SMS_R_System.OperatingSystemNameandVersion like \"Microsoft Windows NT Workstation 5.1\"";
LimitToCollectionID = "";
Name = "Clients ready for Windows XP SP2 Upgrade";
QueryID = "";
TargetClassName = "SMS_R_System";
};
// ***** End *****
When I click OK, it displays:
*******************************************************
This query has a syntax error. Are you sure you want to save it?
*******************************************************
I can save the query despite the error, however, no results are displayed when I run it.
I copied the code from the Deploying Windows XP SP2 with System Management Server white paper from Microsoft.
All help appreciated!
I am new to SMS and in the process trying to run a query to check for PC's that are able to upgrade to Windows XP SP2.
Here is what I have inserted into the Query Statement properties:
// ***** Class : SMS_Query *****
[SecurityVerbs(140551)]
instance of SMS_Query
{
Comments = "All Windows XP clients that have enough disk space to upgrade to Windows XP SP2";
Expression = "select SMS_R_System.Name, SMS_R_System.SMSInstalledSites, SMS_G_System_OPERATING_SYSTEM.Caption, SMS_G_System_OPERATING_SYSTEM.CSDVersion, SMS_G_System_LOGICAL_DISK.FreeSpace from SMS_R_System inner join SMS_G_System_LOGICAL_DISK on SMS_G_System_LOGICAL_DISK.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_LOGICAL_DISK.FreeSpace >= 1500 and SMS_G_System_LOGICAL_DISK.DeviceID = \"C:\" and SMS_R_System.OperatingSystemNameandVersion like \"Microsoft Windows NT Workstation 5.1\"";
LimitToCollectionID = "";
Name = "Clients ready for Windows XP SP2 Upgrade";
QueryID = "";
TargetClassName = "SMS_R_System";
};
// ***** End *****
When I click OK, it displays:
*******************************************************
This query has a syntax error. Are you sure you want to save it?
*******************************************************
I can save the query despite the error, however, no results are displayed when I run it.
I copied the code from the Deploying Windows XP SP2 with System Management Server white paper from Microsoft.
All help appreciated!