Jump to content


wmmayms

Established Members
  • Posts

    324
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by wmmayms

  1. The only things ou need to get this to work is to distrubute the SCCM agent and enable hardware inventory in your site hierarchy (else this script will still work, but the result will be empty).
  2. You could change the default installation dir on your computer with a simple reg tweak. This will however effect all program that is being installed on this computer. To do this: 1. open regedit 2. Goto HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion 3. change "ProgramFilesDir" to whatever suites you. This could allso be done with a script which you could distrubute in your enviroment. Tell me if you need such a script and I will show you.
  3. 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: Connecting.. Result:
  4. 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 \SMSADMIN\bin\i386 - 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 \SMSADMIN\bin\i386[/color] SET var='%dator%' start explore.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: Connecting.. Result:
  5. Yes very good post Tobias! Keep up the good work =)
×
×
  • 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.