Initialize a Volume Using Windows PowerShell

Learn how to initialize and format volumes using PowerShell.

John Savill

November 18, 2013

1 Min Read
Initialize a Volume Using Windows PowerShell

Q: How can I initialize and format a volume using Windows PowerShell?

A: If you need to initialize and format a volume using PowerShell, use the following:

First, get a list of the disks so you know which disk number you want to initialize:

Get-Disk

Next initialize the disk which by default will use GPT:

Initialize-Disk 1

Next create the partition, format, label and assign a different drive letter if required:
 

New-Partition -DiskNumber 1 -AssignDriverLetter -UseMaximumSizeFormat-Volume -DriveLetter E -FileSystem NTFSSet-Volume -DriveLetter E -NewFileSystemLabel "Pagefile"Set-Partition -DriveLetter E -NewDriveLetter P

 

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like