Jump to content


  • 0
wmmayms

Resource Explorer Shortcut for sccm 2007

Question

This is a basic script that will create a shortcut to Resource Explorer.

 

Step 1.

Copy the code below and edit the variables (marked in red)

 

Step 2.

Save the file as a .bat

 

Step 3.

Start Using it!

 

variables you need to change to make it work (marked in red):

1. c:

cd \Program Files\Microsoft Configuration Manager Console\AdminUI\bin - Point this to the folder where you have your SMS Console installed

 

2. %SERVER% - Change this to your primary Server (db server)

 

3. %SITECODE% - Change this to match your sitecode.

 

REM Code written by Marcus Ymsén - 2008

:start
@echo off
CLS
Title Resource Explorer

> tmp.vbs ECHO WScript.Echo InputBox( "To which Computer would you like to connect?", "Resource Explorer", "Enter Computer Name" )
FOR /F "tokens=*" %%A IN ('CSCRIPT.EXE //NoLogo tmp.vbs') DO SET dator=%%A
DEL tmp.vbs

[color="#FF0000"]c:
cd \Program Files\Microsoft Configuration Manager Console\AdminUI\bin[/color]


SET var='%dator%'

start resourceexplorer.msc -s -sms:ResExplrQuery="SELECT ResourceID FROM SMS_R_SYSTEM WHERE NAME = %var%" -sms:connection=\\[color="#FF0000"]%SERVER%[/color]\root\sms\site_[color="#FF0000"]%SITECODE%[/color]


exit

:end

 

This is what it looks like:

post-2500-1234194396_thumb.jpg

 

Connecting..

post-2500-1234194465_thumb.jpg

 

Result:

post-2500-1234194604_thumb.jpg

post-2500-1234194447_thumb.jpg

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

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.