Skip to content

Instantly share code, notes, and snippets.

@DamianFlynn
Created February 2, 2014 13:20
Show Gist options
  • Select an option

  • Save DamianFlynn/8768241 to your computer and use it in GitHub Desktop.

Select an option

Save DamianFlynn/8768241 to your computer and use it in GitHub Desktop.
Function LooksAlive( )
Dim objWmiProvider
Dim objService
Dim strServiceState
set objWmiProvider = GetObject("winmgmts:/root/cimv2")
set objService = objWmiProvider.get("win32_service='FIMSynchronizationService'")
strServiceState = objService.state
If ucase(strServiceState) = "RUNNING"
then
LooksAlive = True
Else
LooksAlive = False
End If
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment