You are not logged in.

#1 14 Mar 2019 20:36

liturgist
Member
Registered: 04 Mar 2019
Posts: 4

PowerShell cannot use --parameter command line

It appears that PowerShell cannot use '--' to indicate a parameter name.

Using '--' is somewhat industry standard. Is there any way to do this with Powershell?

Offline

#2 17 Mar 2019 11:49

Simon Sheppard
Admin
Registered: 27 Aug 2005
Posts: 1,130
Website

Re: PowerShell cannot use --parameter command line

In the bash shell a double dash (--) is used for built-in commands and many other commands to signify the end of command options. i.e. stop parsing and pass anything else on the command line as plain text.

In PowerShell the equivalent is --%

Offline

#3 21 Mar 2019 17:24

liturgist
Member
Registered: 04 Mar 2019
Posts: 4

Re: PowerShell cannot use --parameter command line

This is not about ending command options. I would like to create PowerShell command that have the same standard options that many programs use.

Get-MyStuff --Subject 'now' --Verbose

It appears that PowerShell is not setup to be able to use '--' to indicate an option.

Offline

Board footer

Powered by