Set-SCStoragePool
修改 VMM 数据库中的存储池对象。
语法
Set-SCStoragePool
[-StorageClassification <StorageClassification>]
[-StoragePool] <StoragePool>
[-Name <String>]
[-Description <String>]
[-AddVMHostGroup <HostGroup[]>]
[-RemoveVMHostGroup <HostGroup[]>]
[-AddStoragePhysicalDisk <StoragePhysicalDisk[]>]
[-RemoveStoragePhysicalDisk <StoragePhysicalDisk[]>]
[-Optimize]
[-FaultDomainAwareness <FaultDomainAwarenessType>]
[-InterleaveDefaultKB <UInt64>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
说明
Set-SCStoragePool cmdlet 修改 Virtual Machine Manager (VMM) 数据库中的存储池对象。 可以更改存储池的属性,将 VMHostGroup 添加到存储池,或者从存储池中删除 VMHostGroup。
示例
示例 1:更改存储池的名称
PS C:\> $Pool = @(Get-SCStoragePool)[0]
PS C:\> Set-SCStoragePool -StoragePool $Pool -Name "New name of pool"
第一个命令获取所有存储池对象,并将其放置在数组中。 然后,该命令将第一项存储在$Pool变量的存储池数组中。
第二个命令将存储在$Pool变量中的存储池的名称更改为“池的新名称”。
示例 2:设置存储池的分类
PS C:\> $Pool = Get-SCStoragePool -ID "346e17e9-d50a-480e-8dec-c41d7e2125b0"
PS C:\> $Classification = Get-SCStorageClassification -Name "StorageClassification01"
PS C:\> Set-SCStoragePool -StoragePool $Pool -StorageClassification $Classification
第一个命令获取 ID 为 346e17e9-d50a-480e-8dec-c41d7e2125b0 的存储池对象,并将对象存储在$Pool变量中。
第二个命令获取名为 StorageClassification01 的存储分类对象,并将对象存储在$Classification变量中。
最后一个命令将存储在 $Classification (StorageClassification01) 中的存储分类与存储在$Pool中的存储池相关联。
参数
-AddStoragePhysicalDisk
指定要添加的物理磁盘对象的数组。
Type: | StoragePhysicalDisk[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AddVMHostGroup
指定此 cmdlet 添加到现有主机组数组或私有云的主机组数组。
Type: | HostGroup[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Description
说明指定对象。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FaultDomainAwareness
指定在此存储池中创建的新虚拟磁盘的默认容错域。 此参数的可接受值为:
- 1:PhysicalDisk
- 2:StorageEnclosure
- 3:节点
Type: | FaultDomainAwarenessType |
Accepted values: | NotSupported, PhysicalDisk, StorageEnclosure, StorageScaleUnit |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InterleaveDefaultKB
指定在此存储池中创建的新虚拟磁盘的默认交错大小(以 KB 为单位)。
Type: | UInt64 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-JobVariable
指定跟踪作业进度,并将其存储在此参数命名的变量中。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
指定 VMM 对象的名称。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Optimize
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PROTipID
指定触发此操作 (PRO 提示) 的性能和资源优化提示的 ID。 此参数允许审核 PRO 提示。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemoveStoragePhysicalDisk
指定要从此存储池中删除的物理磁盘数组。
Type: | StoragePhysicalDisk[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemoveVMHostGroup
指定此 cmdlet 从主机组数组或私有云中删除的主机组数组。
Type: | HostGroup[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RunAsynchronously
指示作业异步运行,以便控件立即返回到命令 shell。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageClassification
指定存储分类对象。
Type: | StorageClassification |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StoragePool
指定存储池对象。
Type: | StoragePool |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
输出
StoragePool
此 cmdlet 返回 StoragePool 对象。