A collegue of mine is currently tasked with looking at inventory for some clients, and he needs to invoke Resource Explorer quite a bit ... it's a time consuming process, as he has to first ID the client in the console (slow), right click (context menus can sometimes be slow to render) and launch Resource Explorer, all of which incurs a significant time penalty across the day.

Anyway, he could work this a bit more efficiently, so I showed him how:

' Script to launch Resource Explorer against a particular machine using a WMI query to return the ResourceID

' R Marshall - 2010

Dim strComputerName, WshShell

Set WshShell = WScript.CreateObject("WScript.Shell")

strComputerName = ""

While strComputerName = "" or strSiteServer = ""

 ' Ignoring cancel, requires input for both input boxes or cannot run

' strSiteServer = "<YOURSERVERNAME>"

 strSiteServer = inputBox("Enter the Site server name", "Connect to site server")

 strComputerName = inputBox("Enter the Machines name", "Launch Resource Explorer")

 WshShell.Run("mmc G:\sms\AdminUI\bin\resourceexplorer.msc -s -sms:ResExplrQuery=" & CHR(34) & "SELECT ResourceID FROM SMS_R_SYSTEM WHERE Name = '" & strComputerName & "'" & CHR(34) & " -sms:connection=\\" & strSiteServer & "\root\sms\site_ric")


Set WshShell = Nothing

You can hard code in the Site server name and comment out the prompt for Site Server name to shave some time off using the script ..

Took a few minutes to write this up, here's the resource I used to figure out how to call Resource Explorer: http://technet.microsoft.com/en-us/library/bb693736.aspx

Leave you to work out the permissions needed ...