$commandLine documentation

Use this forum to ask questions after your subscription maintenance expires or before you buy. Need information on licensing or pricing? Questions about a trial version? This is the right place for you. No scripting questions, please.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
This topic is 3 years and 3 days old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
SuperPlated
Posts: 15
Last visit: Thu Dec 15, 2022 8:45 am

$commandLine documentation

Post by SuperPlated »

Product, version and build: PowerShell Studio 2020 5.7.179
Operating system:Windows 10
PowerShell version(s): 5.1
32-bit version of software? No

*** Please add details and screenshots as needed below. ***

Is $CommandLine variable in PowerShell Studio documented anywhere?

I checked the online help, this Community Forum and Google. The latest I reference to $CommandLine is in a post by DavidC on 11/5/2015.

Thank you,
User avatar
Alexander Riedel
Posts: 8473
Last visit: Tue Mar 19, 2024 1:15 am
Answers: 19
Been upvoted: 37 times

Re: $commandLine documentation

Post by Alexander Riedel »

Not much to document here. The $CommandLine variable is a string representing the command line arguments to a packaged executable, where arguments are separated by a space.
Because executables can run outside of the context of a PowerShell console, a traditional, space delimited string is made available.
There is also a variable called $EngineArgs, which presents these values as an array.
https://www.sapien.com/blog/2015/12/07/ ... able-file/

Please note that all parameters are expressed as strings rather than PowerShell objects, because Windows and even a PowerShell console hands arguments as a string to an executable file.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 3 years and 3 days old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.