I created a fixlet. When I create an action on it, the action is performed on the server, every line is executed as it should be, exit code of action is 0, relevance of the fixlet is changed from true to false, but still the action reports as failed. Any idea why? Here’s the action script:
action uses wow64 redirection false
// Stop service
waithidden cmd.exe /c net stop “healthservice”
// Rename folder on servers where SCOM is located in “System center Operations Manager” folder
if {exists folder “C:\Program Files\System Center Operations Manager\Agent”}
folder delete "C:\Program Files\System Center Operations Manager\Agent\Health Service State_old"
move “C:\Program Files\System Center Operations Manager\Agent\Health Service State” "C:\Program Files\System Center Operations Manager\Agent\Health Service State_old"
endif
// Rename folder on servers where SCOM is located in “Microsoft Monitoring Agent” folder
if {exists folder “C:\Program Files\Microsoft Monitoring Agent\Agent”}
folder delete "C:\Program Files\Microsoft Monitoring Agent\Agent\Health Service State_old"
move “C:\Program Files\Microsoft Monitoring Agent\Agent\Health Service State” "C:\Program Files\Microsoft Monitoring Agent\Agent\Health Service State_old"
endif
// Start the service
waithidden cmd.exe /c net start “healthservice”
Here is portion of log related to the action:
At 15:33:47 +0800 -
GatherHashMV command received.
At 15:33:48 +0800 - mailboxsite (htt//BFserver:52311/cgi-bin/bfgather.exe/mailboxsite4067203)
Downloaded ‘htt://10.176.164.9:52311/mailbox/files/14/55/1455d0c0f69b5a41bd32ca5ed0d9bb03b2586e8a’ as 'Action 115690.fxf’
Gather::SyncSiteByFile adding files - count: 1
At 15:33:48 +0800 -
Successful Synchronization with site ‘mailboxsite’ (version 106) - 'htt//BFserver:52311/cgi-bin/bfgather.exe/mailboxsite4067203’
Processing action site.
At 15:33:49 +0800 - mailboxsite (htt//BFserver:52311/cgi-bin/bfgather.exe/mailboxsite4067203)
Relevant - Flush agent (fixlet:115690)
At 15:33:50 +0800 -
ActionLogMessage: (action:115690) Action signature verified for Execution
ActionLogMessage: (action:115690) starting action
At 15:33:51 +0800 - actionsite (htt//BFserver:52311/cgi-bin/bfgather.exe/actionsite)
Wow64 redirection disabled. action uses wow64 redirection false (action:115690)
Command started - waithidden cmd.exe /c net stop “healthservice” (action:115690)
At 15:33:53 +0800 - actionsite (htt//BFserver:52311/cgi-bin/bfgather.exe/actionsite)
Command succeeded (Exit Code=0) waithidden cmd.exe /c net stop “healthservice” (action:115690)
At 15:33:54 +0800 - actionsite (htt//BFserver:52311/cgi-bin/bfgather.exe/actionsite)
Command succeeded folder delete “C:\Program Files\Microsoft Monitoring Agent\Agent\Health Service State_old” (action:115690)
At 15:33:55 +0800 - actionsite (htt//BFserver:52311/cgi-bin/bfgather.exe/actionsite)
Command succeeded move “C:\Program Files\Microsoft Monitoring Agent\Agent\Health Service State” “C:\Program Files\Microsoft Monitoring Agent\Agent\Health Service State_old” (action:115690)
Command started - waithidden cmd.exe /c net start “healthservice” (action:115690)
At 15:33:57 +0800 - actionsite (htt//BFserver:52311/cgi-bin/bfgather.exe/actionsite)
Command succeeded (Exit Code=0) waithidden cmd.exe /c net start “healthservice” (action:115690)
At 15:33:57 +0800 -
ActionLogMessage: (action:115690) ending action
At 15:33:57 +0800 - mailboxsite (htt//BFserver:52311/cgi-bin/bfgather.exe/mailboxsite4067203)
Not Relevant - Flush agent (fixlet:115690)