How to use Diskpart to list all Volumes and Partitions and output to file
book
Article ID: 289743
calendar_today
Updated On:
Products
Carbon Black Cloud Enterprise EDR (formerly Cb Threathunter)
Issue/Introduction
Explain the use of a text file with Diskpart to run a script and output to a file for review
Environment
- Microsoft Windows: Windows 2000 and Higher
- Diskpart utility
Resolution
- Connect to endpoint
- Launch elevated command prompt
- Run diskpart to list all volumes
C:\>diskpart
DISKPART> LIST VOLUME
- Create script text file with the following
LIST VOLUME
- For each volume listed, add the following to the script text file
SELECT VOLUME <#>
LIST PARTITION
- Save script text file with logical name
Diskpart_Script.txt
- Copy script text file to output file to record commands executed
C:\>COPY <pathToTextFile>\Diskpart_Script.txt > <pathToOutputFile>\%COMPUTERNAME%_DiskpartOutput.txt
- Run Diskpart using the file from step 6 as a script to output to a file
C:\>DISKPART /S <pathToTextFile>\Diskpart_Script.txt >> <pathToOutputFile>\%COMPUTERNAME%_DiskpartOutput.txt
- Collect Output file and provide to Support
Feedback
thumb_up
Yes
thumb_down
No