Diagnosctic and Recovery Task Time Out

Hello,

I'am creating a recovery task witch wil do a shutdown of my envirement when the temperature in the datacenter is above 30 degrees Celcius. When I did a test a run found out that the timeout option in the Recovery task pane isn't working.

My settings are:

Timeout Setting in the Diagnostic and Recovery Properties

The VBS script is Run to start a Powershell Script:

Option Explicit 
Dim objShell
Set objShell = CreateObject("WScript.Shell") 
objShell.run "powershell -noexit -file D:\Scripts\testscript.ps1",4,true

The Powershell Script that is called by the VBS Script. This is not the powerdown Script but a Timeout Test Script

import-Module "d:\scripts\Functions\Currenttime.ps1"

$Logfile = "D:\Log\Timeouttest.ps1.$logfile.txt"

Start-Transcript -Path $Logfile > $null
Write-Host (CurrentTime)" - Start Logfile"
do {
    $Value++
	if ($Value -eq 1)
		{
			Write-Host (CurrentTime)" - Start Waiting"
		}
	else
		{
    		write-host (CurrentTime)" - Time out + 30 Seconde"
		}
    sleep 30 #1800
   }
while (
       $Value -ne 21
     )

Stop-Transcript > $null

The Function that is imported in the powershell Script.

Function CurrentTime
{
	(get-date).toString('yyyy.MM.dd hh.mm.ss')
}

When I generate the a alert and the Recovery task is started the scripts times out after 5 minuters. When I run the same scripts whitout System Center Operations Manager then everything works.

Hope someone can help me

GRz

Roelkn

April 11th, 2014 6:16am

Check you're not experiencing the following:

http://www.systemcentercentral.com/forums-archive/topic/scom-task-timeout-wrong/

Free Windows Admin Tool Kit Click here and download it now
April 11th, 2014 9:04am

Check you're not experiencing the following:

http://www.systemcentercentral.com/forums-archive/topic/scom-task-timeout-wrong/

  • Marked as answer by roelkn 21 hours 43 minutes ago
April 11th, 2014 3:56pm

Check you're not experiencing the following:

http://www.systemcentercentral.com/forums-archive/topic/scom-task-timeout-wrong/

  • Marked as answer by roelkn Monday, April 14, 2014 12:53 PM
Free Windows Admin Tool Kit Click here and download it now
April 11th, 2014 3:56pm

Hi Chunky.1

Thank's for the link that was the solution for my problem

Grz Roelkn

April 14th, 2014 9:15am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics