Quantcast
Channel: /r/powershell – How to Code .NET
Viewing all articles
Browse latest Browse all 8793

Cmdlet parameters.

$
0
0

Hi. How do I set a parameter in a Cmdlet to be optional and like a switch where they put -e and it will run a certain command in the script, and if they don’t, it’ll skip it completely?

So you might have a if -e true, do this part of the script/Cmdlet?

submitted by /u/Mskews
[link] [comments]

The post Cmdlet parameters. appeared first on How to Code .NET.


Viewing all articles
Browse latest Browse all 8793

Trending Articles