{"id":78671,"date":"2026-05-24T19:28:40","date_gmt":"2026-05-24T19:28:40","guid":{"rendered":"http:\/\/bangla.sitestree.com\/?p=78671"},"modified":"2026-05-24T19:28:41","modified_gmt":"2026-05-24T19:28:41","slug":"compare-contrast-these-commands-get-disk-format-table-auto-get-physicaldisk-get-partition-disknumber-0-get-partition-driveletter-d","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=78671","title":{"rendered":"compare contrast these commands: Get-Disk | Format-Table -Auto Get-PhysicalDisk Get-Partition -DiskNumber 0 Get-Partition -DriveLetter D"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">These four commands are all <strong>disk\/partition viewing commands<\/strong>, but they look at different levels of storage.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The disk-management lab explains that <code>Get-Disk<\/code> shows logical disks, <code>Get-PhysicalDisk<\/code> shows physical disk devices, and <code>Get-Partition<\/code> is used to view partition information for a disk.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Command<\/th><th>Main Purpose<\/th><th>Level<\/th><\/tr><\/thead><tbody><tr><td><code>Get-Disk | Format-Table -Auto<\/code><\/td><td>Shows disks in a clean table<\/td><td>Disk level<\/td><\/tr><tr><td><code>Get-PhysicalDisk<\/code><\/td><td>Shows physical storage devices<\/td><td>Hardware\/storage level<\/td><\/tr><tr><td><code>Get-Partition -DiskNumber 0<\/code><\/td><td>Shows all partitions on disk 0<\/td><td>Partition level<\/td><\/tr><tr><td><code>Get-Partition -DriveLetter D<\/code><\/td><td>Shows the partition assigned to drive D:<\/td><td>Specific drive-letter partition<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">1. <code>Get-Disk | Format-Table -Auto<\/code><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-Disk | Format-Table -Auto\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Shows the disks Windows recognizes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Useful for checking:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Disk number\nSize\nHealth status\nOperational status\nPartition style: RAW, MBR, GPT\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>Format-Table -Auto<\/code> only improves display by auto-sizing columns.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use this first when asking:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">What disks are connected, and are they initialized?<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">2. <code>Get-PhysicalDisk<\/code><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-PhysicalDisk\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Shows the actual physical storage devices.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Useful for checking:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Friendly name\nMedia type\nCanPool\nHealth status\nOperational status\nSize\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This is more useful when working with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Storage Spaces\nPhysical drives\nHardware-level disk information\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Simple difference:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-Disk = disks Windows can manage logically\nGet-PhysicalDisk = actual physical storage devices\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">3. <code>Get-Partition -DiskNumber 0<\/code><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-Partition -DiskNumber 0\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Shows all partitions on <strong>Disk 0<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Useful for seeing:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>System partition\nRecovery partition\nC: partition\nEFI partition\nReserved partition\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Use this when asking:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">What partitions exist on this disk?<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Disk 0 may contain C:, EFI, Recovery, and system partitions.\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">4. <code>Get-Partition -DriveLetter D<\/code><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-Partition -DriveLetter D\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Shows the partition that owns drive letter <strong>D:<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Useful when asking:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Which partition is my D: drive?<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">It gives partition information such as:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DiskNumber\nPartitionNumber\nDriveLetter\nSize\nType\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This is more specific than <code>-DiskNumber<\/code>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Key Comparison<\/h1>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-Disk\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">answers:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">What disks exist?<\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-PhysicalDisk\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">answers:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">What physical storage devices exist?<\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-Partition -DiskNumber 0\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">answers:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">What partitions are on disk 0?<\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-Partition -DriveLetter D\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">answers:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Which partition corresponds to D:?<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">Teaching Flow<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Use them in this order:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-Disk | Format-Table -Auto\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then inspect a disk:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-Partition -DiskNumber 0\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then inspect one drive letter:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-Partition -DriveLetter D\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then compare physical storage:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-PhysicalDisk\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Student comment:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Get-Disk shows disks, Get-PhysicalDisk shows physical devices,\n# and Get-Partition shows partitions either by disk number or drive letter.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">REF: AI Tools\/ChatGPT<\/p>\n","protected":false},"excerpt":{"rendered":"<p>These four commands are all disk\/partition viewing commands, but they look at different levels of storage. The disk-management lab explains that Get-Disk shows logical disks, Get-PhysicalDisk shows physical disk devices, and Get-Partition is used to view partition information for a disk. Command Main Purpose Level Get-Disk | Format-Table -Auto Shows disks in a clean table &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=78671\">Continue reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1981],"tags":[],"class_list":["post-78671","post","type-post","status-publish","format-standard","hentry","category-power-shell","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":78659,"url":"http:\/\/bangla.sitestree.com\/?p=78659","url_meta":{"origin":78671,"position":0},"title":"GPT in PowerShell","author":"Sayed","date":"May 24, 2026","format":false,"excerpt":"Ref: AI Tool\/ChatGPT GPT in Disk Management GPT means GUID Partition Table. It is a modern disk partitioning system used to organize partitions on a hard drive, SSD, or virtual disk. In PowerShell disk management, you may see it here: Get-Disk Example output: Number FriendlyName PartitionStyle ------ ------------ -------------- 0\u2026","rel":"","context":"In &quot;Operating Systems&quot;","block_context":{"text":"Operating Systems","link":"http:\/\/bangla.sitestree.com\/?cat=1968"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":78661,"url":"http:\/\/bangla.sitestree.com\/?p=78661","url_meta":{"origin":78671,"position":1},"title":"Power Shell: explain: Get-Disk | Where PartitionStyle -eq &#8220;RAW&#8221; | Initialize-Disk -PartitionStyle GPT","author":"Sayed","date":"May 24, 2026","format":false,"excerpt":"This command finds uninitialized disks and initializes them using the GPT partition style: Get-Disk | Where PartitionStyle -eq \"RAW\" | Initialize-Disk -PartitionStyle GPT Step-by-step explanation 1. Get-Disk Get-Disk Lists disks connected to the system. It shows information such as: Number FriendlyName OperationalStatus Size PartitionStyle 2. Where PartitionStyle -eq \"RAW\" Where\u2026","rel":"","context":"In &quot;Power Shell&quot;","block_context":{"text":"Power Shell","link":"http:\/\/bangla.sitestree.com\/?cat=1981"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":78669,"url":"http:\/\/bangla.sitestree.com\/?p=78669","url_meta":{"origin":78671,"position":2},"title":"Command performs the full setup of a new RAW disk in one PowerShell pipeline:","author":"Sayed","date":"May 24, 2026","format":false,"excerpt":"explain: Get-Disk | Where PartitionStyle -eq \"RAW\" | Initialize-Disk -PartitionStyle GPT -PassThru | New-Partition -UseMaximumSize -AssignDriveLetter | Format-Volume -FileSystem NTFS -NewFileSystemLabel \"MYDATA\" This command performs the full setup of a new RAW disk in one PowerShell pipeline: Get-Disk | Where PartitionStyle -eq \"RAW\" | Initialize-Disk -PartitionStyle GPT -PassThru | New-Partition\u2026","rel":"","context":"In &quot;Power Shell&quot;","block_context":{"text":"Power Shell","link":"http:\/\/bangla.sitestree.com\/?cat=1981"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":14016,"url":"http:\/\/bangla.sitestree.com\/?p=14016","url_meta":{"origin":78671,"position":3},"title":"Linux: LVM : Logical Volume Manager : Multiple Hard Disk and Partition and Volume Management","author":"Sayed","date":"December 12, 2017","format":false,"excerpt":"On RedHat\/Centos Linux - LVM experiments Concepts to understand: Physical Volume: Physical Hard Drive or\u00a0 Partitions in Physical Hard Drive Physical Extent:\u00a0 One unit of space usually 4 MB. Volume Group: One or multiple Physical Volumes can be assigned to a Volume Group Logical Volume: Logical volumes are created from\u2026","rel":"","context":"In &quot;\u09b2\u09bf\u09a8\u09be\u0995\u09cd\u09b8 \u098f\u09ac\u0982 \u0989\u09a8\u09bf\u0995\u09cd\u09b8 \u0964 Linux and Unix&quot;","block_context":{"text":"\u09b2\u09bf\u09a8\u09be\u0995\u09cd\u09b8 \u098f\u09ac\u0982 \u0989\u09a8\u09bf\u0995\u09cd\u09b8 \u0964 Linux and Unix","link":"http:\/\/bangla.sitestree.com\/?cat=1231"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":14038,"url":"http:\/\/bangla.sitestree.com\/?p=14038","url_meta":{"origin":78671,"position":4},"title":"On File Systems and Linux Commands (Redhat\/CentOs\/Fedora)","author":"Sayed","date":"December 26, 2017","format":false,"excerpt":"On File Systems and Linux Commands (Redhat\/CentOs\/Fedora) echo \"Dec 26th, 2017, Sayed Ahmed, Justetc Technologies\" On file Systems - Target Audience: Technical People. Software Developers and System\/Network Administrators or DevOps\u00a0 (or wanna be) \/ and \/boot are the default Linux file systems you can also configure \/home, \/opt, \/var, \/tmp,\u2026","rel":"","context":"In &quot;\u09b2\u09bf\u09a8\u09be\u0995\u09cd\u09b8 \u098f\u09ac\u0982 \u0989\u09a8\u09bf\u0995\u09cd\u09b8 \u0964 Linux and Unix&quot;","block_context":{"text":"\u09b2\u09bf\u09a8\u09be\u0995\u09cd\u09b8 \u098f\u09ac\u0982 \u0989\u09a8\u09bf\u0995\u09cd\u09b8 \u0964 Linux and Unix","link":"http:\/\/bangla.sitestree.com\/?cat=1231"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":78337,"url":"http:\/\/bangla.sitestree.com\/?p=78337","url_meta":{"origin":78671,"position":5},"title":"Check Your Linux Knowledge","author":"Sayed","date":"July 27, 2025","format":false,"excerpt":"Linux Installation: Pre Assessment What do you need handy before installing Ubuntu in a Virtual Box 0 points Check all that apply. \u00a0Oracle Virtualbox Installed \u00a0ISO Image of the Linux \u00a0ISO Image in USB Drive What is usually the best place to download\/take a software to install? * 1 point\u2026","rel":"","context":"In &quot;Anything Linux&quot;","block_context":{"text":"Anything Linux","link":"http:\/\/bangla.sitestree.com\/?cat=1976"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/07\/image-8.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/07\/image-8.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/07\/image-8.png?resize=525%2C300 1.5x"},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/78671","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=78671"}],"version-history":[{"count":1,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/78671\/revisions"}],"predecessor-version":[{"id":78672,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/78671\/revisions\/78672"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=78671"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=78671"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=78671"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}