Set-SCStorageLogicalUnit

Updates the metadata of a storage logical unit object.

Description

The Set-SCStorageLogicalUnit cmdlet updates the metadata of a storage logical unit object. Set-SCStorageLogicalUnit does not modify the data on the logical unit itself.

For more information about Set-SCStorageLogicalUnit, type: "Get-Help Set-SCStorageLogicalUnit -online".

Parameters

StorageLogicalUnit

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a storage logical unit object.

Description

Required? false
Accept Pipeline Input? false
Position? named
States a description for the specified object.

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

LogicalUnitCopySource

Required? false
Accept Pipeline Input? false
Position? named
Specifies a storage logical unit from which a clone is copied.

Name

Required? false
Accept Pipeline Input? false
Position? named
Specifies the name of a VMM object.

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

VMHostGroup

Required? false
Accept Pipeline Input? false
Position? named
Specifies a virtual machine host group object or an array of host group objects.

WorkloadType

Required? false
Accept Pipeline Input? false
Position? named
Specifies a storage logical unit workload type. Valid values are: Shared, Dedicated.

Examples

1: Update the name of a storage logical unit.
PS C:\> $LogicalUnit = Get-SCStorageLogicalUnit -Name "LUN01"
PS C:\> Set-SCStorageLogicalUnit -StorageLogicalUnit $LogicalUnit -Name "New Name for Logical Unit"
The first command gets the logical unit object named LUN01 and stores the object in the $LogicalUnit variable.

The second command changes the name of the logical unit object stored in $LogicalUnit to "New Name for Logical Unit".
2: Allocate storage to a host group.
PS C:\> $LU = Get-SCStorageLogicalUnit -Name "LUN01"
PS C:\> $HostGroup = Get-SCVMHostGroup -Name "All Hosts"
PS C:\> Set-SCStorageLogicalUnit -StorageLogicalUnit $LU -VMHostGroup $HostGroup
The first command gets the storage logical unit object named LUN01 and stores the object in the $LU variable

The second command gets the host group object named All Hosts and stores the object in the $HostGroup variable.

The last command allocates LUN01 to host group All Hosts.

See Also