Created
November 19, 2018 21:37
-
-
Save LeetCodes/8f06fea8b10f641606e55dd99ebec9f1 to your computer and use it in GitHub Desktop.
Win10 Storage Spaces info
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # List all disks that can be pooled and output in table format (format-table) | |
| Get-PhysicalDisk -CanPool $True | Format-Table -Property FriendlyName, OperationalStatus, Size, MediaType | |
| # Store all physical disks that can be pooled into a variable, $pd | |
| $pd = (Get-PhysicalDisk -CanPool $True | Where-Object -FilterScript {$_.MediaType -NE 'UnSpecified'}) | |
| # Create a new Storage Pool using the disks in variable $pd with a name of My Storage Pool | |
| New-StoragePool -PhysicalDisks $pd StorageSubSystemFriendlyName "Storage Spaces*" -FriendlyName "My Storage Pool" | |
| #View the disks in the Storage Pool just created | |
| Get-StoragePool -FriendlyName "My Storage Pool" | Get-PhysicalDisk | Select-Object -Property FriendlyName, MediaType | |
| # Create two tiers in the Storage Pool created. One for SSD disks and one for HDD disks | |
| $ssd_Tier = New-StorageTier -StoragePoolFriendlyName "My Storage Pool" -FriendlyName SSD_Tier -MediaType SSD | |
| $hdd_Tier = New-StorageTier -StoragePoolFriendlyName "My Storage Pool" -FriendlyName HDD_Tier -MediaType HDD | |
| # New-VirtualDisk SNtoragePoolFriendlyName "My Storage Pool" ResiliencySettingName Simple Size 10TB Provisioningtype Thin FriendlyName "Documents" | |
| # Create a new virtual disk in the pool with a name of TieredSpace using the SSD (50GB) and HDD (300GB) tiers | |
| $vd1 = New-VirtualDisk -StoragePoolFriendlyName "My Storage Pool" -FriendlyName TieredSpace -StorageTiers @($ssd_tier, $hdd_tier) -StorageTierSizes @(50GB, 300GB) -ResiliencySettingName Mirror -WriteCacheSize 1GB # cannot also specify -size if using tiers and also cannot use provisioning type, e.g. Thin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment