Tuesday, April 10, 2007

Remote Assistance, and other computer info

Sometimes a user says they need assistance. To remote into their machine you need the computer name, this can be hard to find or search for. It also is hard sometimes for the user to give it to you. This query will help you put all that information together. You don't necessarily need to use this for remote assistance. With the user data (current & Last logged on) as well as the computer information you also have full access to the right click menu within SMS. Ever notice when you right click on a query of computers you don't always see the Remote Assistance or the Event view option. For these to appear you need to have the Resource ID and Resource type. This is a simple query that can be expanded to include the IP address or some other useful information. I have this labeled as Remote Assistance because I use it for assistanting users remotely. Please feel free to call it and modify it as needed or desired.

Object type:System Resource
Collection Limiting: No limited
---------------------Remote Assistance -------------------------------
select SMS_R_System.LastLogonUserName, SMS_G_System_COMPUTER_SYSTEM.UserName, SMS_G_System_COMPUTER_SYSTEM.Name, SMS_R_System.ResourceId, SMS_R_System.ResourceType from SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId order by SMS_R_System.LastLogonUserName
--no SMS_G_System-- (This is better for most right click tools and passing commands from the MMS)

select SMS_R_System.LastLogonUserName, SMS_R_System.Name, SMS_R_System.ResourceId, SMS_R_System.ResourceType from SMS_R_System order by SMS_R_System.LastLogonUserName