Monitor for unmounted drives after a reboot in Windows Server various version

Gary Miller 1 Reputation point
2022-05-04T21:52:48.53+00:00

Our IT has our Windows Patches Automated. But sometimes very infrequently we have a system reboot and one of the virtual drives does not get remounted. Our SAN gurus did not see any errors and the asked Microsoft about any known patches which there are none. So we would like to monitor for the unmounted drives after a reboot. We have been trying to look for a PowerShell utility to do this but haven't found anything yet. Drive Manager allows the drive to be remounted so the OS must know the drive is missing. Has anybody found a script to do this kind of monitoring.

Microsoft System Center
Microsoft System Center
A suite of Microsoft systems management products that offer solutions for managing datacenter resources, private clouds, and client devices.
823 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. XinGuo-MSFT 14,236 Reputation points
    2022-05-05T08:42:34.423+00:00

    Hi,

    If we use Microsoft System Center Operations Manager, we could create a Powershell based monitor to monitor the drives.

    $api = New-Object -comObject "MOM.ScriptAPI"  
    $PropertyBag = $api.CreatePropertyBag()  
      
    $drive = 'S:'  
    $drive_check = Test-Path -Path $drive  
      
    $PropertyBag.AddValue("DriveExist",$drive_check)  
    $PropertyBag  
    

    199134-scom-powershell-based-monitor01.png

    0 comments No comments