Why doesn't PowerShell ISE allow me to set breakpoints when working as an administrator?

If it was not possible to get PowerGUI to work properly, I returned to PowerShell ISE. However, if I run this as an Administrator, it will not allow me to set breakpoints.

If I run as usual (my login is part of the Administrators), everything is fine, but because I need to script some tasks that require full administrator rights, this is not good.

I saved the script as the correct file (ie not "untitled1.ps1"), but without joy.

I am running Windows 7 x64 Ultimate.

It is strange that this is not a problem in my block of Windows 2008 R2 developers (I register as a user who is a member of Administrators, then runs PS ISE "As an administrator", and breakpoints are set and deleted.

Any ideas why this would be?

+3
source share
3 answers

There seems to be a problem with PowerShell and square brackets in the folder and file names.

Both PowerGUI and PowerShell ISE will not hit the breakpoint if the script is debugged in the folder with [or ]in the name.

+4
source

I also ran into the same problem. Saving a file in a physical location included all debugging capabilities.

+9

I noticed that you are using x64. Is it likely that you are using x64 ISE, but only set the execution policy from x86 restrictions (or vice versa).

0
source

Source: https://habr.com/ru/post/1778782/


All Articles