i create PS script that will be startet automatic from an event (or more
than one). Sometimes i got the following errors. (this will be happened if
the script runs more than one at the same time - this is normal and should be
possible)
Engine state is changed from Available to Stopped.
Details:
NewEngineState=Stopped
PreviousEngineState=Available
SequenceNumber=40
Provider "OperationsManagerMonitoring" is Stopped.
Provider "Certificate" is Stopped.
ans so on for Variable, Function and Registry
This is only a short extract
thx
jd
Can you provide more details on the message and maybe what the scripts
are doing?
Are these scripts running in the Operations Manager Command Shell?
Marco
--
*Microsoft MVP - Windows Server - Admin Frameworks
https://mvp.support.microsoft.com/profile/Marco.Shaw
*PowerShell Co-Community Director - http://www.powershellcommunity.org
*Blog - http://marcoshaw.blogspot.com
---------------------------------
Add-PSSnapin Microsoft.EnterpriseManagement.OperationsManager.Client
cd OperationsManagerMonitoring::
New-ManagementGroupConnection localhost
cd localhost
$myid = $args[0]
$mytype = $args[1]
$mystate = $args[2]
if (Get-Alert -ID "$myid")
{
$outputfilename = 'c:\log\alerts\new\' + $myid + '.' + $mystate
#echo $outputfilename
Get-Alert -ID "$myid">"$outputfilename"
Write-Output "myType: $mytype">>"$outputfilename"
}
else
{
$outputfilename = 'c:\log\alerts\notfound\' + $myid + '.' + $mystate
#echo $outputfilename
Get-Alert -ID "$myid">"$outputfilename"
Write-Output "myType: $mytype">>"$outputfilename"