Created
February 2, 2014 13:20
-
-
Save DamianFlynn/8768241 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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