- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to format the disk using PowerShell?
To format the disk using PowerShell, we can use the Format−Volume command. For example, we have to format the E: on the local server then we can use the simple format command as shown below.
Format−Volume −DriveLetter E −Force −Verbose
To format the disk with the specific filesystem use the below command.
Format−Volume −DriveLetter E −FileSystem NTFS −Full −Force −Verbose
The above command with Format the E drive with the NTFS file system (there are other file systems like FAT, FAT32, exFAT) forcefully.
You can even change the label for the drive while formatting using −NewFileSystemLabel command.
Format−Volume −DriveLetter E −FileSystem NTFS −NewFileSystemLabel "Temporary Stroage" −Full −Verbose
- Related Articles
- How to get the disk information using PowerShell?
- How to get the disk performance using PowerShell?
- How to change the local disk name using PowerShell?
- How to format string using PowerShell?
- How to get the Azure VM disk encryption settings using PowerShell?
- How to get the Azure VM disk caching settings using PowerShell?
- How to find the disk type of the Azure Availability set using PowerShell?
- How to convert the hashtable to the JSON format using PowerShell?
- How to convert JSON object to Hashtable format using PowerShell?
- How to Format a Hard Disk on Linux OS
- How to format date string in PowerShell?
- How to convert command output to the Hashtable format in PowerShell?
- How to get process output in GridView format in PowerShell ?
- Explain JSON format in PowerShell.
- How to work the timezone using PowerShell?

Advertisements