I'm trying to pass a parameter to my application like (filename.exe -Param Value) but no luck.
I'm trying to capture the parameter with this
Param([Parameter(Mandatory=$true)][string]$message)
write-host $message
Using the command line to execute the compiled script I try to pass in the parameter but it wont work, below is an example. I've also tried with --message, /message nothing works.
C:\Users\OptiPlex\Desktop>Read_Host_Secure_String.exe -message Hello
cmdlet Read_Host_Secure_String.ps1 at command pipeline position 1
Supply values for the following parameters:
message: