Replies: 1 comment
-
I'd imagine you need to print it with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First, thanks very much for creating CliWrap; it is fantastic!
I have been using it to build a library of PowerShell functions to automate some Azure tasks. Here is my question: I can't figure out how to get the return value of, for example this command:
$secretvalue = ConvertTo-SecureString "hVFkk965BuUv" -AsPlainText -Force
I don't see "$secretvalue" in StandardOutput.
Any ideas would be appreciated.
Thanks,
Mark
`
public static async Task ConvertToSecureString(string inputString)
{
var result = await Cli.Wrap("powershell")
.WithArguments(args => args
.Add("ConvertTo-SecureString")
.Add(inputString)
.Add("-AsPlainText")
.Add("-Force")
)
.ExecuteBufferedAsync();
Beta Was this translation helpful? Give feedback.
All reactions