need help Powershell script with message box support Right-to-left and multi-lines

iDr_Tech 1 Reputation point
2020-09-19T13:23:39.59+00:00

I have PowerShell script and need to use message box to alert user I use this [System.Windows.Forms.MessageBox]::Show(...) but not support Arabic and multi-lines. so I found this Powershell message box

my question is to make the script below support multi-lines and support right-to-left Languages like Arabic.

Windows for business Windows Server User experience PowerShell
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Rich Matheisen 47,901 Reputation points
    2020-09-19T22:00:27.92+00:00

    All it took was a web search for "System.Windows.Forms.MessageBox arabic" and, {{poof}} there it was! You should try that new-fangled web search thingamabob, it's pretty amazing!

    messageboxshow-right-to-left-right-aligned-text

    1 person found this answer helpful.
    0 comments No comments

  2. Andreas Baumgarten 123.4K Reputation points MVP Volunteer Moderator
    2020-09-19T20:34:20.003+00:00

    Multi-lines should not be a problem. You can try this please:

    $a = "Just a test`nwith CR"   
    

    Result should be like this:

    25898-result.png

    The trick is the `n to get a line-break (new line).

    Maybe this is helpful.

    Regards

    Andreas Baumgarten

    (Please don't forget to Accept as answer if the reply is helpful)

    0 comments No comments

  3. Anonymous
    2020-09-21T05:32:19.263+00:00
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.