{"id":10192,"date":"2017-10-09T08:00:50","date_gmt":"2017-10-09T08:00:50","guid":{"rendered":"https:\/\/www.top-password.com\/blog\/?p=10192"},"modified":"2017-10-09T08:00:50","modified_gmt":"2017-10-09T08:00:50","slug":"format-hard-drive-using-powershell","status":"publish","type":"post","link":"https:\/\/www.top-password.com\/blog\/format-hard-drive-using-powershell\/","title":{"rendered":"How to Format Hard Drive Using PowerShell"},"content":{"rendered":"<p>Is there a simple PowerShell script to format a USB disk? If you have a brand new hard drive, or you want to erase all the data from a disk, you have to format it. In this tutorial we&#8217;ll explain how to format a hard drive using PowerShell commands in Windows 10.<\/p>\n<p><strong>How to Format Hard Drive Using PowerShell?<\/strong><\/p>\n<ol>\n<li>To <a href=\"https:\/\/www.top-password.com\/blog\/5-ways-to-run-powershell-as-administrator-in-windows-10\/\" rel=\"noopener\" target=\"_blank\">open Powershell as admin<\/a> in Windows 10, press the Windows key + X together and then select &#8220;<strong>Windows PowerShell (Admin)<\/strong>&#8220;.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2017\/06\/windows-powershell-admin.png\" alt=\"\" width=\"271\" height=\"613\" class=\"alignnone size-full wp-image-9511\" \/>\n<\/li>\n<li>Type the following command to find the hard drive you want to format.\n<p><code>Get-Disk<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2017\/10\/get-disk.png\" alt=\"\" width=\"600\" height=\"175\" class=\"alignnone size-full wp-image-10194\" \/>\n<\/li>\n<li>To clear all partitions and volumes from your disk, type the following command. Replace 1 with the disk number of the drive you want to format.\n<p><code>Clear-Disk -Number 1 -RemoveData<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2017\/10\/clear-disk.png\" alt=\"\" width=\"600\" height=\"128\" class=\"alignnone size-full wp-image-10195\" \/>\n<\/li>\n<li>Next, create a new partition on your blank disk, and assign a drive letter:\n<p><code>New-Partition -DiskNumber 1 -UseMaximumSize -IsActive -DriveLetter E<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2017\/10\/new-partition.png\" alt=\"\" width=\"564\" height=\"220\" class=\"alignnone size-full wp-image-10196\" \/>\n<\/li>\n<li>To format the newly-created partition with the NTFS file system, type the following command and press Enter. Replace &#8216;USB&#8217; with the volume label you want to use.\n<p><code>Format-Volume -DriveLetter E -FileSystem FAT32 -NewFileSystemLabel USB<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2017\/10\/format-drive-using-powershell.png\" alt=\"\" width=\"600\" height=\"120\" class=\"alignnone size-full wp-image-10197\" \/>\n<\/li>\n<li>Once you&#8217;ve completed the steps, you can now access the new partition in Windows Explorer.<\/li>\n<\/ol>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Is there a simple PowerShell script to format a USB disk? If you have a brand new hard drive, or you want to erase all the data from a disk, you have to format it. In this tutorial we&#8217;ll explain how to format a hard drive using PowerShell commands in Windows 10. How to Format [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,10,1894],"tags":[3550,3551],"class_list":["post-10192","post","type-post","status-publish","format-standard","hentry","category-others","category-tips-tricks","category-windows-10","tag-format-drive-windows-10","tag-format-hard-drive-from-powershell"],"_links":{"self":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts\/10192","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/comments?post=10192"}],"version-history":[{"count":4,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts\/10192\/revisions"}],"predecessor-version":[{"id":10200,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts\/10192\/revisions\/10200"}],"wp:attachment":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/media?parent=10192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/categories?post=10192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/tags?post=10192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}