- Community Home
- >
- Servers and Operating Systems
- >
- HPE ProLiant
- >
- Server Management - Systems Insight Manager
- >
- HPSIM running a powershell script for an event
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2007 10:50 AM
тАО03-27-2007 10:50 AM
HPSIM running a powershell script for an event
We have tried to get an HPSIM event to execute a powershell script. It appears to open powershell but doesn't run the script.
Is there a trick to get this to work?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2007 03:36 PM
тАО03-27-2007 03:36 PM
Re: HPSIM running a powershell script for an event
I'm not familiar with powershell, how do you pass the script to run?
To run our perl commands it is just a matter of specifying the location of the perl image and file to run; e.g.
c:\perl\perl.exe d:\perl_script\myfile.pl
in the command to launch part of the costom command set up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2007 03:53 PM
тАО03-27-2007 03:53 PM
Re: HPSIM running a powershell script for an event
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-02-2007 02:51 PM
тАО04-02-2007 02:51 PM
Re: HPSIM running a powershell script for an event
It seems to launch powershell but fails to run the powershell script. We have to kill the powershell process via task manager so it is definitely getting that far. The same launch technique outside of HPSIM works.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-02-2007 03:53 PM
тАО04-02-2007 03:53 PM
Re: HPSIM running a powershell script for an event
Can you provide an example?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-03-2007 02:12 AM
тАО04-03-2007 02:12 AM
Re: HPSIM running a powershell script for an event
I do know for powershell, you do have to enable security within them to allow scripts to be run.
Out of the box, PowerShell is is just a interactive shell. In order to allow scripts to be run, you have to run a command within the powershell to enable a certain level of script functionality. It then remembers that setting for future scripts.
Have you done this?
Nelson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-03-2007 02:15 AM
тАО04-03-2007 02:15 AM
Re: HPSIM running a powershell script for an event
The Set-ExecutionPolicy cmdlet enables you to determine which Windows PowerShell scripts (if any) will be allowed to run on your computer. Windows PowerShell has four different execution policies:
├в ┬в Restricted ├в No scripts can be run. Windows PowerShell can be used only in interactive mode.
├в ┬в AllSigned ├в Only scripts signed by a trusted publisher can be run.
├в ┬в RemoteSigned ├в Downloaded scripts must be signed by a trusted publisher before they can be run.
├в ┬в Unrestricted ├в No restrictions; all Windows PowerShell scripts can be run.
To assign a particular policy simply call Set-ExecutionPolicy followed by the appropriate policy name. For example, this command sets the execution policy to RemoteSigned:
Set-ExecutionPolicy RemoteSigned
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-03-2007 10:51 AM
тАО04-03-2007 10:51 AM
Re: HPSIM running a powershell script for an event
We have tried with powershell set to unrestricted to no avail. Maybe we will try and sign a script.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-04-2007 09:44 AM
тАО04-04-2007 09:44 AM
Re: HPSIM running a powershell script for an event
From a cmd line, if you just enter the name of the PS script does it run?
If it does then the launch line in HPSIM would be just the name of the PS script.
I guess another test maybe to nestle the PS in a batch file and see what happens there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2007 12:05 AM
тАО04-27-2007 12:05 AM
Re: HPSIM running a powershell script for an event
See here for more info:
http://blog.sapien.com/current/2006/12/25/more-fun-with-scheduled-powershell.html