Geeks in Phoenix

Geek Blog


How to defragment and optimize your drive in Windows 11

When it comes to the performance of your Windows 11 computer, the faster your drive can read and write files, the better. So keeping your drive in tip-top shape is essential. So here is how to defragment and optimize your drive in Windows 11.

How to defragment and optimize your drive in Windows 11

Imagine opening a filing cabinet and finding someone mixed up all the files. It would take you more time to find the files you were looking right? The same thing holds true for your computer.

When I started working with computers, there were only a couple of storage options: Hard Disk Drives (HDD) and Floppy Disk Drives (FDD). And DOS and early versions of Windows were notorious for not writing files back to exactly where they were found, and this a how a drive gets fragmented.

So HDDs required regular defragmentation to maintain their performance. On the other hand, Solid State Drives (SSD) write files back to the same place they found them. The only maintenance SSDs require is free space consolidation.

And the built-in defragment/optimization program in Windows 11 can handle both HDDs and SSDs. In fact, there are two (2) versions of the defrag program. One has a GUI (Graphic User Interface), The other uses a Command Line Interface (CLI).

I like to refer to the different versions as Standard (GUI) and Advanced (CLI). The Standard version is simple to use but has limited features, and the Advanced version is a little harder to use but has more features.

The Standard way to defrag/optimize your drives in Windows 11

Using the GUI version of Defrag in Windows 11

To perform Standard defragment/optimization, you will need to open the Defragment and Optimize Drives program. Here are a couple of ways of opening the app.

  1. Left-click on the Start button Windows logo to bring up the Start menu.
  2. In the upper right-hand corner of the Start menu, left-click on All apps.
  3. Scroll down the list of programs and left-click on Windows Tools.
  4. Left-click on Defragment and Optimize Drives.

or

  1. Open File Explorer using one of the following:
    • Left-click on the File Explorer icon (manilla folder) on the Taskbar.
    • Press the Windows logo key Windows logo + E at the same time.
    • Use the Power User menu by right-clicking on the Start Windows logo button and selecting File Explorer.
  2. In the left-side column, left-click on This PC.
  3. In the right-side column, right-click on the drive you want to optimize and select Properties.
  4. Left-click on the Tools tab.
  5. Under Optimize and defragment drive, left-click on Optimize.

Once you have the Optimize Drives program open, just highlight the drive you want to optimize and select either Analyze or Optimize. You can also change the schedule that Windows 11 uses for scheduled optimization.

The Advanced way to defrag/optimize your drives in Windows 11

Using the CLI version of Defrag in Windows 11

To perform Advanced defragment/optimization, you will need to run command-line syntax(s) and parameter(s) in an Administrative Command Prompt. The link below opens in a new window.

How to open a Command Prompt with Administrator privileges in Windows 11

The name of the program you want to run is Defrag. There are multiple syntaxes and parameters you can use with Defrag. The complete list and a few examples are listed below. The correct usage of syntaxes and parameters are as follows:

Defrag <Volumes> <Operations> [<Options>]

Examples:

  • Defrag C: /U /V
  • Defrag C: D: /TierOptimize /MultiThread
  • Defrag C:\mountpoint /Analyze /U
  • Defrag /C /H /V
Volumes
/C | /AllVolumes On each volume run only the preferred operations from the given list of operations.
/E | /VolumesExcept <volume paths> Perform all the given operations on each volume except those specified. If the exception list is empty, this behaves as /AllVolumes.
volume paths Specifies the drive letter followed by a colon, mount point, or volume name. More than one volume can be specified. Run all the given operations on each specified volume.
Operations
/A | /Analyze Perform analysis.
/B | /BootOptimize Perform boot optimization to increase boot performance.
/D | /Defrag Perform traditional defrag (this is the default). On a tiered volume, traditional defrag is performed only on the Capacity tier.
/G | /TierOptimize On tiered volumes, optimize files to reside on the appropriate storage tier.
/K | /SlabConsolidate On thinly provisioned volumes, perform slab consolidation to increase slab usage efficiency.
/L | /Retrim On thinly provisioned volumes, perform retrim to release free slabs. On SSDs perform retrim to improve write performance.
/O | /Optimize Perform the proper optimization for each media type.
/T | /TrackProgress Track progress of a running operation for a given volume. An instance can show progress only for a single volume. To see progress for another volume launch another instance.
/U | /PrintProgress Print the progress of the operation on the screen.
/V | /Verbose Print verbose output containing the fragmentation statistics.
/X | /FreespaceConsolidate Perform free space consolidation, moves free space towards the end of the volume (even on thin provisioned volumes). On tiered volumes consolidation is performed only on the Capacity tier.
Options
/H | /NormalPriority Run the operation at normal priority (default is low).
/I | /MaxRuntime n Available only with TierOptimize. Tier optimization would run for at most n seconds on each volume.
/LayoutFile <file path> Available only with BootOptimize. This file contains the list of files to be optimized. The default location is %windir%\Prefetch\layout.ini.
/M | /MultiThread [n] Run the operation on each volume in parallel in the background. For TierOptimize, at most n threads optimize the storage tiers in parallel. Default value of n is 8. All other optimizations ignore n.
/OnlyPreferred When volumes are specified explicitly, defrag performs all the given operations on each specified volume. This switch lets defrag run only the preferred operations, from the given list of operations, on each specified volume.

How to check your drive for errors in Windows 11

When it comes to Windows 11, keeping your drives error-free is essential to the performance of your computer. Hard or slow to open files or apps could signify that the drive needs to be checked for errors. Here is how to check your drive for errors in Windows 11.

How to check your drive for errors in Windows 11

Now disk errors are not uncommon in Windows. In fact, the original name of MS-DOS (Microsoft Disk Operating System) was QDOS (Quick and Dirty Operating System).

There are two (2) different ways to check a drive for errors: Standard and Advanced. The Standard way is far easier to run, but the Advanced way is more comprehensive.

Standard drive error checking in Windows 11

Standard drive error checking in Windows 11

To perform a Standard drive check, you will need to access the properties of that drive. To do this, you will need to open File Explorer.

  1. Open File Explorer using one of the following:
    • Left-click on the File Explorer icon (manilla folder) on the Taskbar.
    • Press the Windows logo key Windows logo + E at the same time.
    • Use the Power User menu by right-clicking on the Start Windows logo button and selecting File Explorer.
  2. In the left-side column, left-click on This PC.
  3. In the right-side column, right-click on the drive you want to check and select Properties.
  4. Left-click on the Tools tab.
  5. Under Error checking, left-click on Check.
  6. Left-click on Scan drive.

Advanced drive error-checking in Windows 11

Advanced drive error checking in Windows 11

To perform Advanced error checking, you will need to run command-line syntax(s) and parameter(s) in an Administrative Command Prompt. The link below opens in a new window.

How to open a Command Prompt with Administrator privileges in Windows 11

The name of the program you want to run is CHKDSK (short for check disk). There are multiple syntaxes and parameters you can use with CHKDSK. The complete list is below.

Keep in mind that if to want to run CHKDSK on the drive with Windows on it, the error check may need to be scheduled for the next boot. But CHKDSK will prompt you if that is the case. The two command lines I use on a regularly are

CHKDSK (drive letter): /F CHKDSK (drive letter): /R

CHKDSK [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]] [/B] [/scan] [/spotfix]

volume Specifies the drive letter (followed by a colon), mount point, or volume name.
filename FAT/FAT32 only: Specifies the files to check for fragmentation.
/F Fixes errors on the disk.
/V On FAT/FAT32: Displays the full path and name of every file on the disk. On NTFS: Displays cleanup messages, if any.
/R Locates bad sectors and recovers readable information (implies /F, when /scan not specified).
/L:size NTFS only: Changes the log file size to the specified number of kilobytes. If a size is not specified, it displays the current size.
/X Forces the volume to dismount first if necessary. All opened handles to the volume would then be invalid (implies /F).
/I NTFS only: Performs a less vigorous check of index entries.
/C NTFS only: Skips checking of cycles within the folder structure.
/B NTFS only: Re-evaluates bad clusters on the volume (implies /R).
/scan NTFS only: Runs an online scan on the volume.
/forceofflinefix NTFS only: (Must be used with "/scan") Bypass all online repair; all defects found are queued for offline repair (i.e. "chkdsk /spotfix").
/perf NTFS only: (Must be used with "/scan") Uses more system resources to complete a scan as fast as possible. This may have a negative performance impact on other tasks running on the system.
/spotfix NTFS only: Runs spot-fixing on the volume.
/sdcleanup NTFS only: Garbage collects unneeded security descriptor data (implies /F).
/offlinescanandfix Runs an offline scan and fix on the volume.
/freeorphanedchains FAT/FAT32/exFAT only: Frees any orphaned cluster chains instead of recovering their contents.
/markclean FAT/FAT32/exFAT only: Marks the volume clean if no corruption was detected, even if /F was not specified.

How to manage Windows 11 Virtual Memory

Is your Windows 11 computer slow at switching between programs? Are you getting low memory warnings? If so, then you might need to change your Virtual Memory settings in Windows 11.

Most computer users know about RAM (Random Access Memory) and how the more you have, the better your system will run. But do you know what happens when your computer runs out of available RAM for programs?

That is where Virtual Memory (paging file) comes into the picture. Each program requires a certain amount of memory (RAM) to operate. When you have more programs running than available RAM, Windows will utilize the Virtual Memory.

If a program is inactive, Windows can transfer it to the Virtual Memory to free up RAM for other active programs. Then when you switch to that program, Windows will bring it back into the RAM and transfer another inactive program to the Virtual Memory, hence the name paging file.

But with the amount of RAM that computers come with nowadays, many people do not need to worry about Virtual Memory. But there are certain times when you can use to modify the Virtual Memory settings.

But if you are like me and have several programs running simultaneously, customizing the Virtual Memory's size and location can help your computer's performance.

With the release of Windows 11, Microsoft increased the minimum memory requirement from two (2) GB to four (4) GB. But just like Windows 10, the actual memory used when idle is around two (2) GB.

So that means when you have only four (4) GB of RAM, two (2) GB is dedicated to Windows 11. So right out of the gate, you have only 50% of available RAM, and when that is used up, the Virtual Memory kicks in.

So if your Windows 11 computer has between 4 and 8 GB of RAM, you could see your performance increase significantly by customizing your Virtual Memory. If your computer has 8 - 16 GB of RAM, you could get a boost in performance.

If your system has more than 16 GB of RAM, you may or may not see any change in performance. But you would have to modify the Virtual Memory settings and see how your system runs.

Note: Creating a substantial Virtual Memory (paging file) can take a lot of disk space. Also, having the Virtual Memory on an SSD (Solid State Drive) can shorten the drive's life, as Windows 11 is always reading and writing to the Virtual Memory.

Now, if your computer has more than one (1) drive, like most gaming systems, it is recommended to place the paging file on the drive that does not have the operating system.

The calculation for the Virtual Memory comes from early in the history of Windows, when RAM was measured in KB's (kilobyte), not MB's (megabytes) or GB's (gigabytes).

Windows 11 Paging File formula

  • 1024 x total amount of RAM = ?
  • ? x 1.5 = Initial paging file size
  • Initial paging file size x 3 = Maximum paging file size

Take 1024 and multiply it by the total amount of RAM your system has. For example, if your computer has 4 GB of RAM, you would take 1024 and multiply it by 4, which equals 4096. Then multiply 4096 by 1.5, which equals 6144. This is the initial paging file size. Then take 6144 and multiply it by 3, which equals 18432. This would be the maximum paging file size.

How to change the Virtual Memory in Windows 11

The Virtual Memory settings are located inside of the Advanced system settings. We can get there from the About sub-menu of the System category inside of the Settings app. There are several ways to get there.

  1. Left-click on the Start Windows logo key button to bring up the Start menu.
  2. In the list of pinned apps on the Start menu, left-click on Settings.
  3. Scroll down the right-hand column and left-click on About.

or

  1. Right-click on the Start button Windows logo to bring up the Power User menu.
  2. Left-click on System.

or

  1. Press the Windows logo key Windows logo key + X to bring up the Power User menu.
  2. Press the letter Y to select System.

or

  1. Press the Windows logo key Windows logo key + Pause.

Now you should have the Settings app open to the About sub-menu of the System category.

  1. Under Device specifications, make a note of how much installed RAM your computer has.
    The device specifications inside of Windows 11
    You will need this for the paging file calculation.
  2. Scroll down the right-hand column and left-click on the link labeled Advanced system settings.
    The Advanced system settings link inside of Windows 11
    The System Properties dialog box will appear.
  3. The Advanced tab should be active. If not, just left-click on it to bring it up.
  4. Left-click on the Settings ... button in the Performance section.
    The System Properties dialog box inside of Windows 11
  5. Left-click on the Advanced tab of the Performance Options dialog box.
    The Performance Options dialog box inside of Windows 11
  6. Left-click on the Change ... button inside of the Virtual memory section.

    The Virtual Memory dialog box inside of Windows 11
  7. Deselect the Automatically manage paging file size for all drives checkbox.
  8. Select the drive you want to manage the paging file on.
  9. Select Custom size and enter the initial size and maximum size using the calculation shown above.
  10. Left-click on the Set button.
  11. Left-click on the OK button.

Check out the video below for more information on setting up your paging file on a computer with multiple drives.

How to get to the Control Panel in Windows 11

Are you new to Windows 11 and having a hard time finding the Control Panel? Or do you prefer using the Control Panel over the Settings app? If so, here is how to get to the Control Panel inside of Windows 11.

How to get to the Control Panel in Windows 11

After using Windows for more than two decades, I have become accustomed to using the Control Panel to configure and customize Windows. But over the years, Microsoft has been trying to migrate all of the features from the Control Panel into the Settings app.

But I still prefer using the Control Panel for some things, like the Devices and Printers app, for one. I also like using the Programs and Features app for uninstalling programs.

Now just like Windows 10, finding the Control Panel in Windows 11 can be a little tricky. So here are all of the different ways to get to the Control Panel in Windows 11.

And for you die-hard Control Panel users, I also have included the instructions for creating a God Mode Control Panel shortcut at the end of this article.

How to get to the Control Panel in Windows 11

  1. Left-click on the Start Windows logo key button to bring up the Start menu.
  2. In the upper right-hand corner of the Start menu, left-click on All apps.
  3. Scroll down the list of programs and left-click on Windows Tools.
  4. Left-click on Control Panel.

or

  1. Left-click on the magnifying glass to the right of the Start Windows logo key button to bring up the Search dialog box.
  2. In the Search dialog box, type Control Panel.
  3. Left-click on Control Panel (App) in the search results.

or

  1. Open a Run dialog box by pressing the Windows logo key Windows logo key + R (click here for more ways to open a Run dialog box).
  2. Type in Control and then left-click on OK.

How to create a shortcut to the Control Panel on the Start menu or Taskbar in Windows 11

  1. Left-click on the magnifying glass to the right of the Start Windows logo key button to bring up the Search dialog box.
  2. In the Search dialog box, type Control Panel.
  3. Right-click on Control Panel (App) in the search results.
  4. From the context menu that appears, left-click on either Pin to Start or Pin to taskbar.

How to create a shortcut to the Control Panel on the Desktop in Windows 11

  1. Left-click on the Start Windows logo key button to bring up the Start menu.
  2. In the upper right-hand corner of the Start menu, left-click on All apps.
  3. Scroll down the list of programs and left-click on Windows Tools.
  4. Press and hold the left mouse button on the Control Panel and drag it to the Desktop.

How to create a Control Panel God Mode shortcut

Years ago, it was discovered that you could create a special shortcut that would display the complete contents of the Control Panel in a single folder view. It was called God Mode.

With the God Mode, everything inside the Control Panel (over two hundred items) is listed in alphabetical order. From Administrative Tools to Work Folders and everything in between.

God Mode works by using a registry key for the Control Panel. When you open a Control Panel God Mode shortcut, it displays the contents of that registry key.

When God Mode was first discovered, the shortcut you created had a label below the Control Panel icon. Now in Windows 11, this shortcut only displays a folder icon and has no title. It can be kind of confusing, so create this shortcut at your own risk. Here is how to create a God Mode shortcut to the Control Panel in Windows 11.

  1. Create a new folder where ever you would like the God Mode shortcut. I recommend making it on your Desktop.
  2. When prompted for a name for the new folder, copy and paste the following code.
    Control Panel.{ED7BA470-8E54-465E-825C-99712043E01C}
  3. Press Enter to finish creating the folder.

You will notice that the folder you just created has the Control Panel icon and no name. Double-clicking on the folder displays the complete contains of the Control Panel.

How to reset your network adapter in Windows 11

Are you having problems connecting to the Internet in Windows 11? Or maybe you are having issues with your local network connection. If so, you might need to reset your network adapter in Windows 11.

How to reset your network adapter in Windows 11

When it comes to the Internet, there can be several things that could be preventing you from making a connection. It could be as simple as a misconfigured firewall or a bad proxy.

But with Windows 11, a good portion of all network problems can be resolved by resetting the network adapter. And there are two (2) different ways of doing it; Simple and Advanced.

Now there are pros and cons to resetting your network adapter. If your computer is a member of a corporate domain or network, you may want to contact your administrator before resetting your network adapter. There could be some network settings that have to be manually entered in the network configuration.

Also, if you have a VPN (Virtual Private Network) or virtual appliance set up, resetting the network adapter might affect it. Resetting the network adapter can also reset the Windows Firewall.

The simple way to reset your network adapter in Windows 11

  1. Left-click on the Start button Windows logo to bring up the Start menu and select Settings in the pinned apps.
  2. In the left-hand column, left-click on the Network and internet category.
  3. In the right-hand column, left-click on Advanced network settings.
  4. In the right-hand column, left-click on Network reset.
  5. Left-click on Reset now. You will get a prompt asking you are sure you want to reset your network settings.
  6. Left-click on Yes, and your computer will restart within five (5) minutes.

or

  1. Right-click on the Start button Windows logo to bring up the Power User menu.
  2. Left-click on Settings.
  3. In the left-hand column, left-click on the Network and internet category.
  4. In the right-hand column, left-click on Advanced network settings.
  5. In the right-hand column, left-click on Network reset.
  6. Left-click on Reset now. You will get a prompt asking you are sure you want to reset your network settings.
  7. Left-click on Yes, and your computer will restart within five (5) minutes.

or

  1. Press the Windows logo key Windows logo key + X to bring up the Power User menu.
  2. Press the letter N to select Settings.
  3. In the left-hand column, left-click on the Network and internet category.
  4. In the right-hand column, left-click on Advanced network settings.
  5. In the right-hand column, left-click on Network reset.
  6. Left-click on Reset now. You will get a prompt asking you are sure you want to reset your network settings.
  7. Left-click on Yes, and your computer will restart within five (5) minutes.

or

  1. Press the Windows logo key Windows logo key + I to bring up Settings.
  2. In the left-hand column, left-click on the Network and internet category.
  3. In the right-hand column, left-click on Advanced network settings.
  4. In the right-hand column, left-click on Network reset.
  5. Left-click on Reset now. You will get a prompt asking you are sure you want to reset your network settings.
  6. Left-click on Yes, and your computer will restart within five (5) minutes.

The advanced way to reset your network adapter in Windows 11

Windows 11 has a command-line utility called Netsh (Network Shell) that allows you to display and modify your computer's network configuration. The most common use of Netsh is to reset the TCP/IP (Transmission Control Protocol / Internet Protocol) stack back to default. Since Netsh is a command-line tool, you will need to use a Command Prompt with Administrative privileges.

How to open a Command Prompt with Administrator privileges in Windows 11 (link will open in a separate window)

Netsh commands for resetting your network adapter in Windows 11

A Windows 11 administrative command prompt running Netsh commands

Note: This section is intended for advanced computer users. If you are not comfortable with advanced troubleshooting, ask someone for help. Follow these steps to reset the Windows Firewall, TCP/IP stack, and Winsock manually. You will have to restart your system to complete the reset.

The following is a list of the Netsh commands with descriptions that you can use to reset your network adapter in Windows 11:

netsh advfirewall reset

Restores the Windows Firewall with Advanced Security policy to the default policy. The current active policy can be optionally exported to a specified file. This command returns all settings to not configured and deletes all connection security and firewall rules in a Group Policy object.

netsh int ip reset

Removes all user-configured IPv4 (Internet Protocol version 4) settings. Restarting the computer is required before the default settings take effect.

netsh int ipv6 reset

Removes all user-configured IPv6 (Internet Protocol version 6) settings. Restarting the computer is required before the default settings take effect.

netsh winsock reset

Resets Winsock Catalog to a clean state. All Winsock Layered Service Providers, which were previously installed, must be reinstalled. This command does not affect Winsock Name Space Provider entries.

Free computer diagnostics

Repairing a PC can sometimes be expensive, and that is why we offer free basic in-shop diagnostics. Give one of our professional and experienced technicians a call at (602) 795-1111, and let's see what we can do for you.

Check out our reviews

Geeks In Phoenix LLC, BBB Business Review

Customer service is #1

Here at Geeks in Phoenix, we take pride in providing excellent customer service. We aim to give the highest quality of service  from computer repair, virus removal, and data recovery.

Bring your computer to us and save

Repairing a computer can be time-consuming. That is why we base our in-shop service on the time we work on your computer, not the time it takes for your computer to work! From running memory checking software to scanning for viruses, these are processes that can take some time.

Contact us

If you have any questions, please feel free to give us a call at (602) 795-1111  and talk with one of our Geeks. Or you can send us a message from our contact page contact page , and one of our Geeks will get back to you as soon as possible. Or you can stop by and see us. Here are our hours and location.

Like Geeks in Phoenix on Facebook

Follow Geeks in Phoenix on Twitter

Watch Geeks in Phoenix on YouTube