Convert string value


I have an string that needs to be converted to upper case using powershell through command line. Say something like this

Powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile “string” toupper()

Is it possible ?


Looks like the parser for this forum doesn’t like the syntax of the command. See here for the line -

Try something like this (“String”).ToUpper() from the powershell command line

Below works for me from a command prompt:

PowerShell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -Command "'String'.ToUpper()"

If you need to use for PowerShell for something then it would probably make sense to convert your complete process to a PowerShell script instead of relying on just the output.