Welcome › Forums › General PowerShell Q&A › Convert string value
This topic contains 3 replies, has 4 voices, and was last updated by
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 – http://pastebin.ca/2983768
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.
The topic ‘Convert string value’ is closed to new replies.