Ok, i thought this was going to be easy but it hasnt.
I have created a new collection and want it to populate all computers that start with a specific computer name. So I created a basic query from the Reports section and copied my statement to the Collection Query Rule Properties, so this is what I have:
SELECT
Netbios_Name0
FROM
v_R_System
WHERE Netbios_Name0 LIKE 'XYZ%'
XYZ is representing the start of the computer name. In the report function it works great, but when I copy it to the Collection it doesnt return any results......
I have noticed the Resource class, but not sure what to have it on. So I leave it on System Resource (but it wont take my query). I can select a different resource class but i get no result. I enable the 'limit to collection' and limit it to all systems.
Questions:
1. Should I be creating the queries in the Report part? If not what should I be using?
2. Is my script wrong?
thanks,
mike
OK, i got this to work, just not sure it will automatically add computers from the all system collection to the specified collection:
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 inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.Name like "XYZ%"
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Ok, i thought this was going to be easy but it hasnt.
I have created a new collection and want it to populate all computers that start with a specific computer name. So I created a basic query from the Reports section and copied my statement to the Collection Query Rule Properties, so this is what I have:
SELECT
Netbios_Name0
FROM
v_R_System
WHERE Netbios_Name0 LIKE 'XYZ%'
XYZ is representing the start of the computer name. In the report function it works great, but when I copy it to the Collection it doesnt return any results......
I have noticed the Resource class, but not sure what to have it on. So I leave it on System Resource (but it wont take my query). I can select a different resource class but i get no result. I enable the 'limit to collection' and limit it to all systems.
Questions:
1. Should I be creating the queries in the Report part? If not what should I be using?
2. Is my script wrong?
thanks,
mike
OK, i got this to work, just not sure it will automatically add computers from the all system collection to the specified collection:
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 inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.Name like "XYZ%"
Share this post
Link to post
Share on other sites