Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

powershell throwing can not run script when testing from APC GUI

Posted on 2012-08-24
3
Medium Priority
?
1,041 Views
Last Modified: 2012-08-24
When attempting to run my batch file from the APC gui, which calls my powershell shutdown script, I am receiving the following error:

script.ps1 cannot be loaded because the execution of scripts is disabled on this system
catagoryinfo :notspecified: PSSecurityException
FullyQualifiedErrorId :runtime Exception

I can run this script separate from the APC power chute software, and I have tried setting the ExecutionPolicy to RemoteSigned and Unrestricted with the same results

Is there some other security setting I am missing?

Side note: I have it running under local system account with Allow service to interact with desktop enabled. I get the same results if I use a domain account also

thanks
0
Comment
Question by:progjm
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
dicconb earned 2000 total points
ID: 38329763
Hi progjm,

I assume the batch file contains something like this:
powershell.exe c:\shutdown.ps1

Open in new window


Try replacing it with this:
powershell.exe -executionpolicy unrestricted c:\shutdown.ps1

Open in new window


Cheers,

D
0
 
LVL 1

Author Comment

by:progjm
ID: 38329804
That did it, thank you!
0
 
LVL 8

Expert Comment

by:dicconb
ID: 38329911
My pleasure, thanks for the quick accept!

D
0

Featured Post

New Tabletop Appliances Blow Competitors Away!

WatchGuard’s new T15, T35 and T55 tabletop UTMs provide the highest-performing security inspection in their class, allowing users at small offices, home offices and distributed enterprises to experience blazing-fast Internet speeds without sacrificing enterprise-grade security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Suggested Courses
Course of the Month20 days, 15 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question