troubleshooting Question

Powershell Script with HP Power Protector

Avatar of Manuel Boosch
Manuel Boosch asked on
Server HardwarePowershellVMware
6 Comments1 Solution881 ViewsLast Modified:
Hello,

i have an VMWare Environment with 2 x ESXi Host in a HA-Cluster. This Environment is connected to a HP 3000 UPS with a HP UPS MGMT Module. I have installed a W2012R2 VM running on this Cluster and installed HP Power Protector ver. 1.04 on this VM.

Now i wrote a powershell script for shutting down the VMWare vSphere HA-Cluster and this script (c:\temp\ups.ps1) is running fine if i run it locally on my W2012R2 VM.

Now i set the HPPP to run a script and set it up for the path "powershell c:\temp\ups.ps1". But it does not work when i use the "Test Shutdown" Button - as mentioned before the script is running fine when i start it manually.

I wrote a test script with the only information to restart the vm:

shutdown -r -t 00

saved this one to c:\temp\ups1.ps1.

Now i inserted this one in HPPP as script path "powershell c:\temp\ups1.ps1". Pressing the "Test Shutdown" button now works and restarts the VM directly.

Why it does not work with the other script in HPPP ? Im loading the VMWare Snapin at the beginning of my script to use PowerCLI commands..

Is there anything i missed ?
ASKER CERTIFIED SOLUTION
Manuel Boosch

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros