question

GaryMiller-9555 avatar image
0 Votes"
GaryMiller-9555 asked XinGuo-MSFT edited

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

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.

msc-essentials
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

XinGuo-MSFT avatar image
0 Votes"
XinGuo-MSFT answered XinGuo-MSFT edited

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



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.