i've created a c# windows form that running multiple PowerShell commands, and I have issue with one if the command PowerShell command:
Set-CalendarProcessing -Identity "email" -AddAdditionalResponse:$true -AdditionalResponse:"message"
How I run it from C#:
myCommand = new Command("Set-CalendarProcessing"); myCommand.Parameters.Add("identity", desiredRoom); myCommand.Parameters.Add("AddAdditionalResponse", "true"); myCommand.Parameters.Add("AdditionalResponse", message); plPileLine = rsRemoteRunspace.CreatePipeline(); plPileLine.Commands.Add(myCommand); RsResultsresults = plPileLine.Invoke();
I'm getting error that 'true' passed as a string and powershell isn't converting to bool, I tried '$True', '1', none of them worked, please advice. thank you.