[Solved]Can't paste my code into the question

Welcome Forums Web Site Feedback & Assistance [Solved]Can't paste my code into the question

This topic contains 2 replies, has 2 voices, and was last updated by  Lev Leiderman 6 months, 2 weeks ago.

  • Author
    Posts
  • #97830

    Lev Leiderman
    Participant
    Rank: Member

    Hi,
    from some reason from yesterday, i can't paste my code into the question, these are the things that i've tried:

    1) using two different computers
    2) paste only half of the code
    3) tried using Internet Explorer instead of Chrome

    this is the original code with a screenshot:
    Code

    and this what happen when I paste the code
    after notepad

    Try {
    
    $computers="pc1","pc2","pc3"
    
    
    write-host -BackgroundColor Yellow -ForegroundColor Black " Initiating first test of two - ┬┐?Ping Test┬┐?"
    write-host "`n"
    write-host "#########################################"
    #first Foreach Steatment
    foreach ($pc in $computers) {
            
                write-host -BackgroundColor White -ForegroundColor Blue "Performing a ping test to ->$pc$pc$pc$pc$pc< - it's not responding"} 
    
    pause
    
  • #97837

    postanote
    Participant
    Rank: Member

    I seen this with others as well as in a few cases with me.

    I've gotten in the habit of copying the code to notepad, then copy from there to the code block in the forum.

    Both VSCode, ISE other editors sometimes have character-formatting carry over. So, avoid directly copying from editors, like the ISE, VSCode, etc. Sure, kind of a hassle to copy from those to notepad just to copy here.

    Personally, I use a 'function' leveraging '$psISE' with a keyboard shortcut, to copy stuff from my current editor, which opens notepad and paste that I can move the plain text to wherever.

  • #98037

    Lev Leiderman
    Participant
    Rank: Member

    It's started to work :\

The topic ‘[Solved]Can't paste my code into the question’ is closed to new replies.

Skip to toolbar