0

PowerShell – Run application from command line

If you are familiar with Windows Command Line or MS-DOS, PowerShell is way more powerful than them. If you are also familiar is Unix scripting, PowerShell is the ultimate Windows Scripting language.

For proper introduction, please visit PowerShell on Wikipedia.

Run application from PowerShell

Running an application within the PowerShell requires using the & symbol.

For instances,

19-11-2016-3-08-36-pm

Run application with argument

Running an application with argument is similar to invoking an application in Windows Command Line.

Passing argument in Windows Command Line

Let’s check the current version of our Java.

19-11-2016-3-12-58-pm

Passing argument in PowerShell

Again, let’s check the current version of our Java in PowerShell.

19-11-2016-3-15-18-pm