No rights to run scripts Powershell v4

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Dave Wyatt Dave Wyatt 2 years, 4 months ago.

  • Author
    Posts
  • #17396
    Profile photo of Michael Delaney
    Michael Delaney
    Participant

    After upgrading from Powershell v2 to Powershell v4, I am no longer able to run any of my scripts that require administrator rights to run.

    I have checked the executionpolicy after the upgrade. It is set to remotesigned.

    I am opening Powershell v4 via the ISE, and I am doing so as an administrator. However, when PowerShell opens, it does not indicate that I am running it as an Administrator. When I run a script that checks to make sure I am running Powershell is running as an administrator, i receive an error indicating that I need to run Powershell as an administrator.

    My environment
    OS: Windows 7 SP1 64-bit
    Powershell version: V4

    I am wondering if this is the cause. In my environment, my administrator account is not local to the machine I am running PowerShell on. It is a account that resides in Active Directory and has been granted local administrator rights to all computers connected to the domain via GPO.

    Any ideas on this one?

  • #17398
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    The "Run as Administrator" wording is from the UAC (User Account Control) feature, and it shouldn't matter what program or version you're running. If you need to run something "as Administrator", just right-click on a shortcut and choose "Run as Administrator". What happens next will depend on your system policies; you may have to click "Yes" on a prompt, re-enter your username and password, or it may just run. Either way, when you're running either PowerShell.exe or the ISE, you should see "Administrator:" in the title bar.

You must be logged in to reply to this topic.