How-To Geek

How to use the diskpart utility to assign and remove drive letters.

4

Your changes have been saved

Email Is sent

Please verify your email address.

You’ve reached your account maximum for followed topics.

What to Do if Alexa Won’t Stop Farting

Psa: you can schedule your samsung galaxy phone to restart each week, i've been running ios 18 for 4 weeks: here's how it's going.

The Disk Management tool in Windows gives you an easy-to-use graphical interface to dealing with partitions and drive letters , but what if you want to just quickly change a drive letter on the command prompt? The diskpart utility makes it easy.

You'll need to start by opening an administrator mode command prompt -- type cmd into the search box, and then right-click and choose Run as administrator, or use the CTRL + SHIFT + ENTER keyboard shortcut.

diskpart assign drive letter using cmd

Once there, run the diskpart command, and then type in the following to list out the volumes on your system.

list volume

You'll want to note the volume number next to the drive that you want to change the letter of. In our case, that number is 3.

diskpart assign drive letter using cmd

Now we'll use the select volume command to tell diskpart to make changes to that volume. If your drive number is different, you'll want to replace the 3 with the number in your configuration.

select volume 3

You should see a message that the volume is now selected.

diskpart assign drive letter using cmd

At this point you can easily assign a new drive letter. Just type in this command, substituting R for the drive letter you'd like to use:

assign letter=R

Make sure to hit enter once you're done, of course.

diskpart assign drive letter using cmd

Once you've made that change, your drive should show up again as a new device, and be available for browsing immediately.

If you want to unassign a drive letter in order to hide the drive, you can also use the remove letter command in the same way. We wouldn't necessarily advise doing this, of course.

diskpart assign drive letter using cmd

Don't bother trying to change your C: drive, because that's not going to work.

  • Maintenance & Optimization
  • Command Prompt & PowerShell

Sign up for our daily newsletter

  • Privacy Policy
  • Advertise with Us

How to Remove and Assign Drive Letters in Windows with Diskpart

Vamsi Krishna

Diskpart is one of the most powerful Windows command line utilities which first appeared in Windows XP. Diskpart is mainly used by Windows administrators to manage tasks like partition management, formatting, creating, re-sizing and getting a detailed information regarding the hard disk or other removable disks attached to the computer. Even though you have a built-in GUI application called Disk Management utility in Windows, Diskpart is much more flexible and works well in a server environment where you need to set up some advanced features like RAID.

Note: This post isn’t intended for beginners, and doing something wrong while using Diskpart utility may cause drive failures and data losses, so make sure that you have a good backup before continuing. You have been warned.

Assign Drive Letter Using Diskpart

Assigning a new drive letter to a partition or removable device using Diskpart is really easy. First, search for the command prompt in the Start menu, right click on it and select the option “Run as administrator.” If you are using Windows 8, press “Win + X” to open the power user menu and select the option “Command Prompt (Admin).”

diskpart-launch-cmd-as-admin

The above action will open the command prompt window with administrative rights. Here enter the following command to start the Diskpart utility.

diskpart-cmd-diskpart

The next step is to list all the volumes in your computer so that you can clearly see all the volume numbers and drive letters of your hard disk partitions and any other removable devices. Use the command below to list all the volumes.

diskpart-list-volume

Once the Diskpart utility lists all the volumes, take a note of the volume number of the drive you want to assign a new drive letter. In my case, I’m trying to assign a new drive letter to the drive I:\ , so my volume number is 7 . Now execute the following command to select the volume while replacing the # symbol with an actual volume number.

diskpart-select-volume

Once the volume is selected, use the following command to assign a new drive letter. Don’t forget to replace the letter “V” with the drive letter you want to assign.

diskpart-assign-letter

That’s all there is to do; you have successfully changed or re-assigned a new drive letter to a partition or a removable drive in Windows. In fact, if you open the Windows explorer, you can see that the change is reflected immediately.

diskpart-drive-letter-changed

Remove Drive Letter using Diskpart

Before moving any further, removing or un-assigning drive letter will effectively hide the drive or partition from plain sight, i.e. you cannot see that drive in the Windows explorer. To remove a drive letter, follow the above steps 1 through 4 and then use the below command to remove the drive letter of a drive or partition. Don’t forget to replace the letter “I” with the actual drive letter.

diskpart-remove-letter

As soon as you have done that, Diskpart will remove the drive letter for that volume. If you list the volumes again, you will see that the drive you just interacted with will have no drive letter next to it.

diskpart-letter-removed

Moreover, if you navigate to the Windows explorer, you will see that the drive which got un-assigned isn’t listed anymore. But again, always be careful while you are messing around with Diskpart utility; it may cause irrecoverable data loss if used incorrectly.

Hopefully that helps, and do comment below if you face any problems while following the steps or to simply share your thoughts.

Our latest tutorials delivered straight to your inbox

Vamsi Krishna

Vamsi is a tech and WordPress geek who enjoys writing how-to guides and messing with his computer and software in general. When not writing for MTE, he writes for he shares tips, tricks, and lifehacks on his own blog Stugon.

Keep Windows Running With Lid Closed

How to use the command diskpart (with examples)

  • November 5, 2023

Diskpart is a command-line tool in Windows that allows users to manage disks, volumes, and partitions. It provides a set of commands that can be used to perform operations such as creating, formatting, and managing disks and volumes. This article will illustrate various use cases of the diskpart command.

Use Case 1: Running diskpart

Motivation: Running diskpart by itself in an administrative command prompt allows users to enter the diskpart command-line interface. This is the starting point for using diskpart and provides an interactive environment to execute the subsequent commands.

Explanation:

  • diskpart : This command is used to launch the diskpart tool.

Example Output:

Use Case 2: Listing all disks

Motivation: The list disk command is useful when you want to view a list of all the available disks on your system. This can be helpful when you need to identify the disks you want to perform operations on.

  • list disk : This command lists all disks detected by diskpart on the system.

Use Case 3: Selecting a volume

Motivation: The select volume command is used to choose a specific volume on a disk for further operations. By selecting a volume, you can narrow down the scope of the subsequent commands to work on a specific partition.

  • select volume : This command selects a volume by its volume number.
  • <volume number> : Replace this with the number of the volume you want to select.

Use Case 4: Assigning a drive letter to the selected volume

Motivation: When a volume is selected, the assign letter command can be used to assign a drive letter to the selected volume. This allows you to access the volume using the assigned letter in File Explorer or other applications.

  • assign letter : This command assigns a drive letter to the selected volume.
  • <drive letter> : Replace this with the desired letter you want to assign to the selected volume.

Use Case 5: Creating a new partition

Motivation: The create partition command is used to create a new partition on a selected disk. This is useful when you need to divide a disk into multiple partitions for better organization and data management.

  • create partition : This command creates a new partition on the selected disk.
  • primary : This parameter specifies that the new partition should be a primary partition.

Use Case 6: Activating the selected volume

Motivation: The active command is used to mark a volume as active. An active partition is required for the system to boot from that volume. This command is typically used on the system boot volume when managing multi-boot configurations.

  • active : This command marks the selected volume as active.

Use Case 7: Exiting diskpart

Motivation: Once you have completed the desired diskpart operations, the exit command is used to exit the diskpart command-line interface. This returns you to the regular command prompt.

  • exit : This command is used to exit the diskpart tool.

Conclusion:

The diskpart command-line tool provides a powerful set of commands for managing disks, volumes, and partitions in Windows. By understanding and utilizing the various use cases, users can efficiently perform disk-related operations to suit their needs.

Related Posts

How to use the command 'dunstctl' (with examples).

The dunstctl command is a control command for the dunst notification daemon.

How to use the command pnmcolormap (with examples)

  • Linux , Macos , Windows , Android

The pnmcolormap command is used to create a quantization color map for a PNM (Portable aNyMap) image.

How to use the command "mk" (with examples)

The “mk” command is a task runner that is primarily used to control the compilation of an executable from source code.

DiskPart.exe

Disk Administration, Partition a disk.

DiskPart can be used to automate disk-related tasks, such as creating volumes or converting disks to dynamic disks. Scripting these tasks is useful if you deploy Windows by using unattended Setup or the Sysprep tool, which do not support creating volumes other than the boot volume.

When using the DiskPart command as a part of a script, we recommend that you complete all of the diskpart operations together as part of a single diskpart script. To run consecutive diskpart scripts, allow at least 15 seconds between each script for a complete shutdown of the previous execution before running the DiskPart command again in successive scripts. Otherwise, the successive scripts might fail. Add a pause between consecutive DiskPart scripts by adding a TIMEOUT /t 15 command to the batch file.

When setting up a new drive, create in this order: Create Partition, Format drive, Assign drive letter.

When selecting a volume or partition, you can use either the number or drive letter or the mount point path.

The Windows GUI interface can also be used to assign a mount-point folder path to a drive. In Disk Manager , right-click the partition or volume, and click Change Drive Letter and Paths , then click Add and then type the path to an empty folder on an NTFS volume.

The Windows Recovery Console , includes a simplified DISKPART command. It only provides functionality for adding and deleting partitions, but not for setting an active partition.

Always back up the hard disk before running DiskPart.

The default SAN policy in Windows Server 2008 / R2 is now VDS_SP_OFFLINE_SHARED for all non boot SAN disks. This means that the disks will be offline at server startup (even if the drive contains a paging file).

This Disk Management error message indicates that the drive is offline:

"the disk is offline because of policy set by an administrator".

Query the current SAN policy to see if it is Offline Shared

DISKPART.EXE DISKPART> san SAN Policy : Offline Shared

To manually bring the disks online: Computer Management ➞ Storage ➞ Disk Management , right-click the disk and choose Online .

If these are not part of a cluster, than an alternative is to make a SAN policy change, select the offline disk, clear its readonly flag and bring it online:

“Divide et impera” ~ Latin saying (Divide and conquer)

Related commands

docs.microsoft.com - Configure UEFI/GPT-Based Hard Drive Partitions using Windows PE and DiskPart. docs.microsoft.com - Configure BIOS/MBR-Based Hard Disk Partitions using Windows PE and DiskPart. FORMAT - Format a disk. FSUTIL - File and Volume utilities. DISKSHADOW - Volume Shadow Copy Service. REAGENTC - Configure Windows Recovery Environment (Windows RE) and System Reset. SYSPREP - (Generalize) a Windows installation. PowerShell equivalents: clear-disk , get-disk, set-partition, get-volume Partition Wizard - GUI Disk Partition Manager. Equivalent bash command (Linux): fdisk - Partition table manipulator for Linux.

MiniTool

How to Change Drive Letter with CMD Windows 10

Diskpart is a command-line tool in Windows system that allows you to manage your disks and partitions. This post introduces how to change drive letter with CMD in Windows 10, namely, by using Diskpart CMD tool. MiniTool software provides users a free disk partition manager, data recovery software, system backup and restore software, etc.

If you want, you can change drive letter for a drive with CMD (Command Prompt) in Windows 10. This post includes detailed guides for how to use Diskpart command-line tool to change driver letter in CMD.

How to Change Drive Letter with CMD in Windows 10

Diskpart is a Windows built-in CMD tool that lets you easily manage hard drive and change drive letter. To change or assign drive letter in CMD, you can firstly open Diskpart utility in Command Prompt. Check the steps below.

Step 1. Open CMD in Windows 10

You can press Windows + R , type cmd , and press Ctrl + Shift + Enter to open elevated Command Prompt .

Step 2. Open Diskpart tool

In Command Prompt window, you can type diskpart command, and press Enter . This will open the Diskpart command-line utility.

Step 3. Change drive letter CMD

Next you can type the command line below to change drive letter in Command Prompt in Windows 10. Remember to press Enter after typing each command line.

  • list volume (this command will list all available volumes detected by your computer)
  • select volume * (replace “*” with the exact volume number of the target partition)
  • assign letter=* (replace “*” with the preferred drive letter like “F”)

Windows change drive letter

After you change or assign a drive letter for a drive or device, Windows will display the same letter automatically next time you reconnect the device to your computer.

If you want to remove the drive letter of a specific drive, you can type remove letter=* command and press Enter . Still, replace “*” with the exact drive letter of the target drive.

How to Change Drive Letter Using PowerShell

Some Windows 10 users might find that Command Prompt is missing from Win + X menu , and instead, it shows Windows PowerShell. Windows PowerShell can do most things that Command Prompt does. Alternatively, you can also use Windows PowerShell to change drive letter in Windows 10.

Step 1. Press Windows + X , and choose Windows PowerShell (Admin) to run Windows PowerShell utility as administrator.

Step 2. Next type get-disk command and press Enter to list all available drives the computer detected.

Step 3. Then you can type the command: Get-Partition -DiskNumber 1 | Set-Partition -NewDriveLetter F , and press Enter to assign a new drive letter. You should change “*” with the actual disk number of target drive, and replace “F” with the new drive letter you’d like to assign to the drive.

change drive letter PowerShell

MiniTool Partition Wizard – Professional Free Disk Partition Manager

Instead of using CMD or PowerShell to change drive letter for a drive in Windows 10, you can also utilize third-party free disk partition manager like MiniTool Partition Wizard to easily change drive letter and manage disk partitions on Windows 10.

MiniTool Partition Wizard let you easily create/delete/extend/resize/format/wipe partitions, convert partitions formats, migrate OS, clone disk, test hard drive speed , analyze hard drive space usage, check and fix disk errors , and more.

change drive letter with MiniTool Partition Wizard

By following the detailed guides above, you can easily change drive letter with CMD (Command Prompt), PowerShell or MiniTool Partitioon Wizard on Windows 10.

About The Author

Position: Columnist

  • QE for GAI Apps
  • AI-Powered QE
  •   - More AI-Powered QE Tools
  • AI Data Services
  • Continuous Automation
  •   - Explore Other Automation Services
  • Cloud Assurance
  •   - Cloud Hyperscalers
  • Data Assurance
  •   - More Data Services
  • Enterprise App Testing
  •   - ERP Services
  • Non-Functional Testing
  •   - More NFT Services
  • IoT/ Phygital Testing
  •   - More IoT/Phygital Testing Services
  • XR Assurance
  • Other ERP Packages
  • Test Automation
  • Performance Testing
  • Cyber Security Testing
  • ETL Testing
  • Multilingual NLP Assurance
  • Mobile App and Web Testing
  • IV&V and Regulatory Assurance
  • PoS Testing
  • Accessibility Testing
  • Service Virtualization
  • Software Testing Services
  • Mobile and Web Dev
  • DevOps Transformation
  • Serverless Cloud Native Development
  • Cloud Transformation and Migration Strategy
  • API Integration Services
  • Business AI
  • Modeling Optimization
  • Data Governance Services
  • Learning Platform Development
  • Video Encoding, Streaming and Player Development
  • Instructional Design
  • Content Remediation Services
  • Banking & Financial Services
  • Media & Entertainment
  • Retail & Consumer Goods
  • Manufacturing
  • Medical Devices
  • Capital Markets
  • Managed Testing Services
  • Managed Crowd Testing
  • Project-Based Testing
  • AI led Consulting
  • Global Delivery
  • Risk-Based Testing
  • Test.Predictor
  • Test.Consolidator
  • Keysight Technologies
  • Synthesized
  • White Papers
  • Case Studies
  • Podcast: The Testing Show
  • Technical Hub
  • Leadership Team
  • Diversity & Inclusion

How to assign a drive a letter using Diskpart

Industries top insights, delivered to your inbox.

Introduction:

Windows volume drive letters can be altered from the command line using Diskpart.

Requirements:

Access to the Windows command line.

From your taskbar, start a search for

Enter the command:

Example output:

but replace “2” with the desired volume number. Enter the command:

but replace the “q” with any desired letter that is not already being used by another volume.

More Information:

within  diskpart  for more information.

New call-to-action

Other Technical Hub

Introduction: CSV files, or comma-separated-files, are used for storing data. They are a very commonly used text file format. Requirements:…

Introduction: Most SQL tables are non-temporary. Temporary tables can be used as well for convenience, or special purposes. Requirements: An…

Introduction: Relational Databases using SQL (Structured Query Language) may have a need for certain operations to be performed, or triggered,…

Want to talk with a test automation expert?

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

  • 9 contributors
Applies to: Windows Server 2022, Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, and Windows Server 2008 R2, Windows Server 2008

The diskpart command interpreter helps you manage your computer's drives (disks, partitions, volumes, or virtual hard disks).

Before you can use diskpart commands, you must first list, and then select an object to give it focus. After an object has focus, any diskpart commands that you type will act on that object.

Determine focus

When you select an object, the focus remains on that object until you select a different object. For example, if the focus is set on disk 0 and you select volume 8 on disk 2, the focus shifts from disk 0 to disk 2, volume 8.

Some commands automatically change the focus. For example, when you create a new partition, the focus automatically switches to the new partition.

You can only give focus to a partition on the selected disk. After a partition has focus, the related volume (if any) also has focus. After a volume has focus, the related disk and partition also have focus if the volume maps to a single specific partition. If this isn't the case, focus on the disk and partition are lost.

To start the diskpart command interpreter, at the command prompt type:

You must be in your local Administrators group, or a group with similar permissions, to run diskpart.

You can run the following commands from the Diskpart command interpreter:

Command Description
Marks the disk's partition with focus, as active.
Mirrors the simple volume with focus to the specified disk.
Assigns a drive letter or mount point to the volume with focus.
Attaches (sometimes called mounts or surfaces) a virtual hard disk (VHD) so that it appears on the host computer as a local hard disk drive.
Displays, sets, or clears the attributes of a disk or volume.
Enables or disables the automount feature.
Breaks the mirrored volume with focus into two simple volumes.
Removes any and all partition or volume formatting from the disk with focus.
Reduces the physical size of a dynamically expanding virtual hard disk (VHD) file.
Converts file allocation table (FAT) and FAT32 volumes to the NTFS file system, leaving existing files and directories intact.
Creates a partition on a disk, a volume on one or more disks, or a virtual hard disk (VHD).
Deletes a partition or a volume.
Stops the selected virtual hard disk (VHD) from appearing as a local hard disk drive on the host computer.
Displays information about the selected disk, partition, volume, or virtual hard disk (VHD).
Exits the diskpart command interpreter.
Expands a virtual hard disk (VHD) to the size that you specify.
Extends the volume or partition with focus, along with its file system, into free (unallocated) space on a disk.
Displays information about the current file system of the volume with focus and lists the file systems that are supported for formatting the volume.
Formats a disk to accept files.
Assigns the gpt attribute(s) to the partition with focus on basic GUID partition table (gpt) disks.
Displays a list of the available commands or detailed help information on a specified command.
Imports a foreign disk group into the disk group of the local computer.
Marks the system partition or boot partition with focus as inactive on basic master boot record (MBR) disks.
Displays a list of disks, of partitions in a disk, of volumes in a disk, or of virtual hard disks (VHDs).
Merges a differencing virtual hard disk (VHD) with its corresponding parent VHD.
Takes an online disk or volume to the offline state.
Takes an offline disk or volume to the online state.
Refreshes the state of all disks in a disk group, attempt to recover disks in an invalid disk group, and resynchronizes mirrored volumes and RAID-5 volumes that have stale data.
Provides a way to add comments to a script.
Removes a drive letter or mount point from a volume.
Repairs the RAID-5 volume with focus by replacing the failed disk region with the specified dynamic disk.
Locates new disks that may have been added to the computer.
Prepares an existing dynamic simple volume to be used as a boot or system volume.
Displays or sets the storage area network (san) policy for the operating system.
Shifts the focus to a disk, partition, volume, or virtual hard disk (VHD).
Changes the partition type field for the partition with focus.
Reduces the size of the selected volume by the amount you specify.
Displays or sets the GUID partition table (GPT) identifier or master boot record (MBR) signature for the disk with focus.

Listing available objects

You can view a list of options associated to each command by running the main command followed by what is available to that specific command. Running list by itself will display the four parameters below:

Screenshot of the diskpart list command.

After you run the list command, an asterisk ( * ) appears next to the object of focus.

To see available disk(s), run list disk :

To select a disk, run select disk followed by the disk number. For example:

Screenshot of  diskpart showing available list command options.

Before disk 1 can be utilized, a partition will need to be created by running create partition primary :

Lastly, we can perform a quick format of disk 1 to NTFS with the label "Backup" by running format fs=ntfs label=Backup quick as seen below:

Screenshot of diskpart showing how to create a partition and formatting the drive.

Related links

Command-Line Syntax Key

Disk management overview

Storage Cmdlets in Windows PowerShell

Was this page helpful?

Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see: https://aka.ms/ContentUserFeedback .

Submit and view feedback for

Additional resources

diskpart assign drive letter using cmd

MTN Uganda and Microsoft Announce Strategic Partnership to Drive Digital Innovation

Mtn uganda has introduced the mtn wi-fi simu, a device combining business voice and internet services, mtn uganda unveils new wakanet internet offerings, catering to diverse connectivity needs, mtn uganda introduces a ticketing option on momo platform for event experiences, zero-rated shopping buy & sell on mtn uganda's tesa deals marketplace, tecno camon 30 series in uganda: specs, prices, features and availability, infinix note 40 series in kenya: here's everything you need to know, google, it's not me, it's you: a love-hate letter to rcs, tecno mobile launches flagship store in uganda, samsung galaxy a55 and a35: here's specs, pricing and availability in kenya, oraimo freepods lite review: best budget tws in 2024, aomais sport ii review: the perfect bluetooth speaker you never heard of, spotify takes aim at youtube music with limited music video rollout, kenya is the only african country represented, my complete guide to buying a portable bluetooth speaker: features to look out for, how to connect google home mini to new wifi network, m-pesa ratiba standing order service is your new bill management sidekick, understanding m-pesa paybill standard tariffs in kenya: a business owner's guide, mtn momo users can now access savings and loan service via *165*5# menu, here are the updated m-pesa transaction charges for 2024, how to pay engineers board of kenya subscription fee in 2024, using iphone as a webcam for mac mini - this worked, enable continuous recording to microsd card on wyze cams, firefox relay⁩ is your answer to spam mail and a messy inbox, google chrome gets ai features to help organise tabs, generate themes and write better, how to run windows programs or .exe files using wine on chromebook, mtn uganda to invest ugx4.5 billion in the second phase of mtn ace program to champion youth empowerment, tripesa unveils new tools and partnerships at pearl of africa expo, some internet service such as microsoft 356 and outlook are offline in middle east and africa, opera free vpn review: is it worth it, text like a pro on whatsapp: here are all text formatting shortcuts you should know, best budget smartwatch in kenya in 2024 under ksh 10k, samsung galaxy fit 3 vs huawei band 8 vs xiaomi smart band 8: which should you buy in 2024.

diskpart assign drive letter using cmd

  • Privacy Policy
  • Terms of Use

diskpart assign drive letter using cmd

How to Format a Drive Using Command Prompt and DiskPart

diskpart assign drive letter using cmd

Have you ever encountered a situation where you need to format a drive but the traditional methods seem to fail? Fear not, as in this guide, we will explore an alternative way to format a drive using Command Prompt and DiskPart. While it may sound intimidating, this method offers more control and flexibility, allowing you to perform advanced formatting options. So, let’s dive in and discover how to format a drive using these powerful command-line tools.

Understanding Command Prompt and DiskPart

Before we proceed with the formatting process, it’s essential to understand the tools we’ll be using. Command Prompt is a command-line interpreter that allows you to interact with your computer by typing commands. It provides a way to execute various tasks, such as managing files, running programs, and configuring system settings.

DiskPart, on the other hand, is a command-line disk partitioning utility that enables you to manage storage devices, including formatting drives, creating partitions, and assigning drive letters.

Related: How to format USB drive or Memory card on Chromebook

When using Command Prompt and DiskPart, it’s important to exercise caution as any incorrect commands or operations can lead to data loss. Make sure to double-check your commands and back up any important data before proceeding.

Now that we have a basic understanding of the tools involved, let’s move on to the next section to learn how to format a drive using Command Prompt and DiskPart.

Formatting a Drive Step-by-Step

Step 1: open command prompt.

To begin, open Command Prompt by pressing the Windows key + R, typing “cmd” in the Run dialog box, and hitting Enter. This will launch the Command Prompt window.

Step 2: Launch DiskPart

In the Command Prompt window, type “diskpart” and press Enter. This will start the DiskPart utility, and you’ll see a new prompt that says “DISKPART>” .

diskpart assign drive letter using cmd

Step 3: List Available Disks

Type “list disk” in the DiskPart prompt and press Enter. This command will display a list of all the disks connected to your computer.

diskpart assign drive letter using cmd

Related: How to Correctly Format a USB Drive for Your TV

Step 4: Select the Drive to Format

Identify the disk number of the drive you want to format from the list. For example, if you want to format disk 1, type “select disk 1” and press Enter. Be sure to select the correct drive(flash) by checking its storage, you can insert & re-insert to be sure.

diskpart assign drive letter using cmd

If you list again ( list disk ), it will have an asterisk before it; list disk

diskpart assign drive letter using cmd

Step 5: Clean the Drive

Once you’ve selected the disk to format, type “clean” and press Enter. This command will remove all partitions and volumes on the selected drive, effectively wiping its content.

diskpart assign drive letter using cmd

Step 6: Create a New Partition

Next, type “create partition primary” and press Enter. This command will create a new primary partition on the drive. This allows us to be able to store data or information on the drive.

diskpart assign drive letter using cmd

Step 7: Format the Partition

To format the newly created partition, type “format fs=ntfs” and press Enter. You can replace “ntfs” with “fat32” or any other desired file system, depending on your requirements. This will take some good time since we are not using the faster option;

Step 8: Assign a Drive Letter

To assign a drive letter to the formatted partition, type “assign letter=X” (replace “X” with your desired drive letter) and press Enter. This will make the drive accessible through the assigned letter in File Explorer.

Step 9: Exit DiskPart

Finally, to exit DiskPart, type “exit” and press Enter. You can now close the Command Prompt window.

Wrapping Up

Formatting a drive using Command Prompt and DiskPart may seem complex at first, but once you understand the process, it becomes a powerful tool for managing your storage devices. Remember to exercise caution and double-check your commands to avoid any unintended data loss. Do let us know in the command section if you have found this article helpful.

LIKE WHAT YOU ARE READING?

Sign up to our newsletter for expert advice and tips of how to get the most out of your tech gadgets.

Subscribing to our newsletter indicates your consent to our Terms of Use and Privacy Policy . You may unsubscribe from the newsletters at any time.

Related Stories

wedding gift registry

African Version of Meta AR/VR Hackathon Is Now Accepting Applications

Latest posts.

Microsoft MTN

  • Backup & Recovery
  • Hard Disk Manager
  • HFS+ for Windows
  • ExtFS for Windows
  • Disk Wiper Professional
  • Drive Copy Professional
  • Migrate OS to SSD
  • Paragon Alignment Tool Professional
  • NTFS for Mac
  • Hard Disk Manager for Mac
  • ExtFS for Mac

diskpart assign drive letter using cmd

Assign, change or remove Drive Letter with Diskpart

Diskpart is very powerful Windows Utility, which allows certain number of operation with hard disk. In this article we will show you how to assign, change or remove drive letter with Diskpart using.

Windows-10-x64-Original-2016-09-05-14-24-29

You bought hard drive for Backup, but it has automaticaly gained letter D . You want to change it to E . First we need to open Command Prompt with Administrator Rights.

Type cmd into the search box, and then right-click and choose Run as administrator. If you have Windows 10 use the CTRL + SHIFT + ENTER keyboard shortcut on Screen 1 , or click on Start with right click and choose Command Prompt (Admin) on Screen 2 .

cp001

When Command Prompt pops up, run the diskpart command.

run_dpt

Now we type list volume to list our volumes, we need to know the number of our volume.

list_vol

In our case our hard drive is Volume 3 and that number is 3 .

Now we use command select volume 3 to make changes to that volume. If your volume number is different, you need to replace number  3 with the number from your volume. After we have selected our volume we use command assign letter E , to assing letter E to our volume.

asn_let

Now you know how to change or assign another letter to your volume, also if you need you can remove volume letter with command remove letter E

rem_let

For security reasons you cannot change or remove your current system disk letter (esp C ), it will not work.

To exit diskpart type in exit .

exit

Enter your email and receive updates about special offers and exclusive content!

Connect with us for giveaways, exclusive promotions and last news!

diskpart assign drive letter using cmd

Create disk partitions in Windows using diskpart command

This tutorial will teach you how to create disk partitions in Windows using diskpart command. Apart from how to create disk partitions in Windows using diskpart, you can also delete partitions using the diskpart command in Windows. Diskpart is the default Windows systems command line disk partitioning utility.

Apart from creating Logical volumes and partitions with diskpart command. You can also repair corrupted external HDD and flash Drives.

Creating disk partitions in Windows using diskpart command

Without further ado, let’s dive in. Follow steps below to create disk partitions in Windows using diskpart command.

To run diskpart, press  Windows key + X keyboard shortcut. This will open the Power User menu, then select Command Prompt (Admin) .

3. List available disk drives using the command below:

To specify size, e.g 1 GB, use

7. Again list disk, partition and volumes created.

Deleting disk partitions in Windows using diskpart command

Use the exit  command to exit from the diskpart command line interface. To this end, you must have understood how to create disk partitions in Windows using diskpart command. More tutorials on Windows server Administration will come soon. Stay connected for latest guides and reviews.

YOU CAN SUPPORT OUR WORK WITH A CUP OF COFFEE

Related articles more from author, check disk usage on linux / macos with duf, format sd card, usb drive, flash drive on linux with parted, resize an ext2/3/4 and xfs linux root partition without lvm, how to install powershell core on ubuntu 18.04 lts, add extra hard disk to virtualbox vm and set automount, leave a reply cancel reply, recent posts, install lightweight kubernetes cluster using k3s, deploy kubernetes with ansible and kubespray, how to export and import docker images / containers, prevent users from creating projects in harbor registry, how to install envoy proxy on centos 7 / rhel 7, how to install and use podman on centos 8 / rhel..., how to install epel repository on rhel 8 or centos 8, setup docker container registry with podman & let’s encrypt ssl, more content, configure user password aging / expiry policy in linux, install apache cassandra on almalinux 8|oracle linux 8, how to install jekyll on debian 11 / debian 10, how to install mysql 8.0 on debian 12/11/10, install zipkin tracing system on ubuntu / debian / centos, installation of three node openstack queens cluster – part eight, how to install ejabberd xmpp server on centos 7 / rhel..., installing open vswitch on rocky 8 / almalinux 8, install and configure traefik ingress controller on k0s, how to install and use helm 3 on kubernetes cluster, best books to learn perl programming in 2024, learning nosql and mongodb databases using books, books to help you master apache solr in 2024, best lpic-1 and lpic-2 certification study books 2024, master haskell programming in 2024: top books for beginners & experts, top books to help you master web scraping in 2024, ace your cism certification fast: essential books (2024), here are the top apache and nginx reference books, best comptia cysa+ (cs0-002) certification study books 2024, top programming books for kids in 2024: fun and educational choices, best arduino and raspberry pi books for 2024, best books to learn spring boot development in 2024, new cisco security certifications (2024): best study book guide, top books to master html & html5 in 2024, what to read when learning tomcat|jboss|jetty web servers, books for learning magento e-commerce development in 2024, best certified scrum master preparation books 2024, ccna 200-301 exam top study books (2024), best books to learn internet of things (iot) in 2024, penetration testing books 2024: level up your skills, best microsoft sql server books for 2024, master css & css3 in 2024: top books for beginners &..., rhcsa and rhce preparation study books for 2024, best books to learn kafka and apache spark in 2024, financial technology (fintech) books to read in 2024, master pmp certification in 2024: top books for aspiring pms, best recommended seo books for 2024, best books for learning ci/cd pipelines in 2024, master regular expressions by reading the following books, books for learning wordpress development in 2024, editor picks, install kubernetes on rocky linux 8 using kubeadm, install docker and compose on centos 8 | rhel 8, install local openshift cluster 4.15 using crc, deploy openshift container platform 4.16 on kvm, install and run open edx tutor lms in docker containers, how to install openstack on debian 12 (bookworm), install flatcar container linux on vmware esxi / vcenter, deploy kubernetes cluster using vmware photon os, how to send wordpress notifications on email using gmail, popular posts, configure active directory (ad) authentication for harbor registry, popular category, best ccnp r&s certification preparation books 2024, c# and .net programming books you can read in 2024, 7 top git books to master git version control in 2024, recommended books to master kali linux penetration testing, master bash scripting in 2024: top books for beginners & experts.

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Diskpart script to assign driver letter and create 2 partitions

I'm currently deploying Windows XP (don't ask why) across a corporate environment and have a requirement to partition the disk during the unattended build. the disk must contain two partitions:

  • C: will store the OS and should fill the remainder of the disk
  • D: will be a partition for user data and should be 20GB

Diskpart is being used to prepare the disk for OS installation. WinPE appears to be assigning the DVD-ROM drive the letter D.

Firstly, I'm executing diskpart with the following command to re-assign the letter given to the DVD-ROM drive:

This appears to work as intended. Viewing the various volumes using Diskpart shows the DVD-ROM drive to be E:

The next diskpart script aims to create the two partitions mentioned above. Below are the commands I'm currently using:

The above command executes correctly but Windows XP fails to load. However when telling diskpart to create a single C: partition the OS loads fine. The image was captured using ImageX and was configured to only capture the contents of C. Because of this I do not believe the issue is in anyway related to how the image was captured.

Thanks in advance for any guidance offered.

JHamill's user avatar

  • "However when telling diskpart to create a single C: partition the OS loads fine." Then do that, and partition the disk once you've booted back into Windows... –  Breakthrough Commented Mar 21, 2013 at 19:19
  • Any reason why D is partition 1 and C is 2? Also, how about creating C and E (without reassigning the DVD drive) and if required swap the D and E drive letters later? –  Karan Commented Mar 21, 2013 at 19:21
  • @Breakthrough Good idea. I'll actually give that a go now. –  JHamill Commented Mar 21, 2013 at 19:25
  • @Karan no reason in particular. I'll tidy that up and give that a go also. –  JHamill Commented Mar 21, 2013 at 19:26

In addition to the suggestions by Breakthrough and Karan, you could use the Microsoft Deployment Toolkit (MDT) for your imaging and deployment needs. In the task sequence you create to deploy your OS, you can have MDT partition and format the hard drive, and set it to a percentage of the drive. For example, you can set Drive C to 80% of the available drive space and set drive D to the remaining 20% (100% of the remaining space after the first partition is created).

There are other benefits to using MDT for your deployments, such as installing software after the OS is deployed, managing device drivers and can be used for deploying Windows XP SP3, Windows Vista SP2, Windows 7, Windows 8 and Windows Server 2003 R2, Server 2008 SP2, 2008 R2, and 2012.

Here is a great video that shows how MDT can benefit you and your organization with imaging and deployments: Deployment Day Session 1: Introduction to MDT 2012

One final note, Windows XP End of Support is coming April 8, 2014. There will be no new hotfixes or patches developed for Windows XP after this date, which will leave your systems vulnerable to security risks. Read more about Windows XP EOS here .

Hope this helps

dwolters's user avatar

You must log in to answer this question.

Not the answer you're looking for browse other questions tagged windows-xp deployment diskpart ..

  • Featured on Meta
  • Announcing a change to the data-dump process
  • Upcoming initiatives on Stack Overflow and across the Stack Exchange network...
  • We spent a sprint addressing your requests — here’s how it went

Hot Network Questions

  • How well do universal rack rails work with vertical spacing?
  • Do tech companies like Microsoft & CrowdStrike face almost no legal liabilities for major disruptions?
  • Did projectiles start being rifled before barrels?
  • Questions Regarding Rational Egoism
  • What color would the sky be in a multi-star system?
  • Can you shed some light on this dust-shielding ferrule?
  • How to fill a loop?
  • Generalizations of Hamburger's Theorem
  • I'm 14 years old. Can I go to America without my parent?
  • I found a counterexample to an assumption in a proof but not to its result – how to publish this?
  • Unused Private Pension fund transfer to offspring
  • Swap the positions of the 4 chess knights
  • In exercise 8.23 of Nielsen and Chuang why is the quantum operation no longer trace-preserving?
  • How to set default foreground color in Bash shell?
  • Can you use Prime in order to treat businesses as nodes?
  • Libertinus Math with pdfLaTeX?
  • What are the best known asymptotic bounds on the size of the largest non-trivial subgroup of the symmetric group?
  • Does a crit fail on a Telekinetic Maneuver make you fall prone?
  • Rudimentary black jack game implementation
  • Is it rude to ask Phd student to give daily report?
  • How axioms of inner product ensure that an instantiation/realization capture notion of angle correctly?
  • Keeping dired minor modes on/off across buffers
  • Accelerating semidecision of halting problem
  • How to port Matlab/Python's multivariate FoxH implementation in Mathematica?

diskpart assign drive letter using cmd

Naveen Kapil – Blog

Blog by Naveen Kapil – System And Network Administrator

How to Use the Diskpart Utility to Assign and Remove Drive Letters

The Disk Management tool in Windows gives you an easy-to-use graphical interface to dealing with partitions and drive letters, but what if you want to just quickly change a drive letter on the command prompt? The diskpart utility makes it easy.

You’ll need to start by opening an administrator mode command prompt — type cmd into the search box, and then right-click and choose Run as administrator, or use the CTRL + SHIFT + ENTER keyboard shortcut.

Once there, run the diskpart command, and then type in the following to list out the volumes on your system.

list volume

You’ll want to note the volume number next to the drive that you want to change the letter of. In our case, that number is 3.

Now we’ll use the select volume command to tell diskpart to make changes to that volume. If your drive number is different, you’ll want to replace the 3 with the number in your configuration.

select volume 3

You should see a message that the volume is now selected.

At this point you can easily assign a new drive letter. Just type in this command, substituting R for the drive letter you’d like to use:

assign letter=R

Make sure to hit enter once you’re done, of course.

Once you’ve made that change, your drive should show up again as a new device, and be available for browsing immediately.

If you want to unassign a drive letter in order to hide the drive, you can also use the remove letter command in the same way. We wouldn’t necessarily advise doing this, of course.

Don’t bother trying to change your C: drive, because that’s not going to work.

Share this:

Leave a reply cancel reply.

Your email address will not be published. Required fields are marked *

Notify me of follow-up comments by email.

Notify me of new posts by email.

This site uses Akismet to reduce spam. Learn how your comment data is processed .

MiniTool

  • Disk & Data Manager
  • Partition Wizard
  • Power Data Recovery
  • ShadowMaker
  • Media Toolkit
  • uTube Downloader
  • Video Converter
  • Download Partition Wizard Free Edition: Download Pro Edition: Try Demo Server Edition: Try Demo

Diskpart Unassign Drive Letter in Windows 11/10 [Full Guide]

Diskpart is a well-known Windows built-in disk partition utility used to format /create/delete partitions,  online/offline disk , wipe disks, etc. However, a lot of users are unclear about how to use this utility. For example, here a user posted a question about how to change drive letter diskpart on the answers.microsoft.com forum:

Is there a way to unassign drive letter diskpart? Windows will not assign a drive letter automatically when I inserted a Windows installation media. https://answers.microsoft.com/en-us/windows/forum/all/manually-assigning-a-drive-letter-using/bbb3baf6-cda4-4d06-b431-eae9e975a5c7

How to Unassign Drive Letter Diskpart in Windows 11/10

A drive letter is a single alphabetic character from A to Z assigned by Windows to a drive or partition connected to the computer. Sometimes, you may need to change drive letter diskpart in some situations. How to let diskpart unassign letter in Windows 11/10? Here are detailed steps:

If you remove the drive letter from a partition, it will no longer show as a drive in  File Explorer  and the unassigned drive letter can be available to other partitions.

Step 1.  Press  Win + R  keys to open the  Run  dialog box, and then type  diskpart  in it and press  Enter . Then click on  Yes  to open the tool in Command Prompt.

type diskpart in the Run box

Step 2. To let diskpart unassign drive letter, type the following commands in order and press Enter after each one.

  • list volume
  • select volume * (replace * with the partition number you want to remove its drive letter from)
  • remove letter=K (replace K with the drive letter that you want to remove)

remove drive letter

The process of diskpart assign letter is very simple and similar to removing a drive letter. To assign drive letter diskpart, you can open the Command Prompt window again as we explained above, type the following commands in order and press Enter after each one.

  • select volume 10
  • assign letter=k

diskpart assign drive letter

Although Diskpart is a practical partition manager in Windows, sometimes this utility can run into various errors such as “ DiskPart failed to clear disk attributes ”, “ Diskpart virtual disk service error ”, “failed to assign a drive letter”, etc. Is there an alternative to diskpart unassign drive letter? Of course, yes! Let’s keep reading.

Best Alternative to Diskpart Remove Drive Letter

If you can’t change drive letter CMD or Diskpart, MiniTool Partition Wizard is the best alternative. It is a trustworthy and comprehensive partition manager that allows you to change drive letters easily. Besides, this partition software can be used to extend/resize/hide/copy/format partitions, migrate OS , convert FTA to NTFS without data loss , change cluster size, recover lost data , and more.

MiniTool Partition Wizard Free Click to Download 100% Clean & Safe

Step 1. Launch the program to enter its main interface, right-click the partition, and select Change Letter from the pop-up menu.

diskpart assign drive letter

Step 2. If you want to remove the drive letter, select None from the New Drive Letter drop-down menu and click on OK to save the change. Alternatively, you can select a new drive letter from the drop-down menu to assign a drive letter for the partition.

Step 3. Click on Apply to execute the change.

unassign drive letter using MiniTool

If you just want to hide the partition in File Explorer rather than remove the drive letter, you can select the partition and click Hide Partition > Apply from the left action panel.

select Hide Partition using MiniTool

How to make diskpart remove drive letter in Windows 11/10? All detailed steps have been illustrated. Now, you can change drive letter using diskpart/CMD. If it doesn’t work, you can use a better alternative – MiniTool Partition Wizard.

About The Author

Ariel

Position: Columnist

User Comments :

How to fix storage drive not showing on File Explorer on Windows 11

When one of the drives doesn't appear in File Explorer, you can try these troubleshooting steps on Windows 11 to resolve the issue.

Windows 11 Storage settings

  • Connection checks
  • Device Manager
  • Disk Management
  • Settings app
  • Driver update
  • Command Prompt

On Windows 11 , the system can automatically recognize and set up most storage drives, including hard disk drives (HDD), solid-state drives (SSD), and external USB hard drives (as well as flash drives). However, if the hard drive doesn't show on File Explorer, you will have to perform different troubleshooting steps to resolve the issue.

For instance, if File Explorer fails to list one of the hard drives, it could be a physical connection problem or missing configuration. You could be trying to set up a drive from another device, and depending on the configuration, it may not appear on your computer. The partition could have gotten corrupted, or it was never configured in the first place. 

Whatever the issue might be, Windows 11 provides the tools to troubleshoot virtually any problem to make the drive accessible through the Settings app, Disk Management, Device Manager, and Command Prompt.

In this how-to guide ,  I will walk you through the steps to troubleshoot and fix (most) problems causing File Explorer not to show a specific hard drive on Windows 11.

How to fix missing storage on File Explorer via physical troubleshooting

The system may not be able to show a particular drive on File Explorer for many reasons, and before you start changing settings, it's recommended to check the physical connection with the storage:

  • Check the storage is correctly connected to the device and receiving power.
  • If this is an external USB hard drive, disconnect it and try a different USB port. For example, if the drive is connected using a port in the back, try the USB ports in the front of the computer case. If you use a USB hub, connect the drive directly to the machine, as the issue could be the hub not supplying the correct amount of power or another problem.
  • If it is an internal hard drive, ensure the data and power cables (if applicable) are securely connected to the drive, motherboard, and power supply. Before getting your hands inside the case, power off and unplug the computer.
  • Connect the hard drive to another machine to check whether the problem is the hard drive or the computer.
  • Access the computer's Unified Extensible Firmware Interface (UEFI) and ensure the firmware detects the storage. The motherboard firmware can be different per manufacturer and even per device model. As such, check the manufacturer support website for more specific instructions.

After checking for physical problems, you can proceed to fix the most common problem preventing File Explorer from showing a hard drive on Windows 11. 

How to fix missing storage on File Explorer via Device Manager

It doesn't happen often, but the hard drive could be disabled, which can be quickly resolved using Device Manager.

Get the Windows Central Newsletter

All the latest news, reviews, and guides for Windows and Xbox diehards.

To enable a storage drive from Device Manager, use these steps:

  • Open  Start .
  • Search for  Device Manager  and click the top result to open the app.
  • Expand the  Disk drives  branch.
  • Right-click the hard drive in question and select the  Properties  option.

Device Manager drive properties

  • Click the  Driver  tab.
  • Click the  Enable Device  button.

Windows 11 enable drive

  • Click the  OK  button.

After completing the steps, the drive should appear on File Explorer.

How to fix missing storage on File Explorer via Disk Management

On virtually any version of Windows, some requirements need to be met for a drive to appear on File Explorer. First, the storage must be online and initialized. Also, it has to have a partition and a drive letter assigned, or it should be mounted as a folder.

If you have to configure the hard drive, you can do this from the Disk Management app.

Change drive to online

To bring the drive online on Windows 11, use these steps: 

  • Search for  Disk Management  and click the top result to open the app.
  • Right-click the disk with the "Offline label" and select the  Online  option.

Disk Management bring drive online

Once you complete the steps, the drive and data should now be accessible from File Explorer. 

In the case that the storage was offline and never configured, continue with the steps below to initialize it.

Initialize new drive

To initialize a hard drive on Windows 11, use these steps:

  • Right-click the disk with the "Unknown" label and select the  Initialize Disk  option.

Dis Management Initialize Disk

  • Check the drive to initialize under the "Select disks" section.
  • Select the  "GPT (GUID Partition Table)"  option.

Disk Management GPT

After completing the steps, this process will wipe out the drive's contents and prepare it to be formatted if the drive was never initialized.

Configure drive letter

When the hard drive is online and initialized and does not appear in the system, it could be for two reasons: the storage device does not include a drive letter, or if it was configured to another computer, the system may be trying to assign the same drive letter already assigned to another device.

To assign a drive letter on Windows 11, use these steps:

  • Right-click the partition on the hard drive without a drive letter and select the  "Change Drive Letter and Paths"  option.

Change Drive Letter and Paths

  • Click the  Add  button.
  • Select the  "Assign the following driver letter"  option.
  • Choose the drive letter.

Assign the following driver letter

After you complete the steps, the data should now be accessible on Windows 11.

Configure new partition

If the drive is online and initialized, it may not have a partition. You can resolve this issue by creating and formatting a partition and assigning a letter. 

To configure a hard drive to appear on File Explorer, use these steps:

  • Right-click the partition on the drive and select the  "New Simple Volume"  option.

New Simple Volume

  • Click the  Next  button.
  • Click the  Next  button to use the space for the partition, or specify the size using the  "Simple volume size in MB"  option.

Simple volume size in MB

  • Select the  "Format this volume with the following settings"  option.
  • Choose the  NTFS  option from the "File system" setting.
  • Select the  Default  option from the "Allocation unit" setting.
  • In the "Volume label" field, confirm a descriptive name for the drive.
  • Check the  "Perform a quick format"  option.

Format this volume with the following settings

  • Click the  Finish  button.

Once you complete the steps, the hard drive should be accessible from File Explorer on Windows 11.

How to fix missing storage on File Explorer via Settings app

The "Disks & Volumes" settings page works similarly to the "Disk Management" app. The difference is that the modern version of the experience doesn't have every option, as the legacy version and workflow are slightly different.

To initialize a hard drive through the Settings app, use these steps:

  • Open Settings .
  • Click on System .
  • Click the Storage page on the right side.
  • Click "Advanced storage settings" under the "Storage management" section.
  • Click on Disks & Volumes .

Disks & Volumes

  • Click the Initialize button on the drive.

Windows 11 Settings initialize

  • Choose the "GPT (GUID Partition Table)" option.
  • Click the Initialize button.

Initialize drive from Settings

After you complete the steps, this action will delete everything from the drive and make the storage ready to store a new partition.

Create new partition

To create a new partition on the drive, use these steps:

  • Click on the drive to configure.
  • Choose the "Create Simple Volume" option from the unallocated space.

Create Simple Volume

  • Confirm a name for the drive in the "Label" setting.
  • Choose the drive letter from the "Drive Letter" setting.
  • Select the NTFS option from the "File System" setting.

Windows 11 settings volume configuration

  • Continue with the default settings to use the entire drive to create the partition.
  • Click the Format button.

Once you complete the steps, the drive should appear on File Explorer.

You can only bring the drive online if the device was previously configured on the same computer. 

To bring a drive online from the Settings app, use the following steps:

  • Click the Properties button for the drive to bring online.

Open drive properties

  • Click the Bring online button under the "Status" section.

Bring drive online

After you complete the steps, the hard drive should be accessible from the "This PC" page on File Explorer.

To assign a drive letter to a drive to make the storage available on Windows 11, use these steps:

  • Click the Properties button for the partition (not the drive).

Open partition properties

  • Click the "Change drive letter" button.

Change drive letter

  • Select the drive letter to make the storage accessible.
  • Click the OK button.

Disk volume add drive letter

Once you complete the steps, the computer's drive data should be accessible using File Explorer.

How to fix missing storage on File Explorer via driver update

If the problem is related to a device driver, you should reinstall or update the driver to the latest version to resolve the issue.

Reinstall storage driver

To reinstall the storage driver on Windows 11, use these steps:

  • Right-click the hard drive in question and select the  Uninstall device  option.

Uninstall HDD driver

  • Click the  Uninstall  button.
  • Restart the computer

Once you complete the steps, the system should reinstall the driver automatically, and you should now be able to access the data on the drive from File Explorer.

Update storage driver

To update the storage driver, use these steps:

  • Click on Windows Update .
  • Click the Advanced options page on the right side.

Advanced options

  • Click the Optional updates settings from the "Additional options" section.

Optional updates

  • Choose the driver update (if applicable).
  • Click the Download & install button.

After you complete the steps, the driver will download and install it on the computer to make the storage accessible.

It's important to note that it could also be a problem with storage firmware. If so, you must check your manufacturer support website to download their tool to update the hard drive. (This is only recommended if a known issue and a new firmware update becomes available to resolve the problem.)

How to fix missing storage on File Explorer via Command Prompt

If, after trying the above recommendations, it's still not possible to access the storage, you can use the DiskPart command tool to completely clean the drive.

To use DiskPart with Command Prompt to clean a drive, use these steps:

  • Search for  Command Prompt , right-click the top result, and select the  Run as administrator  option.
  • Type the following command to start diskpart and press  Enter :  diskpart
  • Type the following command to list the available disks and press  Enter :  list disk
  • Type the following command to select the drive not showing up in File Explorer and press  Enter :  select disk 1
  • In the command, select the correct drive. Otherwise, you may end up deleting the data in the wrong partition.
  • Type the following command to everything erase the drive and press  Enter :  clean

DiskPart clean drive

  • Warning:  The command will delete everything, including data, partition, type, and the drive will appear blank with the label unknown and not initialized.
  • Type the following command to create a partition using the available space and press  Enter :  create partition primary
  • Type the following command to select the newly created partition and press  Enter :  select partition 1
  • Type the following command to set the partition as active and press  Enter :  active
  • Type the following command to format the partition and press  Enter :  format FS=NTFS
  • Type the following command to assign a drive letter and press  Enter :  assign letter=D

DiskPart create partition

In the command, change "D" for another drive letter not already in use.

  • Type the following command to close diskpart and press  Enter : exit

Once you complete the steps, the drive will be formatted with the specified settings, and it should now appear in File Explorer and across applications.

More resources

For more helpful articles, coverage, and answers to common questions about Windows 10 and Windows 11, visit the following resources: 

  • Windows 11 on Windows Central — All you need to know
  • Windows 10 on Windows Central — All you need to know

Mauro Huculak is technical writer for WindowsCentral.com. His primary focus is to write comprehensive how-tos to help users get the most out of Windows 10 and its many related technologies. He has an IT background with professional certifications from Microsoft, Cisco, and CompTIA, and he's a recognized member of the Microsoft MVP community.

  • 2 Everyone asked how I edit my videos, and I actually use the best-kept secret Microsoft app (and it's free!)
  • 3 Microsoft veteran software engineer explains the development of the Start menu as a Windows 95 feature before it turned into a Windows 11 'billboard'
  • 4 EA Sports College Football 25 soars to #3 on Xbox US daily active users, #4 on PS5, as the game fans waited 11 years for launches worldwide
  • 5 "Not now sweetie, Mummy's making CrowdStrike memes" — a compilation of the finest jokes the internet has created amongst crippling digital chaos

diskpart assign drive letter using cmd

More Recovery Products

  •   Partition Manager     Partition Master Personal disk manager   Partition Master Enterprise Business disk optimizer   Edition Comparison Partition Master Versions Comparison   Disk Copy Hard drive cloning utility Partition Master Free Partition Master Pro

Centralized Solutions

MSPs Service

Screen Capture

Video & Audio Tools

Transfer Products

File Management

iOS Utilities

More Products

  • Support     Support Center Guides, License, Contact   Download Download installer   Chat Support Chat with a Technician   Pre-Sales Inquiry Chat with a Sales Rep   Premium Service Solve fast and more

How to Zero Fill Hard Drive Using CMD - Step by Step Guide

diskpart assign drive letter using cmd

Sherly updated on Jul 16, 2024 | Home > Computer Instruction

When erasing sensitive data before disposing or repurposing a hard drive, users can utilize the zero-filling method. With the help of this solution, all the data on the drive is overwritten with zeros to make it impossible to recover any information previously stored on the drive. EaseUS Software will provide you with a step by step guide on it.

To carry out this disk management solution, you need to utilize the Command Prompt in Windows. While using CMD to zero-fill a hard drive, you will require a good understanding of command-line operations, which raises challenges for beginners. Therefore, users without technical skills should look for zero-fill hard drive CMD alternatives.

EaseUS Partition Master stands out as one such software that offers a more straightforward option to securely erase data without the need for complex commands. Throughout this article, we will familiarize you with the functionalities of this tool and teach you how to zero fill the hard drive using different methods.

Use the Safe Alternative to Command Prompt

As we have discussed, zero-filling a hard drive using CMD can prove to be a complex task for beginners. So, they need to use third-party software, such as EaseUS Partition Master Professional , to wipe all of their data from hard drives securely. Using this offline tool, you can completely format a hard drive or wipe out its partition to remove every single file of data before selling the computer.

 Windows 11/10/8/7  100% Secure

Benefits of Using EaseUS Partition Master

  • As an alternative to the " zero fill hard drive CMD " method, it provides a clearly guided interface to help beginners format their disks.
  • This tool supports all the Windows versions, including Windows 11, 10, and XP, to help the vast user base benefit from its features.
  • Other than wiping out your disks, this tool allows you to create, extend, or resize the disk partitions.

Here is how to use it:

We've set two options for you to wipe data. Choose the one you need.

Option 1.  Wipe Partition

  • Right-click the partition you want to erase data from, and choose "Wipe".
  • In the new window, set the time for which you want to wipe your partition, then click "OK".
  • Click the "Execute 1 Task(s)" button in the lower right corner, check the changes, then click "Apply".

Option 2. Wipe Disk

  • Select the HDD/SSD. And right-click to choose "Wipe Disk".
  • Set the number of times to wipe data. (You can set to 10 at most.) Then Click "OK".
  • Click "Execute 1 Task(s)" and then click "Apply".

Besides that, this tool has the "Undo" functionality to prevent data loss in case you accidentally wipe out your hard drive. Moreover, users can even delete all the partitions from the external drives, SSDs, and USBs within a few clicks without writing any code. All in all, it emerges as the most secure and fastest solution for users who want to wipe out their hard drives completely.

How to Zero Fill Hard Drive via Command Prompt?

Users who have the technical knowledge to write and execute complex commands can utilize this method to wipe out partitions using CMD . Before carrying out the formatting process with this method, we recommend you back up your data for safety purposes in case you fail to execute the command correctly. Moreover, you must be careful while writing the commands and ensure you proofread them before hitting the "Enter" key.

Now, you are familiar with all the challenges you may face while zero-filling a hard drive using CMD. So, it is time to familiarize you with the detailed instructions on formatting your partitions with the help of the Command Prompt.

Step 1. To begin this zero-filling task, press the "Windows + R" keys simultaneously to open the "Run" dialog box. Afterward, enter "cmd" in the "Open" field and press the "Ctrl + Shift + Enter" combination to initiate the process of wiping out partitions.

Step 2. Once you enter this Command Prompt application, write a new command according to the "format X: /fs:NTFS /p:1" format.

  • Here, X will represent the letter of the drive present in your hard disk.
  • Moreover, NTFS is a file system you can identify within the "Properties" dialog box through the "This PC" folder.
  • On the other hand, "p:1" shows that this process will write zeros to your hard drive only once. You can assign a bigger number to add zeros to the disk more times.

Step 3. Upon executing this command, a warning message will appear, after which you will need to enter the "y" command to confirm the operation. Moving forward, you have to wait a bit as this formatting task will take some time to complete.

zero fill a hard drive cmd

Step 4. After this process is completed, assign a name to your hard drive as a volume label. Alternatively, skip assigning the name and simply press "Enter" to process. Now, wait until the "Creating file system structures" appears on your screen and execute the "exit" command to complete this task.

Upon formatting your partitions using the "zero fill hard drive CMD" method, we recommend sharing this article in your circle to help others effectively manage their hard drive data.

You can write zero into a hard drive or wipe a disk using CMD . However,  zero-filling a hard drive using CMD can prove to be difficult and time-consuming for most of users. Utilizing this method, you need to be very careful, as most beginners make mistakes while writing command lines. To avoid all such problems, users should go for third-party tools, such as EaseUS Partition Master.

With the help of this software, you get an optimized solution fit for beginners, as they can format hard drives within a few clicks. So, get your hands on this hard disk manager to wipe out every format individually and delete every single personal data file.

Zero Fill Hard Drive Using CMD FAQs

Once you read this article, you will become familiar with the two methods for zero-filling hard drives for data removal. Users who still have questions related to the functionalities of these methods can review the answers explained below.

1. What is a zero-fill hard disk?

When talking about data erasure methods, zero-filling a hard drive stands out as a technique to overwrite all data on a storage device by writing zeros (0s) across its entirety. Also known as the one-pass zeros erase method, it allows you to wipe out each partition or drive present within your hard disk. Moreover, this method is a secure way to erase data from various devices and drives permanently.

2. How to clear a hard drive using CMD?

To clean a hard drive using the Command Prompt, you can utilize the diskpart functionality using the below instructions.

  • 1. First, users have to enter the Command Prompt application to execute the "diskpart" command to launch this feature for hard disk clearance.
  • 2. Moving forward, type "list disk" and press the "Enter" key to reveal all the disks present within your system. Now, execute the "select disk n" command to pick the disk you want to clear with the help of the Command Prompt.
  • 3. Finally, write and run the "Clean" command after selecting the disk to clear all the data within the hard disk.

3. When should users write zero on their hard disk?

You should consider writing zeros to your hard disk when you must securely erase all stored files. As this method effectively removes all traces of previous data, it proves to be valuable while selling, donating, or recycling your computer. Moreover, it ensures that sensitive information cannot be recovered with standard data recovery methods.

Was This Page Helpful?

diskpart assign drive letter using cmd

Updated by Sherly 

Sherly joined EaseUS in 2022 and she has always loved writing articles and enjoys the fun they bring. She receives professional training here, focusing on product performance and other relative knowledge. She has written over 200 articles to help people overcome computing issues.

Read full bio

Related Articles

How to Fix DRIVER_IRQL_NOT_LESS_OR_EQUAL Error | 10 Ways on Windows 11/10

author icon

How to Fix a Software Update Is Required to Use This Startup Disk

author icon

How to Safely Format Toshiba Hard Drive for Mac with a few Clicks

author icon

8 Ways to Fix Windows 10 Error Code 0xC000000F in 2024

author icon

EaseUS Data Recovery Services

Request a free evaluation >>

EaseUS data recovery experts have uneaqualed expertise to repair disks/systems and salvage data from all devices like RAID, HDD, SSD, USB, etc.

diskpart assign drive letter using cmd

Copyright ©   EaseUS. All rights reserved.

Success, thanks for submitting!

How To Fix The 'Windows Was Unable To Complete The Format' Error

person using a laptop

Formatting a drive is a routine task for Windows users when they need to erase and empty a whole partition or an external disk to free up space. However, this doesn't always go according to plan, and many Windows users get errors like "Windows Was Unable to Complete the Format."

Encountering such a problem can be really frustrating, especially when you urgently need to use the drive. This error message generally indicates that Windows is having trouble accessing and modifying the drive due to various reasons.

It might be possible that your external drive or SD card is write-protected through a physical switch or software, halting the formatting process. It's also possible that the drive you are trying to format is corrupted in some way. A physically damaged drive can also be the cause of the error. 

If your computer is displaying this formatting error, we'll discuss some ways to fix it and help you format your drive successfully. Please note, these step-by-step instructions are for Microsoft's Windows 11 OS. However, they'll work on Windows 10, too, though some steps may be slightly different.

Preliminary checks to fix Windows Was Unable to Complete the Format error

Before you perform any of the complex procedures, it's a good idea to try simpler actions to rule out any basic issue that could be causing this error. Begin by checking your drive and computer for physical damage. A physically damaged drive typically has cracks, bends, or broken connectors that can interfere with Windows communications.

Next, ensure that the drive is properly connected to your PC. Check for broken cables or loose connections on both ends. If it's a USB drive, ensure it's correctly plugged into the USB port. It's possible that the USB port is the culprit, so try using a different USB port than the current one. If you are trying to format an SD card , use a card reader that is different from the one you are currently using. 

Next, ensure that the write-protected physical switch of your SD card is switched off when attempting to format it. Some USB drives have physical switches too that are worth checking.

Use Windows Disk Management

If none of those simpler actions resolve your drive issues, Windows Disk Management is your next step. It's an app that's generally used for formatting, erasing or  partitioning your storage drive . If you are getting formatting errors while trying to format a drive from File Explorer, it's possible that you need to use this app to resolve your problems.

Disk Management comes with Windows, so to use this app to fix this and format the drive, follow these steps:

  • Press the Windows + R keys on your keyboard to open the Windows Run Command box.
  • Type or copy and paste the following command and press the Enter key to open Disk Management: diskmgmt.msc.
  • Look for the drive that is having trouble formatting. Right-click on it and select New Simple Volume.
  • A new window will be opened, directing you to create a new volume of this unallocated drive. Click Next and follow the on-screen instructions
  • In the following steps, specify the volume size, assign the drive letter, select the file system (NTFS for larger and modern drives, FAT32 for broader compatibility, etc.), and assign a label to the volume.
  • Finally, click the Finish button to create a New Simple Volume of the unallocated space and fix the formatting issues.

This process should format the drive, fixing any more formatting errors.

Using Command Prompt

If Disk Management doesn't work, you may need to move toward the command line interface. There, you can use the Command Prompt to potentially fix a formatting error. You need to have administrator rights to use this method.

In the Windows search box, type Command Prompt, right-click on its icon, and select Run as Administrator. On the command line window, type "diskpart" and hit Enter. 

Then, follow these steps:

  • To display the list of all the drives connected to your computer, type "list disk" command and press the enter key.
  • Identify the disk in question by recalling its size. After that type "select disk N", where N is the number of your disk, such as 0, 1, or 2, and then press the enter key.
  • Type "clean" to erase all the data from the selected disk. Now, you need to create a new partition for this drive. Type "create partition primary" and hit enter. You can also assign the size to the partition if you like to.
  • Next, format the drive by typing "format fs=ntfs quick". If applicable, replace ntfs with fat32 or another file format.
  • Finally, assign the drive letter by typing "assign letter=H" command and hitting enter. Replace H with your desired drive letter.

Using this method, the problematic drive will be wiped clean and won't cause any formatting error. 

If your formatting errors persist, it's likely you are facing a hardware issue. In that case, you need to take your drive to the service center for repair, or potentially purchase a new one.

diskpart assign drive letter using cmd

The Best Windows Disk Partition Manager and PC Optimizer

diskpart assign drive letter using cmd

  • Free Partition Software >

[Windows 11/10] How to Turn Off BitLocker in Safe Mode

This post will share you with how to turn off BitLocker in Safe Mode. If you can’t access to Safe Mode, you can also run AOMEI Partition Assistant to unlock, disable, or turn off BitLocker.

Irene

By Irene / Updated on July 15, 2024

twitter

Stage 1. Boot into Safe Mode

Stage 2. run cmd to turn off bitlocker in safe mode, user case: how to turn off bitlocker in safe mode.

I've encountered a problem after interrupting the installation of Windows updates. The OS boots fine, but after logging in, I see an empty desktop and taskbar with only the date and time displayed, and nothing works. I've tried different hotkeys, but nothing happens. So, I decided to go into Recovery mode and tried to uninstall the latest updates, but without any luck. Then, I tried to boot into Safe Mode, but it requires a Bitlocker Recovery Key which I don't have. I don't remember enabling Bitlocker when I installed Windows a year ago.

Next, I tried to unlock it using the manage-bde command via cmd in Recovery Mode. The manage-bde tool says the C: drive is locked and has two protectors: TPM and Numerical Password, identified by their IDs only. I didn't create that password. So, I don't know how to disable Bitlocker. I can log into Windows, but nothing opens or reacts to hotkeys, so I cannot open cmd to disable Bitlocker or at least back up my data. I also tried to connect remotely via RDP from a different Windows laptop, but it didn't work because RDP must be enabled on the target machine. Are there any other hotkeys or methods to run cmd or PowerShell?

- Question from Microsoft Community

Safe mode only runs with basic and essential files, so it is practical and useful when you encounter problems and errors. When you find yourself locked out of your device and receive a notice saying " manage-bde: the drive C: is locked, " you can boot into Safe Mode to turn off BitLocker. If you don’t know how, please follow our guide to learn how to turn off BitLocker in Safe Mode.

How to turn off BitLocker in Safe Mode

To turn off BitLocker in Safe Mode, you need to first enter the Safe Mode with Command Prompt, and then run manage-bde command to turn off the utility. In this section, we will show you how.

To start Windows 11 in Safe Mode is possible even when the system is powered off. However, it's important to confirm that you have previously activated this fast boot key for the process to take effect.

Step 1.  Open your computer and quickly press the  F8  key or the Ctrl key to access the Startup Settings screen. Subsequently, use the  F4/F5/F6  keys to select the desired safe mode for booting.

Step 2.  After a few minutes, your computer will enter  Safe Mode .

Note:  To manually enable the  F8  shortcut key, run the command prompt as an administrator and execute the following commands:  bcdedit /set {bootmgr} displaybootmenu yes .

After accessing to Command Prompt in Safe Mode, you can input these commands to turn off or unlock BitLocker in Windows 10 and 11.

Step 1. Run command prompt as an administrator.

Step 2. If your is locked, you need to type the following command to unlock it:

manage-bde -unlock F: -RecoveryPassword YOUR-BITLOCKER-RECOVERY-KEY .

Step 3. Then, use the following command to turn off BitLocker for a specific drive:

manage-bde -off X:

Replace X with the letter of the drive you want to decrypt (e.g., E:).

Here's an example:  manage-bde -off E:

Step 4. The command will initiate the decryption process. Please note that this process may take some time, especially if you have a large drive or a significant amount of data. Wait for it to complete.

Turn off BitLocker with Powershell:

If you prefer using PowerShell, you can use the Disable-BitLocker cmdlet. Let’s see the steps:

Step 1. Right-click on the Start button and select "Windows PowerShell (Admin)".

Step 2. Use the following PowerShell command:

Disable-BitLocker -MountPoint "X:"

Replace X with the letter of the drive you want to decrypt (e.g., E).

Step 3. Allow some time for the decryption process to finish. After completing these steps, BitLocker protection will be turned off, and the drive will be decrypted.

These are steps to turn off BitLocker in Safe Mode. 

How to turn off BitLocker with AOMEI Partition Assistant

Turning off BitLocker in Safe Mode may not always work. Sometimes, you may get stuck in Safe Mode due to corrupted system files, incorrect boot configurations, or software/hardware conflicts. At this time, you can use AOMEI Partition Assistant , a multifunctional disk manager to unlock, disable, or turn off BitLocker. 

This software allows you to create a bootable USB and then run its BitLocker function to effectively manage BitLocker drives including backing up  recovery keys , changing passwords, and locking/unlocking encryption drives.

diskpart assign drive letter using cmd

Tip:  Prepare an external disk like USB drive of at least 13GB and insert it into your PC. If the target disk is not a system disk, you can skip the wiping steps (start from step 4).

Step 1. Install and open AOMEI Partition Assistant, on the main console, choose " Tools ">" Make Bootable Media ".  

Step 2. Choose " USB Boot Device ", select the disk you prepared, and click " Proceed " and it will note to you that the drive will be formatted, click " Yes " to continue.

Step 3. Insert the bootable drive to your computer, and enter BIOS to boot the computer from it.

Now, you can run its BitLocker function to manage the utility.

Step1. In the main interface of AOMEI Partition Assistant, click the " Tools " main tab and select " BitLocker ".

Step 2. Find the encrypted drive you would like to decrypt and click the option " Turn off BitLocker ".

🌟Tip:  If you want to turn on BitLocker in the future, please convert FAT32 to NTFS first. It only supports encrypting NTFS partitions. Other partition file systems, for example, FAT or FAT32 cannot be encrypted.

Step 3. There are 2 ways available to decrypt the drive: Use password to decrypt the drive and Use recovery key to decrypt the drive. Please select either way as per your need.

If you select "Use a password to decrypt the drive", please enter the right password and then click the "Decrypt" button.

If you select " Use a recovery key to decrypt the drive ", please enter the recovery key saved in the TXT file or printed when you encrypted the drive, and then click the " Decrypt " button.

Step 4. Then, the decryption process will start and it might take time to decrypt the drive. Once the decryption process is finished, please click " Completed ". Finally, the BitLocker on the drive is decrypted.

This passage shares how to turn off BitLocker in Safe Mode. If you stuck in Safe Mode due to various reasons, you can run AOMEI Partition Assistant to unlock, disable, turn off BitLocker or manage it. With this tool, you can also clone BitLocker drive , rebuild corrupted MBR, extend drive space, and so on. For Windows Server users, please choose the AOMEI Partition Assistant Server edition.

Irene

Related Articles

[stepwise] how to turn off bitlocker when it is not ready.

How to turn off BitLocker when it is not ready in the right way? This article will give you a step-by-step guide to easily turn off, disable, and manage BitLocker.

How to Unlock BitLocker Drive without Recovery Key And Password

In this guide, you'll discover how to unlock BitLocker without a password and recovery key if you've forgotten your password or misplaced your recovery key.

(Stepwise Guide) How to Turn Off BitLocker on Windows 11 in 2 ways

After reading this post, you can not only learn how to turn off BitLocker Windows 11, but also you can know how to adjust a BitLocker partition even without disabling it.

How Do I Get BitLocker for Windows 10 Home? (Windows 11 Applicable)

How do I get BitLocker for Windows 10 Home? This instruction will guide to to turn on BitLocker on Windows 10 Home, and you can also use the method on your Windows 11 Home.

Free Download to Try AOMEI Partition Assistant Now

diskpart assign drive letter using cmd

IMAGES

  1. [Solved] How to Change Drive Letter on Windows 11

    diskpart assign drive letter using cmd

  2. How to Assign and Remove Drive Letter with Diskpart in Windows 10 or 11?

    diskpart assign drive letter using cmd

  3. How to Manage Partitions Using Diskpart in Windows 10,11, 8, and 7

    diskpart assign drive letter using cmd

  4. How to Remove and Assign Drive Letters in Windows with Diskpart

    diskpart assign drive letter using cmd

  5. Change and Assign Drive Letter in Windows 10

    diskpart assign drive letter using cmd

  6. Full Guide on Diskpart Assign Drive Letter in Windows 11/10/8/7 [Step

    diskpart assign drive letter using cmd

VIDEO

  1. How To Format A Drive With Diskpart!

  2. clean disk from cmd

  3. USB Format Using Windows Command Prompt

  4. How to Manually Assigning a Drive Letter Using CMD / Diskpart in Windows 11/10 [Solved] #diskpart

  5. PanDrive ko CMD command se bootable kaise banaya Windows 10 me

  6. Computer में Disk Drive letter Change करें? #shorts #windows11

COMMENTS

  1. How to Use the Diskpart Utility to Assign and Remove Drive Letters

    The Disk Management tool in Windows gives you an easy-to-use graphical interface to dealing with partitions and drive letters, but what if you want to just quickly change a drive letter on the command prompt?The diskpart utility makes it easy. You'll need to start by opening an administrator mode command prompt -- type cmd into the search box, and then right-click and choose Run as ...

  2. Manually assigning a drive letter using CMD/Diskpart

    Open up a command prompt (CMD/PowerShell). Type "diskpart" to start up diskpart. You will see the prompt change to "DISKPART>". Type "list vol" to list all available volumes. You can identify the drive by size and file system. Additionally, the volume doesn't currently have a drive letter. Select the volume using "sel vol <number>". Assign the ...

  3. How to Remove and Assign Drive Letters in Windows with Diskpart

    Assign Drive Letter Using Diskpart. Assigning a new drive letter to a partition or removable device using Diskpart is really easy. First, search for the command prompt in the Start menu, right click on it and select the option "Run as administrator." If you are using Windows 8, press "Win + X" to open the power user menu and select the ...

  4. [Free Guide]: Use Diskpart Assign Drive Letter in Windows 11, 10, 8, 7

    The next section will show you how to use Disk Management and Diskpart to assign drive letters. │ Use Diskpart to assign drive letter. Diskpart is a Windows built-in tool that you can use to manage your hard drive, like format disk partition, create partition, delete partition, etc. Well, how to use Command Prompt Diskpart assign drive letter?

  5. How to use the command diskpart (with examples)

    assign letter: This command assigns a drive letter to the selected volume. <drive letter>: Replace this with the desired letter you want to assign to the selected volume. Example Output: DiskPart successfully assigned the drive letter or mount point. DISKPART> Use Case 5: Creating a new partition. Code:

  6. How to assign permanent letters to drives on Windows 10

    To assign a drive letter using Command Prompt, use these steps: Open Start.; Search for Command Prompt, right-click the result, and then select the Run as administrator option.; Type the following ...

  7. DiskPart

    ASSIGN [{LETTER=D | mount=path}] [noerr] Assign a drive letter or mount point to the volume with focus. (Only Server 2012-2022) If no drive letter or mount point is specified, the next available drive letter is assigned. By using the assign command, you can change the drive letter associated with a removable drive.

  8. How to Change Drive Letter with CMD Windows 10

    Diskpart is a Windows built-in CMD tool that lets you easily manage hard drive and change drive letter. To change or assign drive letter in CMD, you can firstly open Diskpart utility in Command Prompt. Check the steps below. Step 1. Open CMD in Windows 10. You can press Windows + R, type cmd, and press Ctrl + Shift + Enter to open elevated ...

  9. How to assign a drive a letter using Diskpart

    From your taskbar, start a search for. cmd. Enter the command: diskpart. Enter the command: list volume. Example output: DISKPART> list vol Volume ### Ltr Label Fs Type Size Status Info----- --- ----- ----- ----- ----- ----- -----Volume 0 C NTFS Simple 119 GB Healthy Boot Volume 1 System Rese NTFS Simple 100 MB Healthy System Volume 2 D DVD-ROM 0 B No Media

  10. diskpart

    The diskpart command interpreter helps you manage your computer's drives (disks, partitions, volumes, or virtual hard disks). Before you can use diskpart commands, you must first list, and then select an object to give it focus. After an object has focus, any diskpart commands that you type will act on that object. Determine focus

  11. How to Format a Drive Using Command Prompt and DiskPart

    Step 8: Assign a Drive Letter. To assign a drive letter to the formatted partition, type "assign letter=X" (replace "X" with your desired drive letter) and press Enter. This will make the drive accessible through the assigned letter in File Explorer. Step 9: Exit DiskPart. Finally, to exit DiskPart, type "exit" and press Enter. You ...

  12. Assign, change or remove Drive Letter with Diskpart

    Now you know how to change or assign another letter to your volume, also if you need you can remove volume letter with command remove letter E. For security reasons you cannot change or remove your current system disk letter (esp C), it will not work. To exit diskpart type in exit. HowTos, HowTos: Windows, Know how: Windows, KnowHow Tags ...

  13. Change and Assign Drive Letter in Windows 10

    1 Press the Win + R keys to open Run, type diskmgmt.msc into Run, and click/tap on OK to open Disk Management. 2 Right click or press and hold on the drive (ex: "F") you want to add or change the drive letter, and click/tap on Change Drive Letter and Paths. (see screenshot below)

  14. hard drive

    I ran into the same issue after using gparted and ntfsclone.diskpart> list partition shows all my partitions, but they don't listed in diskpart> list volume and not associated with an letter.. Find out which partition X you need to associate with an letter: diskpart> list partition diskpart> select partition X diskpart> detail partiton # I found that partition was hidden

  15. Create disk partitions in Windows using diskpart command

    I'm going to add a secondary drive to my Windows server, we'll then Create a Partition using diskpart command, Set label for the partition and assign a drive letter to the partition. Apart from creating Logical volumes and partitions with diskpart command.

  16. Full Guide on Diskpart Assign Drive Letter in Windows 11/10/8 ...

    Step 1. Run EaseUS Partition Master, right-click the target partition, and choose "Change Drive Letter". Step 2. In the new window, click the down arrow and choose a drive letter for the partition from the drop-down menu, then click "OK". Step 3. Click the "Execute 1 Task(s)" button in the top-left corner, check the changes, and click "Apply" to change the drive letter of the selected partition.

  17. How to: Change Volume Label using CMD in Windows 10, 8, 7

    This post will show you how to use Diskpart assign drive letter in Windows 11, 10, 8, 7. In addition, another free GUI software will be introduced to assign or remove the drive letters. ... Need to format C drive using Command Prompt to reinstall your Windows 11, 10, 8, 7 operating system? Here comes the step-by-step guide. Free Download to Try ...

  18. Diskpart

    More on the blog: https://bit.ly/31NoF4GAssign drive letters in the command line with Diskpart.Start a command prompt and type "diskpart". Then you can use "...

  19. Diskpart script to assign driver letter and create 2 partitions

    WinPE appears to be assigning the DVD-ROM drive the letter D. Firstly, I'm executing diskpart with the following command to re-assign the letter given to the DVD-ROM drive: Select volume 0 assign letter=e This appears to work as intended. Viewing the various volumes using Diskpart shows the DVD-ROM drive to be E: The next diskpart script aims ...

  20. command prompt question-assign letter to a disk

    Click the Start button . In the Search box, type Command Prompt, and then, in the list of results, double-click Command Prompt. Type: diskpart Then type: list disk That will give you a list of all your drives with their drive numbers (not letters). Find the drive number for the drive you want to assign a letter to.

  21. How to Use the Diskpart Utility to Assign and Remove Drive Letters

    If your drive number is different, you'll want to replace the 3 with the number in your configuration. select volume 3. You should see a message that the volume is now selected. At this point you can easily assign a new drive letter. Just type in this command, substituting R for the drive letter you'd like to use: assign letter=R

  22. Changing Drive Letter in Windows Server: A Comprehensive Guide

    Step 5: Check that the drive letter has been updated and that the drive is accessible with the new letter. Method 2: Use DiskPart. DiskPart is a command-line tool in Windows system that allows you to manage your disks and partitions. For administrators who prefer command-line tools, DiskPart provides a straightforward method to change drive ...

  23. Diskpart Unassign Drive Letter in Windows 11/10 [Full Guide]

    On This Page : How to Unassign Drive Letter Diskpart in Windows 11/10; Best Alternative to Diskpart Remove Drive Letter; Diskpart is a well-known Windows built-in disk partition utility used to format/create/delete partitions, online/offline disk, wipe disks, etc.However, a lot of users are unclear about how to use this utility.

  24. How to automatically assign a drive letter by using the Diskpart.exe

    Using Disk Management to change drive letter assignment… 1. Click Start, right-click Computer, and select Manage. 2. Click on Continue or provide Administrator privileges if prompted. 3. In the left pane click on Disk Management which is located under the Storage category. 4. If you wish to change the drive letter assignment for a removable storage device or volume:

  25. How to fix storage drive not showing on File Explorer on Windows 11

    To use DiskPart with Command Prompt to clean a drive, use these steps: ... Type the following command to assign a drive letter and press Enter: assign letter=D (Image credit: Mauro Huculak) ...

  26. How to Zero Fill Hard Drive via Command Prompt in Windows

    Here, X will represent the letter of the drive present in your hard disk. Moreover, NTFS is a file system you can identify within the "Properties" dialog box through the "This PC" folder. ... To clean a hard drive using the Command Prompt, you can utilize the diskpart functionality using the below instructions. 1. First, users have to enter the ...

  27. How To Fix The 'Windows Was Unable To Complete The Format' Error

    In the following steps, specify the volume size, assign the drive letter, select the file system (NTFS for larger and modern drives, FAT32 for broader compatibility, etc.), and assign a label to ...

  28. [Windows 11/10] How to Turn Off BitLocker in Safe Mode

    If you prefer using PowerShell, you can use the Disable-BitLocker cmdlet. Let's see the steps: Step 1. Right-click on the Start button and select "Windows PowerShell (Admin)". Step 2. Use the following PowerShell command: Disable-BitLocker -MountPoint "X:" Replace X with the letter of the drive you want to decrypt (e.g., E). Step 3.