Hi All, I'm currently working on a project that can remotely monitor the offline status of Outlook that is running on a server.
Overview: I have a VM who's only function to to check and forward a specific email once a day. I need to know when the VM is down, Outlook is not running or Outlook is offline. I have been able to determine if the VM is down and if outlook is running but I'm struggling with the offline status Outlook.
Here is my code (straight foward)...vbscript
strComputer = "VMEmail"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2", "outlook.Application")
PD_VM_OTKSTATUS = objWMIService.Session.Offline
Wscript.Echo PD_VM_OTKSTATUS
I'm getting a error "File name or class not found during Automation operation: 'GetObject'" Code: 800A01B0
I want to run this script from my machine. If you know whats going on or a better way to solve my problem let me know I'm open to suggestions. Also I don't consider myself a programmer/coder I'm just able to take other code and make it work the way I want.
Thanks in advance