Advanced commands for Windows

If you are on your journey to learning the commands available to the Windows users, check this article for advanced options which will give you some curious functionality.

Chkdsk

Chkdsk is one of the most used commands by the techs. This is literally means “Check disk”. This command tells the system to scan, detect and repair any issues with file system and fix errors and at least let us know what the problem is. As always, you have a bunch of switches with chkdsk as well.

We will look at the /f and /r. with the /f switch, you tell the system to fix any error in the file-system and related errors. The /r switch runs and locate any bad sectors of the drive and file system and repair them.

Running a chkdsk command is not much of a hassle though, you just simply run this command directly in the drive you wanna run this to. Something like C:> chkdsk /f /r.

Note that to successfully run a chkdsk, the command needs direct access to the drive. To break it down, the drive needs to be unlocked to successfully run this command. If you run the command and you see a message like “ cannot lock current drive”. This is basically telling you that another process has locked the driver and it is refraining the command from performing its operation. In this scenario you will get a full message like “The type of the file system is <TYPE>. Cannot lock the current drive”.

“chkdsk cannot run because the volume is in use by another process. Would you like to schedule this volume to be checked the next time the system restarts? < Y/ N>”

This is basically the option the Windows gives you so that it remembers and run the scan for you next time you boot up your computer. This is extremely convenient since you may forget to run the command again next time and Windows take care of this for your based on your decision.

As the name suggest, this checks the disk drives meaning all the mass storage device you have inside your system. This is extremely useful since it helps our system to maintain and look out for our disk health ( hard drives health) and either fix it or let us know that the hard drive may have been damaged or on the verge of losing its life span. This is just one example, there are more based on your drive’s health and then you can take the necessary action to save yourself from data loss and depression.

Gpresult

With the powerful command such as gpresult, you are able to get a quick overview of every security policy applied to a single user or the whole computer. You are allowed to run this command for any user or computer on your network and will give you the information you need based on your syntax. Let’s look at an example below C:\Users\Aladdin > gpresult /USER genie /R.

Running this command will show you the list with a bunch of information. Such as – a summary of the system information including your operating system configuration name, operating system version, if the user is registered to site, roaming profile, local profile and so on. Then you will see something like users settings and under this you will see Applied Group Policy Objects, which part of the security groups the user is and so on. As you see this highly useful in times of a quick overview of the policies than navigating your way around the GUI looking for these panels.