Hi,
Maybe not really a powerCLI question. but I'm hoping that people here have run into similar problems. I've spent a decent amount of time on writing a pretty advanced shutdown script. It uses SNMP to get the runtime from the UPS and does some migrating / shutdowns based on that info.
All works very nice when I run from the console. But when APC's PowerChute network shutdown kicks it off, it doesn't do anything.
An early line is:
Capture Output
Start-transcript $filename| Out-Null
And that file is created OK, but it's completely empty
Being a powershell newbie, I don't really know where to look. The script writes a lot of stuff to the console. When powershute starts the script I don't see a console. Could that cause problems?
TX!
Bas
You may need to use or create a user to run the Powerchute agent rather than the local system account. The local system account is limited.
Have a look at Keith Hill's Effective PowerShell Item 14: Capturing All Output from a Script post. It shows one method for capturing all output.
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference