{"id":78104,"date":"2025-05-08T22:07:20","date_gmt":"2025-05-08T22:07:20","guid":{"rendered":"http:\/\/bangla.sitestree.com\/?p=78104"},"modified":"2025-05-08T22:07:20","modified_gmt":"2025-05-08T22:07:20","slug":"powershell-check-the-block-size-of-a-drive","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=78104","title":{"rendered":"PowerShell : Check the Block Size of a Drive"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Command:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Get-CimInstance -ClassName Win32_Volume | Select-Object Name, FileSystem, Label, Size, BlockSize | Sort-Object Name | Format-Table -AutoSize<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Sample Output:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"109\" src=\"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/05\/image-4.png?resize=750%2C109\" alt=\"\" class=\"wp-image-78105\" style=\"width:840px;height:auto\" srcset=\"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/05\/image-4.png?w=770 770w, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/05\/image-4.png?resize=300%2C44 300w, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/05\/image-4.png?resize=768%2C112 768w, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/05\/image-4.png?resize=750%2C109 750w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Needed to format a 1TB Memory Card. 64 KB seemed to be a good Block Size for general use. Windows by default did not give an option to select a smaller block size. Powershell commands could be used or 3rd party software could be used.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"310\" height=\"525\" src=\"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/05\/image-5.png?resize=310%2C525\" alt=\"\" class=\"wp-image-78106\" style=\"width:840px;height:auto\" srcset=\"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/05\/image-5.png?w=310 310w, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2025\/05\/image-5.png?resize=177%2C300 177w\" sizes=\"auto, (max-width: 310px) 100vw, 310px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Command: Get-CimInstance -ClassName Win32_Volume | Select-Object Name, FileSystem, Label, Size, BlockSize | Sort-Object Name | Format-Table -AutoSize Sample Output: Needed to format a 1TB Memory Card. 64 KB seemed to be a good Block Size for general use. Windows by default did not give an option to select a smaller block size. Powershell commands could &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=78104\">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_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-78104","post","type-post","status-publish","format-standard","hentry","category-root","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":78104,"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":78663,"url":"http:\/\/bangla.sitestree.com\/?p=78663","url_meta":{"origin":78104,"position":1},"title":"write-output vs write-host","author":"Sayed","date":"May 24, 2026","format":false,"excerpt":"Write-Output vs Write-Host in PowerShell FeatureWrite-OutputWrite-HostSends data to pipeline\u2705 Yes\u274c NoCan be stored in variable\u2705 Yes\u274c Usually noCan be redirected to file\u2705 Yes\u274c Not normally usefulUsed for script output\u2705 Recommended\u26a0\ufe0f Mainly for display messagesSupports formatting\/colorLimited\u2705 Good for colors 1. Write-Output Write-Output sends data to the PowerShell pipeline. Write-Output \"Hello PowerShell\"\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":78791,"url":"http:\/\/bangla.sitestree.com\/?p=78791","url_meta":{"origin":78104,"position":2},"title":"Terminating error vs non-terminating error","author":"Sayed","date":"July 13, 2026","format":false,"excerpt":"Terminating error vs non-terminating error in PowerShell Non-terminating error A non-terminating error reports a problem but allows PowerShell to continue running the remaining commands. Example: Get-Content -Path \".\\MissingFile.txt\" Write-Output \"The script continued.\" Possible output: Get-Content : Cannot find path '.\\MissingFile.txt' because it does not exist. The script continued. The file-reading\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":78104,"position":3},"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":78793,"url":"http:\/\/bangla.sitestree.com\/?p=78793","url_meta":{"origin":78104,"position":4},"title":"Write-Error","author":"Sayed","date":"July 13, 2026","format":false,"excerpt":"Write-Error in PowerShell Write-Error writes an error message to PowerShell\u2019s error stream. By default, it creates a non-terminating error. That means PowerShell displays the error, but usually continues with the next command. Write-Error \"The file could not be found.\" Write-Output \"The script continued.\" Typical result: Write-Error: The file could not\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":78721,"url":"http:\/\/bangla.sitestree.com\/?p=78721","url_meta":{"origin":78104,"position":5},"title":"DHCP: Powershell Commands","author":"Sayed","date":"June 27, 2026","format":false,"excerpt":"Commands that work in Windows PowerShell 5.1 These DHCP\/networking commands are intended for Windows Server PowerShell: Install-WindowsFeature DHCPInstall-WindowsFeature DHCP -IncludeManagementToolsImport-Module DHCPServerAdd-DhcpServerv4ScopeSet-DhcpServerv4OptionValueGet-DhcpServerv4ScopeGet-DhcpServerv4LeaseGet-DhcpServerInDCAdd-DhcpServerInDCRestart-Service DHCPServerGet-Service DHCPServer Related: Get-NetAdapterGet-NetIPAddressNew-NetIPAddressSet-DnsClientServerAddressGet-DnsClientServerAddressipconfig \/all","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":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/78104","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=78104"}],"version-history":[{"count":1,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/78104\/revisions"}],"predecessor-version":[{"id":78107,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/78104\/revisions\/78107"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=78104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=78104"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=78104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}