{"id":78669,"date":"2026-05-24T19:13:35","date_gmt":"2026-05-24T19:13:35","guid":{"rendered":"http:\/\/bangla.sitestree.com\/?p=78669"},"modified":"2026-05-24T19:13:36","modified_gmt":"2026-05-24T19:13:36","slug":"command-performs-the-full-setup-of-a-new-raw-disk-in-one-powershell-pipeline","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=78669","title":{"rendered":"Command performs the full setup of a new RAW disk in one PowerShell pipeline:"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">explain: Get-Disk | Where PartitionStyle -eq &#8220;RAW&#8221; | Initialize-Disk -PartitionStyle GPT -PassThru | New-Partition -UseMaximumSize -AssignDriveLetter | Format-Volume -FileSystem NTFS -NewFileSystemLabel &#8220;MYDATA&#8221;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This command performs the <strong>full setup of a new RAW disk<\/strong> in one PowerShell pipeline:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-Disk |\nWhere PartitionStyle -eq \"RAW\" |\nInitialize-Disk -PartitionStyle GPT -PassThru |\nNew-Partition -UseMaximumSize -AssignDriveLetter |\nFormat-Volume -FileSystem NTFS -NewFileSystemLabel \"MYDATA\"\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Full meaning<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Find any uninitialized disk, initialize it as GPT, create one large partition, assign a drive letter, and format it as NTFS with the label <code>MYDATA<\/code>.<\/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\">Step-by-step explanation<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Find disks<\/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 all disks connected to the system.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">2. Select only RAW disks<\/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 whose partition style is <code>RAW<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>RAW<\/code> means:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>The disk is new or uninitialized.\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\">3. Initialize the disk as GPT<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>Initialize-Disk -PartitionStyle GPT -PassThru\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This prepares the disk for use.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>GPT<\/code> means <strong>GUID Partition Table<\/strong>, the modern partition style.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>-PassThru<\/code> is important here because it sends the initialized disk object to the next command in the pipeline.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Without <code>-PassThru<\/code>, the next command may not receive the disk object.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">4. Create a partition<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>New-Partition -UseMaximumSize -AssignDriveLetter\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Creates one partition using all available disk space.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>-UseMaximumSize<\/code> means:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Use the full disk space.\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>-AssignDriveLetter<\/code> means:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Automatically assign a drive letter, such as E: or F:\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\">5. Format the volume<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>Format-Volume -FileSystem NTFS -NewFileSystemLabel \"MYDATA\"\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Formats the new partition.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>NTFS<\/code> is the Windows file system.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>MYDATA<\/code> is the volume label\/name that appears in File Explorer.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">What happens after running it?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A new usable drive appears, for example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>E:  MYDATA\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can then store files on it.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Very important warning<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This command can erase or prepare disks. Use it only on a <strong>new test disk<\/strong>, preferably inside a <strong>VM<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before running it, always check:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-Disk\n<\/code><\/pre>\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\">Then confirm the correct disk before initializing.<\/p>\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 uninitialized RAW disks, initializes them using GPT,\n# creates one full-size partition, assigns a drive letter,\n# and formats the volume as NTFS with the label MYDATA.<\/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>explain: Get-Disk | Where PartitionStyle -eq &#8220;RAW&#8221; | Initialize-Disk -PartitionStyle GPT -PassThru | New-Partition -UseMaximumSize -AssignDriveLetter | Format-Volume -FileSystem NTFS -NewFileSystemLabel &#8220;MYDATA&#8221; This command performs the full setup of a new RAW disk in one PowerShell pipeline: Full meaning Find any uninitialized disk, initialize it as GPT, create one large partition, assign a drive letter, &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=78669\">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-78669","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":78661,"url":"http:\/\/bangla.sitestree.com\/?p=78661","url_meta":{"origin":78669,"position":0},"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":78659,"url":"http:\/\/bangla.sitestree.com\/?p=78659","url_meta":{"origin":78669,"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":78669,"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":14038,"url":"http:\/\/bangla.sitestree.com\/?p=14038","url_meta":{"origin":78669,"position":3},"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":14016,"url":"http:\/\/bangla.sitestree.com\/?p=14016","url_meta":{"origin":78669,"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":78337,"url":"http:\/\/bangla.sitestree.com\/?p=78337","url_meta":{"origin":78669,"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\/78669","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=78669"}],"version-history":[{"count":1,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/78669\/revisions"}],"predecessor-version":[{"id":78670,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/78669\/revisions\/78670"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=78669"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=78669"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=78669"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}