Skip to content

Instantly share code, notes, and snippets.

@johnkattenhorn
Created June 13, 2017 13:55
Show Gist options
  • Save johnkattenhorn/e332eae0bfd35daf0d2b9fe7f235123e to your computer and use it in GitHub Desktop.
Save johnkattenhorn/e332eae0bfd35daf0d2b9fe7f235123e to your computer and use it in GitHub Desktop.
Get-Disk | `
Where partitionstyle -eq 'raw' | `
Initialize-Disk -PartitionStyle MBR -PassThru | `
New-Partition -AssignDriveLetter -UseMaximumSize | `
Format-Volume -FileSystem NTFS -NewFileSystemLabel "datadisk" -Confirm:$false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment