Convert string value

This topic contains 3 replies, has 4 voices, and was last updated by Profile photo of Daniel Krebs Daniel Krebs 2 years, 2 months ago.

  • Author
  • #24719
    Profile photo of Vinod Kumar
    Vinod Kumar


    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 ?


  • #24720
    Profile photo of Sean Quinlan
    Sean Quinlan

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

  • #24721
    Profile photo of Wilfredo Perez
    Wilfredo Perez

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

  • #24722
    Profile photo of Daniel Krebs
    Daniel Krebs

    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.

You must be logged in to reply to this topic.