Copy and paste in Windows PowerShell












84















How do I effectively copy and paste input and output in the Windows PowerShell?










share|improve this question



























    84















    How do I effectively copy and paste input and output in the Windows PowerShell?










    share|improve this question

























      84












      84








      84


      15






      How do I effectively copy and paste input and output in the Windows PowerShell?










      share|improve this question














      How do I effectively copy and paste input and output in the Windows PowerShell?







      powershell copy-paste






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 28 '12 at 16:45









      orschiroorschiro

      1,04541426




      1,04541426






















          10 Answers
          10






          active

          oldest

          votes


















          95















          • To select text in PowerShell with the mouse, just select it as usual.

          • To copy the selected text to the clipboard you have to either hit Enter, or right-click.

          • To paste into the Powershell window, right click.


          keyboard





          • Paste



            alt + [space], e, p








          share|improve this answer





















          • 2





            This is what I was missing, thanks! To actually copy it is necessary to press Enter.

            – orschiro
            Mar 28 '12 at 17:13








          • 1





            It is not necessary for me, but I have quickedit turned on in properties.

            – EBGreen
            Mar 28 '12 at 17:20











          • @orschiro: actually you don't need enter. I just tested it. You only need to highlight it and then right-click--> goes into clipboard. For pasting into powershell you only need to right click wherever you want.

            – Kamran Bigdely
            Jan 10 '14 at 16:23








          • 1





            ok, it works, but it won't paste multiline strings, that's BS

            – Alexander Mills
            Dec 2 '14 at 5:30






          • 2





            you can also use the menu shortcut, alt + [space] + e + p menu->edit->paste

            – Val
            Mar 5 '15 at 10:49





















          9














          (Elaborating on the answer of Ƭᴇcʜιᴇ007 and Val)



          Mouse



          Select/Mark: Press left mouse button, drag, release.



          Copy: Right-click.



          Paste: With content in the clipboard, right-click.



          Keyboard



          Activate Mark: Alt + Space > e > k.



          Select a Block: Navigate (arrow keys, Page-down, Page-up, End, Pos1) to the upper left corner of the block, press and hold Shift, navigate to the lower right corner, release Shift.



          Copy: With a block selected, either hit Enter or Alt + Space > e > y.



          Paste: With content in the clipboard, Alt + Space > e > p.






          share|improve this answer
























          • +1 for the hint to "Activate Mark". I was searching combinations of Cursor and Caret but it always returned results for mouse cursor...

            – keremispirli
            Nov 10 '17 at 10:35



















          5














          Depends on which PowerShell you are using. With the newer PowerGUI Script Editor or with the PowerShell ISE (integrated scripting environment) cut/paste seems to work better:




          • To cut drag the mouse across text to select, then ^C or right click to copy.

          • To paste use ^V


          With the older PowerShell:




          • To cut drag the mouse across text to select, then enter to copy.

          • You can sometimes hit ^C to copy but it does not seem to ALWAYS work.

          • You can also drag to select then right click in the top window pane bar and select Edit | copy.

          • To paste right click.




          Good links for people learning PowerShell::




          • The best PowerShell tutorial I've found so far is here. It goes into quite a bit of description of the command line. Sadly some of the cool stuff in the original PowerShell appears to be broken in ISE, like ctrl-home for example, to delete to start of line.


          • Some differences between these two PowerShells is here.







          share|improve this answer


























          • Ctrl-V also works in PowerShell on Windows 10 here (PS version 5.1.15063.296).

            – ComFreek
            Jun 2 '17 at 9:44





















          3














          As of Windows 10, Ctrl + C works for copying the text & Ctrl + V works for paste. You can also select the data using Shift + Arrow(Left/Right).



          The standard console can be used in Windows 10 — the PowerShell ISE is still available but not required for copy/paste support.






          share|improve this answer

































            0














            Powershell functions like most terminal emulators (like PuTTY) - selecting text automatically copies it to your clipboard, and right-clicking pastes the content of your keyboard at your cursor.






            share|improve this answer
























            • Hello Rilgon, That was my first intuition but it does not work. Nothing gets copied to the clipboard.

              – orschiro
              Mar 28 '12 at 16:55






            • 1





              That's strange, because I definitely just tried it myself just to make sure it was right, and it worked just fine.

              – Rilgon Arcsinh
              Mar 28 '12 at 16:55











            • Don't you need to hit enter to copy the contents to the clipboard in Powershell?

              – Bernard Chen
              Oct 10 '14 at 16:57



















            0














            Try this from the MSDN website: Copy console screen to system clipboard
            . This its self is a PS script, but it copies what is currently on the window to a file.






            share|improve this answer































              0














              This is just to add a partial solution for those times you don't want to use the mouse. It only helps with pasting but you can press Alt+Space then e then p. The Alt+Space opens the PowerShell window's menu, the e opens the Edit sub-menu and the p does the actual pasting. Hardly convenient but it does save you from going to the mouse.






              share|improve this answer































                0














                To paste, you may use AutoHotkey script (this also affects all console windows):



                #IfWinActive ahk_class ConsoleWindowClass
                ^V::
                SendInput {Raw}%clipboard%
                return
                #IfWinActive


                Found on http://www.howtogeek.com/howto/25590/how-to-enable-ctrlv-for-pasting-in-the-windows-command-prompt/.






                share|improve this answer

































                  0














                  Another way: highlight something, and control-mousedrag to copy it, in the Powershell ISE. Alt-hightlight also highlights rectangles.






                  share|improve this answer





















                  • 4





                    That doesn't work here.

                    – DavidPostill
                    May 15 '17 at 15:26



















                  0














                  If you want to put the output of your command into the Clipboard, just use Set-Clipboard cmdlet as the final item in your pipeline, or its standard alias scb.



                  One caveat is that some commands return text (eg. Get-Content) and others produce collection of objects (eg. Get-ChildItem). If you get weird things in clipboard, insert Out-String before Set-Clipboard to convert everything to text:



                  gc .myFile.txt | scb



                  ls c:Windows | Out-String | scb






                  share|improve this answer























                    Your Answer








                    StackExchange.ready(function() {
                    var channelOptions = {
                    tags: "".split(" "),
                    id: "3"
                    };
                    initTagRenderer("".split(" "), "".split(" "), channelOptions);

                    StackExchange.using("externalEditor", function() {
                    // Have to fire editor after snippets, if snippets enabled
                    if (StackExchange.settings.snippets.snippetsEnabled) {
                    StackExchange.using("snippets", function() {
                    createEditor();
                    });
                    }
                    else {
                    createEditor();
                    }
                    });

                    function createEditor() {
                    StackExchange.prepareEditor({
                    heartbeatType: 'answer',
                    autoActivateHeartbeat: false,
                    convertImagesToLinks: true,
                    noModals: true,
                    showLowRepImageUploadWarning: true,
                    reputationToPostImages: 10,
                    bindNavPrevention: true,
                    postfix: "",
                    imageUploader: {
                    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                    allowUrls: true
                    },
                    onDemand: true,
                    discardSelector: ".discard-answer"
                    ,immediatelyShowMarkdownHelp:true
                    });


                    }
                    });














                    draft saved

                    draft discarded


















                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f405851%2fcopy-and-paste-in-windows-powershell%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown

























                    10 Answers
                    10






                    active

                    oldest

                    votes








                    10 Answers
                    10






                    active

                    oldest

                    votes









                    active

                    oldest

                    votes






                    active

                    oldest

                    votes









                    95















                    • To select text in PowerShell with the mouse, just select it as usual.

                    • To copy the selected text to the clipboard you have to either hit Enter, or right-click.

                    • To paste into the Powershell window, right click.


                    keyboard





                    • Paste



                      alt + [space], e, p








                    share|improve this answer





















                    • 2





                      This is what I was missing, thanks! To actually copy it is necessary to press Enter.

                      – orschiro
                      Mar 28 '12 at 17:13








                    • 1





                      It is not necessary for me, but I have quickedit turned on in properties.

                      – EBGreen
                      Mar 28 '12 at 17:20











                    • @orschiro: actually you don't need enter. I just tested it. You only need to highlight it and then right-click--> goes into clipboard. For pasting into powershell you only need to right click wherever you want.

                      – Kamran Bigdely
                      Jan 10 '14 at 16:23








                    • 1





                      ok, it works, but it won't paste multiline strings, that's BS

                      – Alexander Mills
                      Dec 2 '14 at 5:30






                    • 2





                      you can also use the menu shortcut, alt + [space] + e + p menu->edit->paste

                      – Val
                      Mar 5 '15 at 10:49


















                    95















                    • To select text in PowerShell with the mouse, just select it as usual.

                    • To copy the selected text to the clipboard you have to either hit Enter, or right-click.

                    • To paste into the Powershell window, right click.


                    keyboard





                    • Paste



                      alt + [space], e, p








                    share|improve this answer





















                    • 2





                      This is what I was missing, thanks! To actually copy it is necessary to press Enter.

                      – orschiro
                      Mar 28 '12 at 17:13








                    • 1





                      It is not necessary for me, but I have quickedit turned on in properties.

                      – EBGreen
                      Mar 28 '12 at 17:20











                    • @orschiro: actually you don't need enter. I just tested it. You only need to highlight it and then right-click--> goes into clipboard. For pasting into powershell you only need to right click wherever you want.

                      – Kamran Bigdely
                      Jan 10 '14 at 16:23








                    • 1





                      ok, it works, but it won't paste multiline strings, that's BS

                      – Alexander Mills
                      Dec 2 '14 at 5:30






                    • 2





                      you can also use the menu shortcut, alt + [space] + e + p menu->edit->paste

                      – Val
                      Mar 5 '15 at 10:49
















                    95












                    95








                    95








                    • To select text in PowerShell with the mouse, just select it as usual.

                    • To copy the selected text to the clipboard you have to either hit Enter, or right-click.

                    • To paste into the Powershell window, right click.


                    keyboard





                    • Paste



                      alt + [space], e, p








                    share|improve this answer
















                    • To select text in PowerShell with the mouse, just select it as usual.

                    • To copy the selected text to the clipboard you have to either hit Enter, or right-click.

                    • To paste into the Powershell window, right click.


                    keyboard





                    • Paste



                      alt + [space], e, p









                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Dec 27 '18 at 19:25

























                    answered Mar 28 '12 at 17:09









                    Ƭᴇcʜιᴇ007Ƭᴇcʜιᴇ007

                    98.9k14156212




                    98.9k14156212








                    • 2





                      This is what I was missing, thanks! To actually copy it is necessary to press Enter.

                      – orschiro
                      Mar 28 '12 at 17:13








                    • 1





                      It is not necessary for me, but I have quickedit turned on in properties.

                      – EBGreen
                      Mar 28 '12 at 17:20











                    • @orschiro: actually you don't need enter. I just tested it. You only need to highlight it and then right-click--> goes into clipboard. For pasting into powershell you only need to right click wherever you want.

                      – Kamran Bigdely
                      Jan 10 '14 at 16:23








                    • 1





                      ok, it works, but it won't paste multiline strings, that's BS

                      – Alexander Mills
                      Dec 2 '14 at 5:30






                    • 2





                      you can also use the menu shortcut, alt + [space] + e + p menu->edit->paste

                      – Val
                      Mar 5 '15 at 10:49
















                    • 2





                      This is what I was missing, thanks! To actually copy it is necessary to press Enter.

                      – orschiro
                      Mar 28 '12 at 17:13








                    • 1





                      It is not necessary for me, but I have quickedit turned on in properties.

                      – EBGreen
                      Mar 28 '12 at 17:20











                    • @orschiro: actually you don't need enter. I just tested it. You only need to highlight it and then right-click--> goes into clipboard. For pasting into powershell you only need to right click wherever you want.

                      – Kamran Bigdely
                      Jan 10 '14 at 16:23








                    • 1





                      ok, it works, but it won't paste multiline strings, that's BS

                      – Alexander Mills
                      Dec 2 '14 at 5:30






                    • 2





                      you can also use the menu shortcut, alt + [space] + e + p menu->edit->paste

                      – Val
                      Mar 5 '15 at 10:49










                    2




                    2





                    This is what I was missing, thanks! To actually copy it is necessary to press Enter.

                    – orschiro
                    Mar 28 '12 at 17:13







                    This is what I was missing, thanks! To actually copy it is necessary to press Enter.

                    – orschiro
                    Mar 28 '12 at 17:13






                    1




                    1





                    It is not necessary for me, but I have quickedit turned on in properties.

                    – EBGreen
                    Mar 28 '12 at 17:20





                    It is not necessary for me, but I have quickedit turned on in properties.

                    – EBGreen
                    Mar 28 '12 at 17:20













                    @orschiro: actually you don't need enter. I just tested it. You only need to highlight it and then right-click--> goes into clipboard. For pasting into powershell you only need to right click wherever you want.

                    – Kamran Bigdely
                    Jan 10 '14 at 16:23







                    @orschiro: actually you don't need enter. I just tested it. You only need to highlight it and then right-click--> goes into clipboard. For pasting into powershell you only need to right click wherever you want.

                    – Kamran Bigdely
                    Jan 10 '14 at 16:23






                    1




                    1





                    ok, it works, but it won't paste multiline strings, that's BS

                    – Alexander Mills
                    Dec 2 '14 at 5:30





                    ok, it works, but it won't paste multiline strings, that's BS

                    – Alexander Mills
                    Dec 2 '14 at 5:30




                    2




                    2





                    you can also use the menu shortcut, alt + [space] + e + p menu->edit->paste

                    – Val
                    Mar 5 '15 at 10:49







                    you can also use the menu shortcut, alt + [space] + e + p menu->edit->paste

                    – Val
                    Mar 5 '15 at 10:49















                    9














                    (Elaborating on the answer of Ƭᴇcʜιᴇ007 and Val)



                    Mouse



                    Select/Mark: Press left mouse button, drag, release.



                    Copy: Right-click.



                    Paste: With content in the clipboard, right-click.



                    Keyboard



                    Activate Mark: Alt + Space > e > k.



                    Select a Block: Navigate (arrow keys, Page-down, Page-up, End, Pos1) to the upper left corner of the block, press and hold Shift, navigate to the lower right corner, release Shift.



                    Copy: With a block selected, either hit Enter or Alt + Space > e > y.



                    Paste: With content in the clipboard, Alt + Space > e > p.






                    share|improve this answer
























                    • +1 for the hint to "Activate Mark". I was searching combinations of Cursor and Caret but it always returned results for mouse cursor...

                      – keremispirli
                      Nov 10 '17 at 10:35
















                    9














                    (Elaborating on the answer of Ƭᴇcʜιᴇ007 and Val)



                    Mouse



                    Select/Mark: Press left mouse button, drag, release.



                    Copy: Right-click.



                    Paste: With content in the clipboard, right-click.



                    Keyboard



                    Activate Mark: Alt + Space > e > k.



                    Select a Block: Navigate (arrow keys, Page-down, Page-up, End, Pos1) to the upper left corner of the block, press and hold Shift, navigate to the lower right corner, release Shift.



                    Copy: With a block selected, either hit Enter or Alt + Space > e > y.



                    Paste: With content in the clipboard, Alt + Space > e > p.






                    share|improve this answer
























                    • +1 for the hint to "Activate Mark". I was searching combinations of Cursor and Caret but it always returned results for mouse cursor...

                      – keremispirli
                      Nov 10 '17 at 10:35














                    9












                    9








                    9







                    (Elaborating on the answer of Ƭᴇcʜιᴇ007 and Val)



                    Mouse



                    Select/Mark: Press left mouse button, drag, release.



                    Copy: Right-click.



                    Paste: With content in the clipboard, right-click.



                    Keyboard



                    Activate Mark: Alt + Space > e > k.



                    Select a Block: Navigate (arrow keys, Page-down, Page-up, End, Pos1) to the upper left corner of the block, press and hold Shift, navigate to the lower right corner, release Shift.



                    Copy: With a block selected, either hit Enter or Alt + Space > e > y.



                    Paste: With content in the clipboard, Alt + Space > e > p.






                    share|improve this answer













                    (Elaborating on the answer of Ƭᴇcʜιᴇ007 and Val)



                    Mouse



                    Select/Mark: Press left mouse button, drag, release.



                    Copy: Right-click.



                    Paste: With content in the clipboard, right-click.



                    Keyboard



                    Activate Mark: Alt + Space > e > k.



                    Select a Block: Navigate (arrow keys, Page-down, Page-up, End, Pos1) to the upper left corner of the block, press and hold Shift, navigate to the lower right corner, release Shift.



                    Copy: With a block selected, either hit Enter or Alt + Space > e > y.



                    Paste: With content in the clipboard, Alt + Space > e > p.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Apr 4 '16 at 7:26









                    validvalid

                    20325




                    20325













                    • +1 for the hint to "Activate Mark". I was searching combinations of Cursor and Caret but it always returned results for mouse cursor...

                      – keremispirli
                      Nov 10 '17 at 10:35



















                    • +1 for the hint to "Activate Mark". I was searching combinations of Cursor and Caret but it always returned results for mouse cursor...

                      – keremispirli
                      Nov 10 '17 at 10:35

















                    +1 for the hint to "Activate Mark". I was searching combinations of Cursor and Caret but it always returned results for mouse cursor...

                    – keremispirli
                    Nov 10 '17 at 10:35





                    +1 for the hint to "Activate Mark". I was searching combinations of Cursor and Caret but it always returned results for mouse cursor...

                    – keremispirli
                    Nov 10 '17 at 10:35











                    5














                    Depends on which PowerShell you are using. With the newer PowerGUI Script Editor or with the PowerShell ISE (integrated scripting environment) cut/paste seems to work better:




                    • To cut drag the mouse across text to select, then ^C or right click to copy.

                    • To paste use ^V


                    With the older PowerShell:




                    • To cut drag the mouse across text to select, then enter to copy.

                    • You can sometimes hit ^C to copy but it does not seem to ALWAYS work.

                    • You can also drag to select then right click in the top window pane bar and select Edit | copy.

                    • To paste right click.




                    Good links for people learning PowerShell::




                    • The best PowerShell tutorial I've found so far is here. It goes into quite a bit of description of the command line. Sadly some of the cool stuff in the original PowerShell appears to be broken in ISE, like ctrl-home for example, to delete to start of line.


                    • Some differences between these two PowerShells is here.







                    share|improve this answer


























                    • Ctrl-V also works in PowerShell on Windows 10 here (PS version 5.1.15063.296).

                      – ComFreek
                      Jun 2 '17 at 9:44


















                    5














                    Depends on which PowerShell you are using. With the newer PowerGUI Script Editor or with the PowerShell ISE (integrated scripting environment) cut/paste seems to work better:




                    • To cut drag the mouse across text to select, then ^C or right click to copy.

                    • To paste use ^V


                    With the older PowerShell:




                    • To cut drag the mouse across text to select, then enter to copy.

                    • You can sometimes hit ^C to copy but it does not seem to ALWAYS work.

                    • You can also drag to select then right click in the top window pane bar and select Edit | copy.

                    • To paste right click.




                    Good links for people learning PowerShell::




                    • The best PowerShell tutorial I've found so far is here. It goes into quite a bit of description of the command line. Sadly some of the cool stuff in the original PowerShell appears to be broken in ISE, like ctrl-home for example, to delete to start of line.


                    • Some differences between these two PowerShells is here.







                    share|improve this answer


























                    • Ctrl-V also works in PowerShell on Windows 10 here (PS version 5.1.15063.296).

                      – ComFreek
                      Jun 2 '17 at 9:44
















                    5












                    5








                    5







                    Depends on which PowerShell you are using. With the newer PowerGUI Script Editor or with the PowerShell ISE (integrated scripting environment) cut/paste seems to work better:




                    • To cut drag the mouse across text to select, then ^C or right click to copy.

                    • To paste use ^V


                    With the older PowerShell:




                    • To cut drag the mouse across text to select, then enter to copy.

                    • You can sometimes hit ^C to copy but it does not seem to ALWAYS work.

                    • You can also drag to select then right click in the top window pane bar and select Edit | copy.

                    • To paste right click.




                    Good links for people learning PowerShell::




                    • The best PowerShell tutorial I've found so far is here. It goes into quite a bit of description of the command line. Sadly some of the cool stuff in the original PowerShell appears to be broken in ISE, like ctrl-home for example, to delete to start of line.


                    • Some differences between these two PowerShells is here.







                    share|improve this answer















                    Depends on which PowerShell you are using. With the newer PowerGUI Script Editor or with the PowerShell ISE (integrated scripting environment) cut/paste seems to work better:




                    • To cut drag the mouse across text to select, then ^C or right click to copy.

                    • To paste use ^V


                    With the older PowerShell:




                    • To cut drag the mouse across text to select, then enter to copy.

                    • You can sometimes hit ^C to copy but it does not seem to ALWAYS work.

                    • You can also drag to select then right click in the top window pane bar and select Edit | copy.

                    • To paste right click.




                    Good links for people learning PowerShell::




                    • The best PowerShell tutorial I've found so far is here. It goes into quite a bit of description of the command line. Sadly some of the cool stuff in the original PowerShell appears to be broken in ISE, like ctrl-home for example, to delete to start of line.


                    • Some differences between these two PowerShells is here.








                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Jan 14 '14 at 10:41

























                    answered Jan 11 '14 at 13:12









                    Elliptical viewElliptical view

                    719513




                    719513













                    • Ctrl-V also works in PowerShell on Windows 10 here (PS version 5.1.15063.296).

                      – ComFreek
                      Jun 2 '17 at 9:44





















                    • Ctrl-V also works in PowerShell on Windows 10 here (PS version 5.1.15063.296).

                      – ComFreek
                      Jun 2 '17 at 9:44



















                    Ctrl-V also works in PowerShell on Windows 10 here (PS version 5.1.15063.296).

                    – ComFreek
                    Jun 2 '17 at 9:44







                    Ctrl-V also works in PowerShell on Windows 10 here (PS version 5.1.15063.296).

                    – ComFreek
                    Jun 2 '17 at 9:44













                    3














                    As of Windows 10, Ctrl + C works for copying the text & Ctrl + V works for paste. You can also select the data using Shift + Arrow(Left/Right).



                    The standard console can be used in Windows 10 — the PowerShell ISE is still available but not required for copy/paste support.






                    share|improve this answer






























                      3














                      As of Windows 10, Ctrl + C works for copying the text & Ctrl + V works for paste. You can also select the data using Shift + Arrow(Left/Right).



                      The standard console can be used in Windows 10 — the PowerShell ISE is still available but not required for copy/paste support.






                      share|improve this answer




























                        3












                        3








                        3







                        As of Windows 10, Ctrl + C works for copying the text & Ctrl + V works for paste. You can also select the data using Shift + Arrow(Left/Right).



                        The standard console can be used in Windows 10 — the PowerShell ISE is still available but not required for copy/paste support.






                        share|improve this answer















                        As of Windows 10, Ctrl + C works for copying the text & Ctrl + V works for paste. You can also select the data using Shift + Arrow(Left/Right).



                        The standard console can be used in Windows 10 — the PowerShell ISE is still available but not required for copy/paste support.







                        share|improve this answer














                        share|improve this answer



                        share|improve this answer








                        edited Jul 21 '17 at 8:20









                        Bob

                        45.5k20137172




                        45.5k20137172










                        answered Mar 2 '17 at 12:30









                        AjaiVeer Singh SandhuAjaiVeer Singh Sandhu

                        991110




                        991110























                            0














                            Powershell functions like most terminal emulators (like PuTTY) - selecting text automatically copies it to your clipboard, and right-clicking pastes the content of your keyboard at your cursor.






                            share|improve this answer
























                            • Hello Rilgon, That was my first intuition but it does not work. Nothing gets copied to the clipboard.

                              – orschiro
                              Mar 28 '12 at 16:55






                            • 1





                              That's strange, because I definitely just tried it myself just to make sure it was right, and it worked just fine.

                              – Rilgon Arcsinh
                              Mar 28 '12 at 16:55











                            • Don't you need to hit enter to copy the contents to the clipboard in Powershell?

                              – Bernard Chen
                              Oct 10 '14 at 16:57
















                            0














                            Powershell functions like most terminal emulators (like PuTTY) - selecting text automatically copies it to your clipboard, and right-clicking pastes the content of your keyboard at your cursor.






                            share|improve this answer
























                            • Hello Rilgon, That was my first intuition but it does not work. Nothing gets copied to the clipboard.

                              – orschiro
                              Mar 28 '12 at 16:55






                            • 1





                              That's strange, because I definitely just tried it myself just to make sure it was right, and it worked just fine.

                              – Rilgon Arcsinh
                              Mar 28 '12 at 16:55











                            • Don't you need to hit enter to copy the contents to the clipboard in Powershell?

                              – Bernard Chen
                              Oct 10 '14 at 16:57














                            0












                            0








                            0







                            Powershell functions like most terminal emulators (like PuTTY) - selecting text automatically copies it to your clipboard, and right-clicking pastes the content of your keyboard at your cursor.






                            share|improve this answer













                            Powershell functions like most terminal emulators (like PuTTY) - selecting text automatically copies it to your clipboard, and right-clicking pastes the content of your keyboard at your cursor.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Mar 28 '12 at 16:47









                            Rilgon ArcsinhRilgon Arcsinh

                            28119




                            28119













                            • Hello Rilgon, That was my first intuition but it does not work. Nothing gets copied to the clipboard.

                              – orschiro
                              Mar 28 '12 at 16:55






                            • 1





                              That's strange, because I definitely just tried it myself just to make sure it was right, and it worked just fine.

                              – Rilgon Arcsinh
                              Mar 28 '12 at 16:55











                            • Don't you need to hit enter to copy the contents to the clipboard in Powershell?

                              – Bernard Chen
                              Oct 10 '14 at 16:57



















                            • Hello Rilgon, That was my first intuition but it does not work. Nothing gets copied to the clipboard.

                              – orschiro
                              Mar 28 '12 at 16:55






                            • 1





                              That's strange, because I definitely just tried it myself just to make sure it was right, and it worked just fine.

                              – Rilgon Arcsinh
                              Mar 28 '12 at 16:55











                            • Don't you need to hit enter to copy the contents to the clipboard in Powershell?

                              – Bernard Chen
                              Oct 10 '14 at 16:57

















                            Hello Rilgon, That was my first intuition but it does not work. Nothing gets copied to the clipboard.

                            – orschiro
                            Mar 28 '12 at 16:55





                            Hello Rilgon, That was my first intuition but it does not work. Nothing gets copied to the clipboard.

                            – orschiro
                            Mar 28 '12 at 16:55




                            1




                            1





                            That's strange, because I definitely just tried it myself just to make sure it was right, and it worked just fine.

                            – Rilgon Arcsinh
                            Mar 28 '12 at 16:55





                            That's strange, because I definitely just tried it myself just to make sure it was right, and it worked just fine.

                            – Rilgon Arcsinh
                            Mar 28 '12 at 16:55













                            Don't you need to hit enter to copy the contents to the clipboard in Powershell?

                            – Bernard Chen
                            Oct 10 '14 at 16:57





                            Don't you need to hit enter to copy the contents to the clipboard in Powershell?

                            – Bernard Chen
                            Oct 10 '14 at 16:57











                            0














                            Try this from the MSDN website: Copy console screen to system clipboard
                            . This its self is a PS script, but it copies what is currently on the window to a file.






                            share|improve this answer




























                              0














                              Try this from the MSDN website: Copy console screen to system clipboard
                              . This its self is a PS script, but it copies what is currently on the window to a file.






                              share|improve this answer


























                                0












                                0








                                0







                                Try this from the MSDN website: Copy console screen to system clipboard
                                . This its self is a PS script, but it copies what is currently on the window to a file.






                                share|improve this answer













                                Try this from the MSDN website: Copy console screen to system clipboard
                                . This its self is a PS script, but it copies what is currently on the window to a file.







                                share|improve this answer












                                share|improve this answer



                                share|improve this answer










                                answered Mar 28 '12 at 17:09









                                cutrightjmcutrightjm

                                3,35332047




                                3,35332047























                                    0














                                    This is just to add a partial solution for those times you don't want to use the mouse. It only helps with pasting but you can press Alt+Space then e then p. The Alt+Space opens the PowerShell window's menu, the e opens the Edit sub-menu and the p does the actual pasting. Hardly convenient but it does save you from going to the mouse.






                                    share|improve this answer




























                                      0














                                      This is just to add a partial solution for those times you don't want to use the mouse. It only helps with pasting but you can press Alt+Space then e then p. The Alt+Space opens the PowerShell window's menu, the e opens the Edit sub-menu and the p does the actual pasting. Hardly convenient but it does save you from going to the mouse.






                                      share|improve this answer


























                                        0












                                        0








                                        0







                                        This is just to add a partial solution for those times you don't want to use the mouse. It only helps with pasting but you can press Alt+Space then e then p. The Alt+Space opens the PowerShell window's menu, the e opens the Edit sub-menu and the p does the actual pasting. Hardly convenient but it does save you from going to the mouse.






                                        share|improve this answer













                                        This is just to add a partial solution for those times you don't want to use the mouse. It only helps with pasting but you can press Alt+Space then e then p. The Alt+Space opens the PowerShell window's menu, the e opens the Edit sub-menu and the p does the actual pasting. Hardly convenient but it does save you from going to the mouse.







                                        share|improve this answer












                                        share|improve this answer



                                        share|improve this answer










                                        answered Dec 16 '14 at 4:17









                                        Night OwlNight Owl

                                        273136




                                        273136























                                            0














                                            To paste, you may use AutoHotkey script (this also affects all console windows):



                                            #IfWinActive ahk_class ConsoleWindowClass
                                            ^V::
                                            SendInput {Raw}%clipboard%
                                            return
                                            #IfWinActive


                                            Found on http://www.howtogeek.com/howto/25590/how-to-enable-ctrlv-for-pasting-in-the-windows-command-prompt/.






                                            share|improve this answer






























                                              0














                                              To paste, you may use AutoHotkey script (this also affects all console windows):



                                              #IfWinActive ahk_class ConsoleWindowClass
                                              ^V::
                                              SendInput {Raw}%clipboard%
                                              return
                                              #IfWinActive


                                              Found on http://www.howtogeek.com/howto/25590/how-to-enable-ctrlv-for-pasting-in-the-windows-command-prompt/.






                                              share|improve this answer




























                                                0












                                                0








                                                0







                                                To paste, you may use AutoHotkey script (this also affects all console windows):



                                                #IfWinActive ahk_class ConsoleWindowClass
                                                ^V::
                                                SendInput {Raw}%clipboard%
                                                return
                                                #IfWinActive


                                                Found on http://www.howtogeek.com/howto/25590/how-to-enable-ctrlv-for-pasting-in-the-windows-command-prompt/.






                                                share|improve this answer















                                                To paste, you may use AutoHotkey script (this also affects all console windows):



                                                #IfWinActive ahk_class ConsoleWindowClass
                                                ^V::
                                                SendInput {Raw}%clipboard%
                                                return
                                                #IfWinActive


                                                Found on http://www.howtogeek.com/howto/25590/how-to-enable-ctrlv-for-pasting-in-the-windows-command-prompt/.







                                                share|improve this answer














                                                share|improve this answer



                                                share|improve this answer








                                                edited Mar 20 '17 at 10:17









                                                Community

                                                1




                                                1










                                                answered Oct 20 '16 at 8:12









                                                Dariusz WoźniakDariusz Woźniak

                                                263314




                                                263314























                                                    0














                                                    Another way: highlight something, and control-mousedrag to copy it, in the Powershell ISE. Alt-hightlight also highlights rectangles.






                                                    share|improve this answer





















                                                    • 4





                                                      That doesn't work here.

                                                      – DavidPostill
                                                      May 15 '17 at 15:26
















                                                    0














                                                    Another way: highlight something, and control-mousedrag to copy it, in the Powershell ISE. Alt-hightlight also highlights rectangles.






                                                    share|improve this answer





















                                                    • 4





                                                      That doesn't work here.

                                                      – DavidPostill
                                                      May 15 '17 at 15:26














                                                    0












                                                    0








                                                    0







                                                    Another way: highlight something, and control-mousedrag to copy it, in the Powershell ISE. Alt-hightlight also highlights rectangles.






                                                    share|improve this answer















                                                    Another way: highlight something, and control-mousedrag to copy it, in the Powershell ISE. Alt-hightlight also highlights rectangles.







                                                    share|improve this answer














                                                    share|improve this answer



                                                    share|improve this answer








                                                    edited May 15 '17 at 16:52

























                                                    answered May 15 '17 at 14:40









                                                    js2010js2010

                                                    1863




                                                    1863








                                                    • 4





                                                      That doesn't work here.

                                                      – DavidPostill
                                                      May 15 '17 at 15:26














                                                    • 4





                                                      That doesn't work here.

                                                      – DavidPostill
                                                      May 15 '17 at 15:26








                                                    4




                                                    4





                                                    That doesn't work here.

                                                    – DavidPostill
                                                    May 15 '17 at 15:26





                                                    That doesn't work here.

                                                    – DavidPostill
                                                    May 15 '17 at 15:26











                                                    0














                                                    If you want to put the output of your command into the Clipboard, just use Set-Clipboard cmdlet as the final item in your pipeline, or its standard alias scb.



                                                    One caveat is that some commands return text (eg. Get-Content) and others produce collection of objects (eg. Get-ChildItem). If you get weird things in clipboard, insert Out-String before Set-Clipboard to convert everything to text:



                                                    gc .myFile.txt | scb



                                                    ls c:Windows | Out-String | scb






                                                    share|improve this answer




























                                                      0














                                                      If you want to put the output of your command into the Clipboard, just use Set-Clipboard cmdlet as the final item in your pipeline, or its standard alias scb.



                                                      One caveat is that some commands return text (eg. Get-Content) and others produce collection of objects (eg. Get-ChildItem). If you get weird things in clipboard, insert Out-String before Set-Clipboard to convert everything to text:



                                                      gc .myFile.txt | scb



                                                      ls c:Windows | Out-String | scb






                                                      share|improve this answer


























                                                        0












                                                        0








                                                        0







                                                        If you want to put the output of your command into the Clipboard, just use Set-Clipboard cmdlet as the final item in your pipeline, or its standard alias scb.



                                                        One caveat is that some commands return text (eg. Get-Content) and others produce collection of objects (eg. Get-ChildItem). If you get weird things in clipboard, insert Out-String before Set-Clipboard to convert everything to text:



                                                        gc .myFile.txt | scb



                                                        ls c:Windows | Out-String | scb






                                                        share|improve this answer













                                                        If you want to put the output of your command into the Clipboard, just use Set-Clipboard cmdlet as the final item in your pipeline, or its standard alias scb.



                                                        One caveat is that some commands return text (eg. Get-Content) and others produce collection of objects (eg. Get-ChildItem). If you get weird things in clipboard, insert Out-String before Set-Clipboard to convert everything to text:



                                                        gc .myFile.txt | scb



                                                        ls c:Windows | Out-String | scb







                                                        share|improve this answer












                                                        share|improve this answer



                                                        share|improve this answer










                                                        answered May 27 '18 at 12:05









                                                        maoizmmaoizm

                                                        624518




                                                        624518






























                                                            draft saved

                                                            draft discarded




















































                                                            Thanks for contributing an answer to Super User!


                                                            • Please be sure to answer the question. Provide details and share your research!

                                                            But avoid



                                                            • Asking for help, clarification, or responding to other answers.

                                                            • Making statements based on opinion; back them up with references or personal experience.


                                                            To learn more, see our tips on writing great answers.




                                                            draft saved


                                                            draft discarded














                                                            StackExchange.ready(
                                                            function () {
                                                            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f405851%2fcopy-and-paste-in-windows-powershell%23new-answer', 'question_page');
                                                            }
                                                            );

                                                            Post as a guest















                                                            Required, but never shown





















































                                                            Required, but never shown














                                                            Required, but never shown












                                                            Required, but never shown







                                                            Required, but never shown

































                                                            Required, but never shown














                                                            Required, but never shown












                                                            Required, but never shown







                                                            Required, but never shown







                                                            Popular posts from this blog

                                                            flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                                                            Mangá

                                                             ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕