{"id":78661,"date":"2026-05-24T19:03:12","date_gmt":"2026-05-24T19:03:12","guid":{"rendered":"http:\/\/bangla.sitestree.com\/?p=78661"},"modified":"2026-05-24T19:03:13","modified_gmt":"2026-05-24T19:03:13","slug":"power-shell-explain-get-disk-where-partitionstyle-eq-raw-initialize-disk-partitionstyle-gpt","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=78661","title":{"rendered":"Power Shell: explain: Get-Disk | Where PartitionStyle -eq &#8220;RAW&#8221; | Initialize-Disk -PartitionStyle GPT"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This command finds <strong>uninitialized disks<\/strong> and initializes them using the <strong>GPT partition style<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-Disk | Where PartitionStyle -eq \"RAW\" | Initialize-Disk -PartitionStyle GPT\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step-by-step explanation<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. <code>Get-Disk<\/code><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-Disk\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Lists disks connected to the system.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It shows information such as:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Number\nFriendlyName\nOperationalStatus\nSize\nPartitionStyle\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">2. <code>Where PartitionStyle -eq \"RAW\"<\/code><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>Where PartitionStyle -eq \"RAW\"\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Filters only disks where the <code>PartitionStyle<\/code> is <code>RAW<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>RAW<\/code> usually means:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>The disk has not been initialized yet.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">So PowerShell is looking for a new\/unprepared disk.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">3. <code>Initialize-Disk -PartitionStyle GPT<\/code><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>Initialize-Disk -PartitionStyle GPT\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Initializes the selected RAW disk and sets the partition style to <strong>GPT<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">GPT means:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>GUID Partition Table\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">GPT is the modern partitioning style and is recommended for most new systems. Your lab notes explain that GPT is more modern and reliable than MBR, supports many partitions, and supports disks larger than 2 TB.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Full meaning<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-Disk | Where PartitionStyle -eq \"RAW\" | Initialize-Disk -PartitionStyle GPT\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">means:<\/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\">Get all disks, find the disks that are not initialized, and initialize them using GPT.<\/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\">Important warning<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This command can affect disks. Students should run it only on a <strong>test VM disk<\/strong>, not on a real important disk.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Safer version:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-Disk | Where-Object PartitionStyle -eq \"RAW\"\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">First check which disk is RAW.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then initialize a specific disk:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Initialize-Disk -Number 1 -PartitionStyle GPT\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\">What comes after this?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Initializing the disk does <strong>not<\/strong> create a usable drive letter yet.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Usually the next steps are:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>New-Partition -DiskNumber 1 -UseMaximumSize -AssignDriveLetter\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then format it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Format-Volume -DriveLetter E -FileSystem NTFS -NewFileSystemLabel \"DataDisk\"\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\">Student comment<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># This command finds disks with RAW partition style and initializes them as GPT.\n# RAW means the disk is not initialized. GPT is the modern partition style.\nRef: AI\/ChatGPT<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This command finds uninitialized disks and initializes them using the GPT partition style: Step-by-step explanation 1. Get-Disk Lists disks connected to the system. It shows information such as: 2. Where PartitionStyle -eq &#8220;RAW&#8221; Filters only disks where the PartitionStyle is RAW. RAW usually means: So PowerShell is looking for a new\/unprepared disk. 3. Initialize-Disk -PartitionStyle &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=78661\">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-78661","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":78669,"url":"http:\/\/bangla.sitestree.com\/?p=78669","url_meta":{"origin":78661,"position":0},"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":78659,"url":"http:\/\/bangla.sitestree.com\/?p=78659","url_meta":{"origin":78661,"position":1},"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":78671,"url":"http:\/\/bangla.sitestree.com\/?p=78671","url_meta":{"origin":78661,"position":2},"title":"compare contrast these commands: Get-Disk | Format-Table -Auto Get-PhysicalDisk Get-Partition -DiskNumber 0 Get-Partition -DriveLetter D","author":"Sayed","date":"May 24, 2026","format":false,"excerpt":"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. CommandMain PurposeLevelGet-Disk | Format-Table -AutoShows disks in a clean\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":76445,"url":"http:\/\/bangla.sitestree.com\/?p=76445","url_meta":{"origin":78661,"position":3},"title":"Power Shell: Disk Space, Memory Space, Process","author":"Sayed","date":"December 8, 2024","format":false,"excerpt":"","rel":"","context":"In &quot;Root&quot;","block_context":{"text":"Root","link":"http:\/\/bangla.sitestree.com\/?cat=1"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/12\/image-34.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/12\/image-34.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/12\/image-34.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/12\/image-34.png?resize=700%2C400 2x, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/12\/image-34.png?resize=1050%2C600 3x, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/12\/image-34.png?resize=1400%2C800 4x"},"classes":[]},{"id":14016,"url":"http:\/\/bangla.sitestree.com\/?p=14016","url_meta":{"origin":78661,"position":4},"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":75337,"url":"http:\/\/bangla.sitestree.com\/?p=75337","url_meta":{"origin":78661,"position":5},"title":"How to add a new disk to AWS instance and format lightsail disk","author":"Sayed","date":"November 27, 2022","format":false,"excerpt":"https:\/\/youtu.be\/T8RqjC_iQqM","rel":"","context":"In &quot;From Youtube Channel&quot;","block_context":{"text":"From Youtube Channel","link":"http:\/\/bangla.sitestree.com\/?cat=1952"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/img.youtube.com\/vi\/T8RqjC_iQqM\/0.jpg?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/78661","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=78661"}],"version-history":[{"count":1,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/78661\/revisions"}],"predecessor-version":[{"id":78662,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/78661\/revisions\/78662"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=78661"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=78661"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=78661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}