logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
ebell  
#1 Posted : Friday, August 28, 2015 6:59:36 AM(UTC)
ebell


Rank: Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 5/13/2014(UTC)
Posts: 13
United States
Location: Houston, Texas

Thanks: 12 times
Was thanked: 5 time(s) in 3 post(s)
Inspired by @Omnicef's post on uninstalling LogMeIn using the Commands feature of SC and the release of the Commands Toolbar, I offer the following and hope to learn from others as well.

I've come to learn that the Commands feature in SC is very powerful/useful. I've learned that if you can run it at CLI while at the device you can do the same via the Command tab without having to Join. Here are some things I've performed:

  • uninstalled applications
  • uninstall update[s]
    Code:
    start /w wusa.exe /uninstall /kb:3035583

  • installed applications
  • run scripts
  • restarted/removed services
    Code:
    net stop "Service Name"
    net start "Service Name

  • mapped network drives
    Code:
    net use * \\ComputerName\ShareName

  • added/removed registry entries, example removing Win10 "reservation" notice
    Code:
    reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\Gwx /v DisableGwx /t REG_DWORD /d 1 /f

  • ran Windows Updates
    Code:
    wuauclt.exe /detectnow /updatenow

  • ran PowerShell commands


Other CLI commands:

Get the serial number of the machine
Code:
wmic bios get serialnumber

Get model number, etc
Code:
wmic computersystem get model,name,manufacturer,systemtype


  • Another useful feature of the Commands tab is using the up arrow to recall previously run commands.
  • If your commands take a while to run or the results get truncated, be sure to read the Wiki page about adjusting these parameters.

Edited by user Friday, August 28, 2015 3:07:12 PM(UTC)  | Reason: Additional commands - added link to forum post mentioned

thanks 3 users thanked ebell for this useful post.
scremote on 8/28/2015(UTC), hibrid0 on 9/18/2015(UTC), Mike on 10/6/2015(UTC)
scremote  
#2 Posted : Friday, August 28, 2015 2:01:43 PM(UTC)
scremote


Rank: Member

Joined: 7/17/2015(UTC)
Posts: 12
Canada

Thanks: 1 times
Thanks for posting.
Great info!

Have not seen Omnicef's post but will have to do that too.
Esp for LMI.

Mostly, I'd have to look up a KB article reference but (unfortunately) I already know about the one in your sample! :)
Very useful indeed.

jonmcknight  
#3 Posted : Friday, August 28, 2015 5:59:53 PM(UTC)
jonmcknight


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 1/30/2015(UTC)
Posts: 41
United States

Was thanked: 7 time(s) in 5 post(s)
Since you mentioned wmic commands...here's some commands to get display screen information.

Code:
wmic path Win32_VideoController get VideoModeDescription

Returns:
Code:
1600 x 900 x 4294967296 colors


Code:
wmic desktopmonitor get screenheight, screenwidth

Returns:
Code:
ScreenHeight  ScreenWidth
900           1600
MannyTC  
#4 Posted : Friday, August 28, 2015 7:27:39 PM(UTC)
MannyTC


Rank: Advanced Member

Medals: Bug Buster Level One: Spoon!Level 3: Shirt off your back! Received 25 Thanks!

Joined: 2/19/2015(UTC)
Posts: 251
United States
Location: AZ

Thanks: 7 times
Was thanked: 48 time(s) in 41 post(s)
Here is a good WMIC command reference that go use often with the command tab.
MrEastwood  
#5 Posted : Monday, October 5, 2015 11:38:00 PM(UTC)
MrEastwood


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 3/23/2015(UTC)
Posts: 109
United States
Location: Los Angeles

Thanks: 11 times
Was thanked: 9 time(s) in 8 post(s)
Only 10 slots!!! want more! :)

These are some of the ones I use, most of mine are for domain-connected computers:

wmic netlogin get homedirectory
wmic printerconfig list
wmic ntdomain list brief
wmic nicconfig list dns
wmic computersystem
wmic computersystem get model,name,manufacturer,systemtype,totalphysicalmemory,partofdomain,domain,workgroup,username <-- prettier than the above one, but less detail
wmic cpu get name
etc

So one thing I noticed is that using the long 6th line above, the popup command window now has both vertical and horizontal scrollers, can I suggest to the devs that it be fixed?

thanks 1 user thanked MrEastwood for this useful post.
cristobalcat on 5/13/2016(UTC)
Matt Highsmith  
#6 Posted : Monday, November 9, 2015 6:25:09 PM(UTC)
Matt Highsmith


Rank: Advanced Member

Medals: ScreenConnect Advisor: Focus Group MemberLevel 2: Lent a Helping Hand! 10 Thanks!

Joined: 4/1/2014(UTC)
Posts: 222
United States
Location: Raleigh

Thanks: 2 times
Was thanked: 15 time(s) in 11 post(s)
Just make a copy of the extension and delete the original. you can then edit the files for the extension and create as many items as you would like. i changed the extension to handle 40 commands.

this update Initializer.JS and Manifest.xml

Example of section to edit in Initializer.JS

var commands = [
extensionContext.settingValues.Command1,
extensionContext.settingValues.Command2,
extensionContext.settingValues.Command3,
extensionContext.settingValues.Command4,
extensionContext.settingValues.Command5,
extensionContext.settingValues.Command6,
extensionContext.settingValues.Command7,
extensionContext.settingValues.Command8,
extensionContext.settingValues.Command9,
extensionContext.settingValues.Command10,
extensionContext.settingValues.Command11,
extensionContext.settingValues.Command12,
extensionContext.settingValues.Command13,
extensionContext.settingValues.Command14,
extensionContext.settingValues.Command15,
extensionContext.settingValues.Command16,
extensionContext.settingValues.Command17,
extensionContext.settingValues.Command18,
extensionContext.settingValues.Command19,
extensionContext.settingValues.Command20,
extensionContext.settingValues.Command21,
extensionContext.settingValues.Command22,
extensionContext.settingValues.Command23,
extensionContext.settingValues.Command24,
extensionContext.settingValues.Command25,
extensionContext.settingValues.Command26,
extensionContext.settingValues.Command27,
extensionContext.settingValues.Command28,
extensionContext.settingValues.Command29,
extensionContext.settingValues.Command30,
extensionContext.settingValues.Command31,
extensionContext.settingValues.Command32,
extensionContext.settingValues.Command33,
extensionContext.settingValues.Command34,
extensionContext.settingValues.Command35,
extensionContext.settingValues.Command36,
extensionContext.settingValues.Command37,
extensionContext.settingValues.Command38,
extensionContext.settingValues.Command39,
extensionContext.settingValues.Command40
];

Example of section to edit for Manifest.xml

<Settings>
<Setting Name="Command1" IsServerOnly="false" />
<Setting Name="Command2" IsServerOnly="false" />
<Setting Name="Command3" IsServerOnly="false" />
<Setting Name="Command4" IsServerOnly="false" />
<Setting Name="Command5" IsServerOnly="false" />
<Setting Name="Command6" IsServerOnly="false" />
<Setting Name="Command7" IsServerOnly="false" />
<Setting Name="Command8" IsServerOnly="false" />
<Setting Name="Command9" IsServerOnly="false" />
<Setting Name="Command10" IsServerOnly="false" />
<Setting Name="Command11" IsServerOnly="false" />
<Setting Name="Command12" IsServerOnly="false" />
<Setting Name="Command13" IsServerOnly="false" />
<Setting Name="Command14" IsServerOnly="false" />
<Setting Name="Command15" IsServerOnly="false" />
<Setting Name="Command16" IsServerOnly="false" />
<Setting Name="Command17" IsServerOnly="false" />
<Setting Name="Command18" IsServerOnly="false" />
<Setting Name="Command19" IsServerOnly="false" />
<Setting Name="Command20" IsServerOnly="false" />
<Setting Name="Command21" IsServerOnly="false" />
<Setting Name="Command22" IsServerOnly="false" />
<Setting Name="Command23" IsServerOnly="false" />
<Setting Name="Command24" IsServerOnly="false" />
<Setting Name="Command25" IsServerOnly="false" />
<Setting Name="Command26" IsServerOnly="false" />
<Setting Name="Command27" IsServerOnly="false" />
<Setting Name="Command28" IsServerOnly="false" />
<Setting Name="Command29" IsServerOnly="false" />
<Setting Name="Command30" IsServerOnly="false" />
<Setting Name="Command31" IsServerOnly="false" />
<Setting Name="Command32" IsServerOnly="false" />
<Setting Name="Command33" IsServerOnly="false" />
<Setting Name="Command34" IsServerOnly="false" />
<Setting Name="Command35" IsServerOnly="false" />
<Setting Name="Command36" IsServerOnly="false" />
<Setting Name="Command37" IsServerOnly="false" />
<Setting Name="Command38" IsServerOnly="false" />
<Setting Name="Command39" IsServerOnly="false" />
<Setting Name="Command40" IsServerOnly="false" />
</Settings>
thanks 2 users thanked Matt Highsmith for this useful post.
MrEastwood on 11/16/2015(UTC), cristobalcat on 5/13/2016(UTC)
Matt Highsmith  
#7 Posted : Monday, November 9, 2015 6:27:39 PM(UTC)
Matt Highsmith


Rank: Advanced Member

Medals: ScreenConnect Advisor: Focus Group MemberLevel 2: Lent a Helping Hand! 10 Thanks!

Joined: 4/1/2014(UTC)
Posts: 222
United States
Location: Raleigh

Thanks: 2 times
Was thanked: 15 time(s) in 11 post(s)
I also changed STYLE.CSS to make the longer commands not look weird

.ModalDialog.CommandToolbox > *{
width: 500px;
height: 100px;
thanks 1 user thanked Matt Highsmith for this useful post.
MrEastwood on 11/16/2015(UTC)
Cooper  
#8 Posted : Thursday, March 17, 2016 4:49:34 PM(UTC)
Cooper


Rank: Advanced Member

Medals: Bug Buster Level One: Spoon!Level 1: Random Act of Kindness! Received One Thanks!

Joined: 10/28/2015(UTC)
Posts: 45
United States
Location: WA

Thanks: 10 times
Was thanked: 4 time(s) in 4 post(s)
I can create a new thread if needed, but I thought I would try a reply here since this was mentioned in this thread.

I'm trying to use the "start /w wusa.exe /uninstall /kb:3039720" command, and it seems to initiate. However, the command will just run for the max command time then terminate. I tried the command directly on the test machine, and the machine will run the command, scan for the KB update, and it will finish saying that the update isn't installed. I tried a couple different KB updates but each time it says the same message.

What would cause the command to keep saying the update isn't installed?


**I should add that it appears to work for OS updates only, not Office updates. Is there anyway of uninstalling office updates using this or similar command?

Edited by user Thursday, March 17, 2016 8:43:03 PM(UTC)  | Reason: Not specified

cristobalcat  
#9 Posted : Monday, January 23, 2017 9:36:05 PM(UTC)
cristobalcat


Rank: Advanced Member

Medals: ScreenConnect Advisor: Focus Group Member

Joined: 11/19/2015(UTC)
Posts: 48
United States
Location: USA

Thanks: 40 times
Was thanked: 1 time(s) in 1 post(s)
I love the Command box!! In fact, I work half of the time there. It won't bother users and you can keep working. Laugh

I just want to share my own home-made cocktail.

What is for? to avoid a brand new windows (or any other) goes to standby or hibernation stuff. You are working, you are waiting...it went to sleep!! Cursing

It works as it is in any win 7 and up (comments included). Just drop the whole package and hit ENTER. Then you can go and check if it is done. Cool


#!cmd
#maxlength=50000
#timeout=90000
: High perfomance scheme
Powercfg -SETACTIVE SCHEME_MIN
:Turn monitor timeout off.
Powercfg -x -monitor-timeout-ac 0
:Change HD timeout to 66 minutes (when I see it this 66 minutes, I know I fixed it, you can put your fav number).
Powercfg -x -disk-timeout-ac 66
: Power button:Setting 3=Shutdown (how many times you ask to turn pc off with button, even yourself, and goes to hibernation?)
powercfg -setacvalueindex 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 4f971e89-eebd-4455-a8de-9e59040e7347 7648efa3-dd9c-4e3e-b566-50f929386280 3
: Sleep Button crap: out .Setting 0=Do Nothing
powercfg -setacvalueindex 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 4f971e89-eebd-4455-a8de-9e59040e7347 96996bc0-ad50-47ec-923b-6f41874dd9eb 0
: Avoid USB goes to sleep:
powercfg -setacvalueindex 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 0


Full tested, used every single day within +1000 pcs, work like charm.

Please comment if it is helpful for you. I hope it does. Thanks.
cristobalcat  
#10 Posted : Monday, January 23, 2017 10:09:12 PM(UTC)
cristobalcat


Rank: Advanced Member

Medals: ScreenConnect Advisor: Focus Group Member

Joined: 11/19/2015(UTC)
Posts: 48
United States
Location: USA

Thanks: 40 times
Was thanked: 1 time(s) in 1 post(s)
(continue) some of my favorites 'cocktails'.

copy, paste, bam! (enter)

Note: add these 3 lines (add the beginning of each pack) in all cases that might take long time for windows to respond:
#!cmd
#maxlength=50000
#timeout=90000

----------------- Obtain manufacturer, model, Serial, SysOp, memory modules info -----------------
wmic csproduct get vendor,name,identifyingnumber
wmic cpu get Name
wmic os get Name
wmic os get osarchitecture
wmic memorychip get capacity

----------------- List printers and ports (include ip if attached to it)-----------------
wmic printer get DeviceID, DriverName, PortName

----------------- List of printers, and what is the DEFAULT ? (TRUE) -----------------
wmic printer get name,default

----------------- Look at services that are set to start automatically ------------------
wmic SERVICE WHERE StartMode="Auto" GET Name, State

----------------- Find stuff that starts on boot ------------------
wmic STARTUP GET Caption, Command, User

-----------------Get Mac Address ------------------
wmic nic get macaddress

----------------- Update static IP address ------------------
wmic nicconfig where index=9 call enablestatic("192.168.16.4"), ("255.255.255.0")

----------------- Enable DHCP ------------------
wmic nicconfig where index=9 call enabledhcp

----------------- Terminate an Application ------------------
wmic process where name="calc.exe" call terminate

----------------- Total Hard Drive DISCOS Space Check ------------------
wmic LOGICALDISK LIST BRIEF

----------------- Get Startup List ------------------
wmic startup list full

(I hate msn at startup dancing like bunch of monkeys) bam!
======================= Google Home Page en IExplorer
REG ADD "HKCU\Software\Microsoft\Internet Explorer\Main" /V "Start Page" /D "http://www.google.com/" /F

BigGrin

Edited by user Monday, January 23, 2017 10:16:05 PM(UTC)  | Reason: Not specified

damtechmatt  
#11 Posted : Tuesday, January 24, 2017 8:51:51 AM(UTC)
damtechmatt


Rank: Newbie

Joined: 2/12/2016(UTC)
Posts: 21
United Kingdom
Location: Sunderland UK

Thanks: 3 times
It would be great to have a command toolbox to store these in!
futura  
#12 Posted : Tuesday, January 24, 2017 2:27:29 PM(UTC)
futura


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 1/3/2014(UTC)
Posts: 99
Canada

Thanks: 46 times
Was thanked: 11 time(s) in 10 post(s)
There is a command toolbox extension...
thanks 1 user thanked futura for this useful post.
damtechmatt on 1/26/2017(UTC)
MrEastwood  
#13 Posted : Tuesday, February 28, 2017 5:55:04 AM(UTC)
MrEastwood


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 3/23/2015(UTC)
Posts: 109
United States
Location: Los Angeles

Thanks: 11 times
Was thanked: 9 time(s) in 8 post(s)
Here's another one to add, how to get the FQDN, really simple:

echo %COMPUTERNAME%.%USERDNSDOMAIN%
promptcare  
#14 Posted : Sunday, April 23, 2017 9:15:24 PM(UTC)
promptcare


Rank: Advanced Member

Medals: ScreenConnect Advisor: Focus Group MemberLevel 2: Lent a Helping Hand! 10 Thanks!

Joined: 9/14/2011(UTC)
Posts: 353
Location: ON, Canada

Thanks: 30 times
Was thanked: 13 time(s) in 11 post(s)
Originally Posted by: cristobalcat Go to Quoted Post
I love the Command box!! In fact, I work half of the time there. It won't bother users and you can keep working. Laugh

I just want to share my own home-made cocktail.

What is for? to avoid a brand new windows (or any other) goes to standby or hibernation stuff. You are working, you are waiting...it went to sleep!! Cursing

It works as it is in any win 7 and up (comments included). Just drop the whole package and hit ENTER. Then you can go and check if it is done. Cool

I have a little program called "Caffeine" in my Toolbox that I send over straight from the web console (right-click, Run Tool...). It runs in the systray and, as soon as it's sent over, it prevents sleep mode from activating. This way, when I have a remote job that I can't get to for a while, I send that over quickly and it's still awake when I'm ready to connect. When I'm done, I just taskkill the process.

Edited by user Thursday, April 27, 2017 5:42:26 AM(UTC)  | Reason: Not specified

Tango891  
#15 Posted : Tuesday, August 29, 2017 5:54:38 PM(UTC)
Tango891


Rank: Guest

Joined: 12/22/2016(UTC)
Posts: 2
United States
Location: CA

I've used this before in order to reset a password that a past employee had set and didn't tell anyone. You can also use it to create a new account in case it is a Microsoft Account, then use a tool like Profile Wizard to migrate the profile.

Code:
net user username newpassword
shawnkhall  
#16 Posted : Tuesday, September 19, 2017 3:37:46 AM(UTC)
shawnkhall


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 2/6/2014(UTC)
Posts: 164
Man
United States

Thanks: 5 times
Was thanked: 8 time(s) in 6 post(s)
Originally Posted by: Tango891 Go to Quoted Post

Code:
net user username newpassword


I use this frequently, as well. Just make sure that it's not on an encrypted file system, or you'll cause some serious problems. Consider running "cipher /U /N" or "cipher /s:c:\" or "searchmyfiles /basefolder "c:\" /scansubfolders 1 /findfiles 1 /findfolders 1 /FileAttrEncrypted 3 /stab "c:\temp\efs.csv"" first to determine which files might be lost.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.