Set-StoragePool

Set-StoragePool

Modifies the properties of the specified storage pool.

Syntax

Parameter Set: ByUniqueId
Set-StoragePool -UniqueId <String> [-AsJob] [-CimSession <CimSession[]> ] [-ClearOnDeallocate <Boolean> ] [-IsPowerProtected <Boolean> ] [-NewFriendlyName <String> ] [-OtherUsageDescription <String> ] [-RetireMissingPhysicalDisks <RetireMissingPhysicalDisks> ] [-ThinProvisioningAlertThresholds <UInt16[]> ] [-ThrottleLimit <Int32> ] [-Usage <Usage> ] [ <CommonParameters>]

Parameter Set: ByFriendlyName
Set-StoragePool [-FriendlyName] <String> [-AsJob] [-CimSession <CimSession[]> ] [-ClearOnDeallocate <Boolean> ] [-IsPowerProtected <Boolean> ] [-NewFriendlyName <String> ] [-OtherUsageDescription <String> ] [-RetireMissingPhysicalDisks <RetireMissingPhysicalDisks> ] [-ThinProvisioningAlertThresholds <UInt16[]> ] [-ThrottleLimit <Int32> ] [-Usage <Usage> ] [ <CommonParameters>]

Parameter Set: ByFriendlyNameAttributes
Set-StoragePool [-FriendlyName] <String> [-AsJob] [-CimSession <CimSession[]> ] [-IsReadOnly <Boolean> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ByFriendlyNameDefaults
Set-StoragePool [-FriendlyName] <String> [-AsJob] [-CimSession <CimSession[]> ] [-EnclosureAwareDefault <Boolean> ] [-ProvisioningTypeDefault <ProvisioningType> ] [-ResiliencySettingNameDefault <String> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ByName
Set-StoragePool -Name <String> [-AsJob] [-CimSession <CimSession[]> ] [-ClearOnDeallocate <Boolean> ] [-IsPowerProtected <Boolean> ] [-NewFriendlyName <String> ] [-OtherUsageDescription <String> ] [-RetireMissingPhysicalDisks <RetireMissingPhysicalDisks> ] [-ThinProvisioningAlertThresholds <UInt16[]> ] [-ThrottleLimit <Int32> ] [-Usage <Usage> ] [ <CommonParameters>]

Parameter Set: ByNameAttributes
Set-StoragePool -Name <String> [-AsJob] [-CimSession <CimSession[]> ] [-IsReadOnly <Boolean> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ByNameDefaults
Set-StoragePool -Name <String> [-AsJob] [-CimSession <CimSession[]> ] [-EnclosureAwareDefault <Boolean> ] [-ProvisioningTypeDefault <ProvisioningType> ] [-ResiliencySettingNameDefault <String> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ByObject
Set-StoragePool [-InputObject] <CimInstance[]> [-AsJob] [-CimSession <CimSession[]> ] [-ClearOnDeallocate <Boolean> ] [-IsPowerProtected <Boolean> ] [-NewFriendlyName <String> ] [-OtherUsageDescription <String> ] [-RetireMissingPhysicalDisks <RetireMissingPhysicalDisks> ] [-ThinProvisioningAlertThresholds <UInt16[]> ] [-ThrottleLimit <Int32> ] [-Usage <Usage> ] [ <CommonParameters>]

Parameter Set: ByObjectAttributes
Set-StoragePool [-InputObject] <CimInstance[]> [-AsJob] [-CimSession <CimSession[]> ] [-IsReadOnly <Boolean> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ByObjectDefaults
Set-StoragePool [-InputObject] <CimInstance[]> [-AsJob] [-CimSession <CimSession[]> ] [-EnclosureAwareDefault <Boolean> ] [-ProvisioningTypeDefault <ProvisioningType> ] [-ResiliencySettingNameDefault <String> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ByUniqueIdAttributes
Set-StoragePool -UniqueId <String> [-AsJob] [-CimSession <CimSession[]> ] [-IsReadOnly <Boolean> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Parameter Set: ByUniqueIdDefaults
Set-StoragePool -UniqueId <String> [-AsJob] [-CimSession <CimSession[]> ] [-EnclosureAwareDefault <Boolean> ] [-ProvisioningTypeDefault <ProvisioningType> ] [-ResiliencySettingNameDefault <String> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

Detailed Description

The Set-StoragePool cmdlet modifies the properties of the specified storage pool.

Parameters

-AsJob

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CimSession<CimSession[]>

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

Aliases

Session

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ClearOnDeallocate<Boolean>

Clears all blocks on the physical disks in the storage pool upon deallocation. Clearing all blocks is more secure, but is much slower to deallocate.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-EnclosureAwareDefault<Boolean>

Specifies that the storage enclosure used by the storage pool supports SCSI Enclosure Services.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-FriendlyName<String>

Specifies the friendly name of the storage pool on which you want to set attributes.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-InputObject<CimInstance[]>

Accepts an object from the pipeline as input.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-IsPowerProtected<Boolean>

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-IsReadOnly<Boolean>

Sets the object to be read-only (IsReadOnly $true) or read-write (IsReadOnly $false). Note: If the object is set to read-only (IsReadOnly $true), the object must be set to read-write (IsReadOnly $false) before using this cmdlet to set the PartitionStyle parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of the storage pool on which you want to set attributes.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-NewFriendlyName<String>

Specifies the new friendly name for the storage pool.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-OtherUsageDescription<String>

Specifies the OtherUsageDescription for the storage pool.

Aliases

NewOtherUsageDescription

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ProvisioningTypeDefault<ProvisioningType>

Specifies the default type of provisioning to use for virtual disks created in the specified storage pool. The acceptable values for this parameter are: Fixed or Thin.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ResiliencySettingNameDefault<String>

Specifies the default resiliency setting (also known as storage layout) to use for virtual disks the created in the specified storage pool. The supported resiliency settings vary by storage subsystem. Acceptable values for the Storage Spaces subsystem are Mirror, Parity, and Simple.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RetireMissingPhysicalDisks<RetireMissingPhysicalDisks>

Specifies that Windows should set the Usage property of physical disks missing from a storage pool to Retired.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ThinProvisioningAlertThresholds<UInt16[]>

Specifies how full a storage pool must get (in percent) before an alert is generated to add physical disks to the storage pool to support thinly provisioned virtual disks.

Aliases

none

Required?

false

Position?

named

Default Value

70

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ThrottleLimit<Int32>

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-UniqueId<String>

Specifies the UniqueID of the storage pool for which you want to set attributes.

Aliases

Id

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Usage<Usage>

Specifies the usage setting for the storage pool. The acceptable values for this parameter are: Other, ReservedAsDeltaReplicaContainer, ReservedForComputerSystem, ReservedForLocalReplicationServices, ReservedForMigrationServices, ReservedForRemoteReplicationServices, ReservedForSparing, and Unrestricted.

Aliases

NewUsage

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_StoragePool

    You can pipe one or more MSFT_StoragePool objects to the InputObject parameter.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • None

Notes

  • The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after the pound sign (#) provides the namespace and class name for the underlying WMI object.

Examples

Example 1: Change the friendly name

This example changes the friendly name of StoragePool to StoragePool2.

PS C:\> Set-StoragePool -FriendlyName StoragePool -NewFriendlyName StoragePool2

Example 2: Make a read-only storage pool writeable

This example makes the storage pool named Storage Pool 1 writable when it is in a read-only state.

PS C:\> Set-StoragePool -FriendlyName "Storage Pool 1" -IsReadOnly $False

Example 3: Set the default resiliency and provisioning settings

This example makes any new virtual disks by default use the Mirror resiliency setting and thin provisioning.

PS C:\> Set-StoragePool -FriendlyName "Storage Pool 1" -ResiliencySettingsNameDefault Mirror -ProvisioningTypeDefault Thin

Get-StoragePool

New-StoragePool

Remove-StoragePool