We are using more and more, Windows Powershell (.ps scripts) in our business' computing environment.
We would like to call these Powershell commands from a Foglight Rule's Remote Command Action.
Is this supported by Foglight?
STATUS: FGL-8996 was rejected for consideration.
Powershell scripting support as a Remote Command Action is not supported in Foglight.
WORKAROUND:
Use a customized visual basic script that calls windows powershell command.
Example: VB Script, 'call.vbs' ( copy the script below into a text editor and save it as 'call.vbs' file)
----------< call.vbs>-------------
Set objShell = CreateObject("Wscript.Shell")
vPSscrIpt = "powershell.exe -noexit c:\script\MyShellScript.ps1"
objShell.Run vPSscrIpt
---------------< End of call.vbs> ----------
Note : FMS host needs to have Microsoft windows powershell installed. It can be downloaded from this link (for windows 2003) :
http://www.microsoft.com/windowsserver2003/technologies/management/powershell/download.mspx
Then in the rule action, use a command action like this to run the VBS script :
cscript.exe "c:\script\call.vbs"
(see attached file for screenshot example)
This command will execute call.vbs which basically calls the windows powershell script.
Windows Powershell scripting comes with windows 2008 (version 1 can be downloaded and installed on windows 2003 and XP) .
http://www.microsoft.com/windowsserver2003/technologies/management/powershell/download.mspx
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center