Executables that accept command line programming built in to Windows

Isaac

Lifelong Learner
Local time
Yesterday, 16:55
Joined
Mar 14, 2017
Messages
9,655
If I wanted to practice the task of using Powershell to run another exe with command line, arguments, etc., what are some built-in Windows tools that are exe's that you can run with arguments?
 
cmd.exe itself has some arguments, as well as chkdsk and xcopy, just to name a couple
 
Just about every program can be run from the command line:

chrome.exe google.com

notepad.exe "C:\SomeFile.txt"

paint.exe "C:\ImageFile.png"
 
You can do some system examination commands such as

NETSTAT - to show network info, parameters select which kind of info
ICACLS - to show file permissions info, parameters select which kind of info for a file
IPCONFIG - to show connection info, parameters select which kind of info - but be careful with this one because of what it can do.

You could practice an auto-backup system using XCOPY or ROBOCOPY, both of which are on Win11. They can be used to build a selective copy script that would let you play with scripting, and if you use a variable save-target such as a thumb drive that plugs into ANY USB port, that would gave you a seriously useful "toy" from a script.

Just get into the CMD prompt and type HELP to see the commands recognized by the CMD processor. NOTE that some of the commands need to be run as Administrator if they would show information from inside other tasks. Before playing with them, take careful note of the ones that can actually change system settings. But you can do a lot of things from a batch file using CMD-related executables.

There are also command line parameters for Office files, too. Running Access with the /X:macro-name string lets you run Access under control of one of its macros. The only catch there is remembering that the macro MUST end with an Application.Quit so you don't clog up your system with extra idle copies of Access.
 
Thanks, that gives me some good ideas. I forgot about most of those for some reason. I was hoping to avoid just automating the cmd because somehow that brings up some complications for me but I think I will try the chrome.exe google.com for practice.

I've also heard about a thing called Echo Args in powershell that I may need to learn how to use and interpret to help me get the arguments right.

I have a relatively long command that I need to execute on a remote server using powershell remoting so I am beginning the journey of practicing getting the syntax right.
 

Users who are viewing this thread

Back
Top Bottom