Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Friday, March 10, 2017 4:57 PM
Dear Community,
I'm using PowerShell 5.1 on Windows 10 1607 64 Bit. I have discovered a problem with Cut & Paste within the PowerShell ISE editor. When I try to cut out some code it doesn't cut it out but copies the code to the clipboard and doesn't remove it. So I always have to remove the copied text manually. This issue occurs wheter I cut text using the context menu or the keyboard shortcut.
Does anyone else have the same issue? If so, what can I do to work around it and hw to report it to Microsoft?
Thanks in advance.
powershellking
All replies (19)
Friday, March 10, 2017 5:48 PM
Pasting does not remove the object from the clipboard. You can always paste multiple times. This has always been true in Windows.
What do you mean that you "manually" remove it? How can you manually remove the contents of the clipboard?
\(ツ)_/
Friday, March 10, 2017 6:34 PM
I mean that when I cut text it should normally be removed from the original place. In my case it's not removed from the original place. Instead of a cut action it always performs a copy action.
So I have to delete the text manually from the script. It's not cut out but copied in my case. In all other applications that works fine.
Friday, March 10, 2017 6:42 PM
Load the ISE with no Add-ins and test again. You may have a corrupt system. The copy/paste menu item should never be an issue.
Load ISE with no profile to avoid conflicts.
\(ツ)_/
Friday, March 10, 2017 6:48 PM
Loading ISE without Profile didn't bring any success. Tested it on another system. There it worked just fine. But as I already said, the problem exists only in the PowerShell ISE.
Vielen Dank powershellking
Friday, March 10, 2017 6:53 PM
Are you sure that you have not re-assigned your keyboard. Does this happen in notepad? In Office?
This is a break/fix issue and not a scripting issue. You will need to do normal system troubleshooting and recovery steps.
\(ツ)_/
Friday, March 10, 2017 6:56 PM
I definitely haven't re-assigned my keyboard. It's the normal German layout. In Notepad or Office the problem doesn't show up.
Vielen Dank powershellking
Tuesday, April 18, 2017 3:55 PM
Same issue here with ISE 3.0(32 and 64-bit). Cutting works fine in other text editors, but with the PS ISE it seems to hang for a brief moment after executing the cut but never removes the selected text.
Wednesday, August 9, 2017 3:35 PM
Same issue here. Clearly an issue with the app. No other apps affected, no special KB configs. US-104 kb. I thought it might be the special themes, but I have the same result when themeless.
Friday, January 12, 2018 1:56 AM
Still an issue with PS v 5.1, ISE v10.0. Only occurs in ISE, no other editors or applications. Has there been a fix for this?
Friday, January 12, 2018 2:03 AM
Still an issue with PS v 5.1, ISE v10.0. Only occurs in ISE, no other editors or applications. Has there been a fix for this?
This is not an issue. Read the whole thread. No one else has an issue with this.
The clipboard is not cleared on a paste. System problems can corrupt the clipboard. The CB is a system component and has nothing to do with the ISE.
If you are having issue you should start by repairing your system.
\(ツ)_/
Monday, February 19, 2018 2:44 AM
Actually, I think you may have misread the question. I do have an issue with this.
The issue I've encountered is that using Powershell ISE, if I select some text, and then "cut" either using a keyboard shortcut (Ctrl-X), or by clicking the 'Cut' UI button, the text is copied to the clipboard, but it is not removed from the file being edited.
I think this is what the original questioner meant by 'copies the code to the clipboard and doesn't remove it.'
Monday, February 19, 2018 7:10 AM
Actually, I think you may have misread the question. I do have an issue with this.
The issue I've encountered is that using Powershell ISE, if I select some text, and then "cut" either using a keyboard shortcut (Ctrl-X), or by clicking the 'Cut' UI button, the text is copied to the clipboard, but it is not removed from the file being edited.
I think this is what the original questioner meant by 'copies the code to the clipboard and doesn't remove it.'
Cutting in ISE does not alter any files.
\(ツ)_/
Tuesday, February 20, 2018 12:01 AM
Isn't that a bug?
If not, then why have Copy and Cut options in the edit menu?
Tuesday, February 20, 2018 12:06 AM
Remember that "Save" also has a menu presence.
\(ツ)_/
Tuesday, February 20, 2018 12:59 AM
That doesn't address my question, does it?
Tuesday, February 20, 2018 1:02 AM
That doesn't address my question, does it?
This is not your question. If you have a question you will have to open your own topic. That will give it an address. Maybe you will get some mail.
\(ツ)_/
Tuesday, February 20, 2018 1:08 AM
Thanks for your help.
Wednesday, February 27, 2019 2:05 AM | 2 votes
Old thread, but it's high on the Google results for this problem of "cut" not working properly in the PowerShell ISE. Cut just acts like a "copy" regardless of how it's invoked (Ctrl+X, Edit menu, or context menu).
Are you running in a VM by any chance?
In my case, I was running inside a VirtualBox VM and something about VirtualBox's clipboard sharing with the host was what was causing this weird behaviour in the ISE. It's never caused me issues in any other program, so there must be something peculiar about the way PS ISE implements cut.
Disabling clipboard sharing in the VM's settings worked around the issue for me. So if you are running in a VM with clipboard sharing enabled, or any other situation where you might have some background program doing shenanigans with the clipboard, try turning that functionality off. For me, the workaround takes effect instantly (don't even have to restart the ISE).
Saturday, April 27, 2019 7:59 PM
Similar issue for me too. PowerShell ISE 6.2. Doing a cut either with Ctrl+X or via menu was performing a copy action.
Although not using a VM, this post did point me in the right direction. I had TightVNC session running. Closing TightVNC solved the problem.
Thanks for the assist.