Parameterattribute default value (C# cmdlet) in PowerShell
-
30-10-2019 - |
Question
I'm designing a cmdlet using plain C#. Is it possible to define a default value for a parameter?
Script cmdlet:
[Parameter] [string] $ParameterName = "defaultValue"
Which is the equivalent for C#?
[Parameter]
public string ParameterName { get; set; }
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow