![]() ![]() ![]() Warning 2: Check disk numbers, partition numbers and volume letters carefully before executing commands. Check the link above and MSs documentation for diskpart, dism and reagentc. Warning 1: You must know what the following commands do before you execute them. # This script is distributed under the GPL v2 license. I have made it to work on my windows 10 PC. To check your hard drive for errors, open the elevated command prompt (as an administrator) and run the command: chkdsk E: /F /R. # check_mk has this privileges and therefore this script must only be copied to your check_mk/plugins directory and you are done. # diskpart requires administrative privileges so this script must be executed under an administrative account if it is executed standalone. This command will perform a hard drive health check, to see if your disk is failing. Once you’re at the command prompt screen, type in wmic diskdrive get status. # or using the new PowerShell API introduced with Windows 8 (wrong target system as our customer uses a Windows 7 architecture). Here’s how to do it: Open the Start menu and search for Command Prompt and right click the first option. This will run a test that looks similar to the chkdsk utility in Windows. # The nicer solution would be using WMI (which does not contain the RAID status in the Status field of Win32_DiskDrive, Win32_LogicalDisk or Win32_Volume for unknown reason) With the Disk Utility app open, select the HDD you wish to check, then click the 'First aid' tab. You cannot open any files on the specified drive until chkdsk finishes. # A simple PowerShell script for retrieving the RAID status of volumes with help of diskpart. To check the disk in drive D and have Windows fix errors, type: chkdsk d: /f If it encounters errors, chkdsk pauses and displays messages.Chkdsk finishes by displaying a report that lists the status of the disk. The "Fehlerfre" and "Fehlerhaf" in the script are German translations for result codes. I'm reproducing it here just in case the Gist goes away, like the target on the accepted answer Click 'Start' to check errors on your partition. In the Check File System window, check the 'Try to fix errors if found' option. Confirm if you want to hide the partition or not. I tested it on a Windows 10 software raid and a Dell PERC H700 hardware raid on Server 2016. Right-click the target partition that has a problem. Here is a Powershell script to monitor the health of RAID arrays on Windows from at
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |