Missing expression after unary operator '--'

Viewed 7874

This is my first post so apologies for any mistakes.

I ran the dotnet command in the Windows Powershell and It gave me a description of how to use it:

Usage: dotnet [host-options] [command] [arguments] [common-options]

Common options:  
  -v|--verbose          Enable verbose output  
  -h|--help             Show help

When I ran the command

dotnet run -h|--help

It gave me the following error:

At line:1 char:17
+ dotnet run -h|--help
+                 ~
Missing expression after unary operator '--'.
At line:1 char:15
+ dotnet run -h|--help
+               ~~
Expressions are only allowed as the first element of a pipeline.
At line:1 char:17
+ dotnet run -h|--help
+                 ~~~~
Unexpected token 'help' in expression or statement.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingExpressionAfterOperator

Any ideas why this is happening? Why is the command not showing help as intended? Having searched everywhere, I haven't been able to get a conclusive answer.

1 Answers
Related