I've browsed these forums last week looking for an answer to the issue I am having with Run Program / Notification Profiles, but I have not had luck applying the suggested answers from the other cases.
I want to recycle an IIS application pool when a URL monitors threshold is triggered.
The methods I have tried. (all scripts attached)
1.) Psexec:
Batch files in /OpManager
pseRecycleFSA.bat:
C:WindowsSystem32psexec.exe %1 -c -f -h -d LocalFSARecycle.bat
Arguments in notification profile:
$displayname
2.) Powershell:
Batch file and PS1 file in /OpManager
psRecycleFSA.bat:
C:WINDOWSsystem32WindowsPowerShell1.0powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -File .RecycleFSA.ps1 %1
Arguments in notification profile:
$displayname
3.) Beyondexecv2:
Batch files in /OpManager
RecycleFSA.bat:
c:windowssystem32eyondexecv2.exe %1 -s -cs LocalFSARecycle.bat
Arguments in notification profile:
$displayname
I can execute each script manually at a command prompt providing the servername as the first argument. Each method works in its own way successfully. I am running these as my domain admin account.
This is a Windows OpManager server. My suspicions are that OpManager service is running as an account which cannot execute the command against the remote machines. OpManager is running as System. The remote service is running as Network Service. Each are local accounts to their respective machines.
I haven't tried creating a domain account for this service to run under as we run qualified servers that require validation for changes.
I would like to make use of the stored credentials used by OpManager to run these Run Program/Notification Profiles under. I have to avoid storing privileged account usernames and passwords in the batch files in plain text. i.e. cannot pass them to psexec or beyondexecv2
Any advise is appreciated. I am running OpManager 8 build 8723.