Executing powershell scripts from network generate security warning with execution policy set to unrestricted RRS feed

  • Question

  • Hello,

    My powershell scripts are no longer running due to the security warning prompt. I have a .NET app that runs powershell scripts from the network. Suddenly, after rebuilding our image, the scripts are now displaying a security prompt when the .NET app runs them.

    The local policy under Administrative Templates \ Windows Components \ Windows Powershell \ Turn on Script Execution is set to "Allow All Scripts". If I test "Get-ExecutionPolicy", the result is "unrestricted".

    This works fine on our Windows 7 and previous Windows 10 1607 and 1703 images. However, this does not appear to be the case with an updated 1703 image, and 1709.

    If I execute the scripts via the .NET app with the " -ExecutionPolicy Bypass -Verb RunAs -Force" switches, I still get the same issue.

    Note that the .NET App runs as administrator. Please help! Thanks =)

    • Edited by CDR92 Wednesday, November 1, 2017 7:00 PM
    Wednesday, November 1, 2017 6:50 PM

All replies

  • This is not a Net app support forum.  You will need to contact the vendor of your Net app.  As you noted PowerShell and the scripts work correctly before the upgrade.  The app is clearly not compatible with the upgrade.

    If an app is "untrusted" then it is likely that the calls may fail due to enhanced security in 1709.  Please read the 1709 release notes very carefully to see what new security restrictions have been implemented.  There are many.  The app vendor likely already knows about this and may have a workaround or config change that will get you going again.

    This is not a PowerShell issue.

    This is not a Windows support forum.


    • Edited by jrv Wednesday, November 1, 2017 7:52 PM
    Wednesday, November 1, 2017 7:51 PM