How Tos > Execute Command

Execute Command

Tags:  

Execute Command

The Execute Command configuration helps you to execute CLI commands, cscripts & wscripts on the remote desktops from the central web client. To do so, follow the steps given below:

  1. Go to Desktop Management-> Configurations-> Computer Configurations-> Execute Command.
  2. Enter the Name and Description of the configuration.
  3. Define the Configuration.

    1. Enter the command that you want to execute.
    2. To execute multiple Add More Commands button and enter the next command.
  4. Define the target desktops.
  5. Click Deploy.


Useful CLI Commands

The following table gives you the list of various actions that you can perform on the Remote Machines with the CLI commands using the Execute Command option.

Actions to be performed
Command
Know the list of active TCP and UDP connections with their Port ID
netstat -ano
View the status of the Windows firewall on Windows XP SP2 machine
netsh firewall show conif
View the status of the Windows firewall on Windows Vista machinenetsh firewall show opmode
Enable the Windows firewall
netsh firewall set opmode enable
Disable the Windows firewall
netsh firewall set opmode disable
Add a port to the exceptions list
netsh firewall set portopening protocol port name mode = enable

protocol = TCP, UDP, All
port = port number
name = any string less than 256 characters
Enable RDP access on remote machines
netsh firewall add portopening TCP 3389 blah enable any
Know whether any particular service is running
sc query servicename

eg: sc query wuauserv
Gives you the status whether norton Windows Automatic Update service is running or not
Start a particular service
sc start servicename
Stop a particular service
sc stop servicename
Change the startup type of a service
sc config servicename start= <auto:disabaled:demand>

auto = automatic
disabled = disabled
demand = manual
Kill a particular tasktaskkill [/im imagename] [/pid process ID]

eg:
taskkill /pid 3360
taskkill /pid 3360 /pid 2332 /pid 5454
taskkill /im AgentTrayIcon.exe
Know the count of the files in a folder
<folder location>\ls -1 | wc -l






 RSS of this page

rtttrrb