Share via


Set-SCStorageLogicalUnit

Applies To: System Center 2012 - Virtual Machine Manager

Set-SCStorageLogicalUnit

Updates the metadata of a storage logical unit object.

Syntax

Parameter Set: Default
Set-SCStorageLogicalUnit [-StorageLogicalUnit] <StorageLogicalUnit> [-Description <String> ] [-JobVariable <String> ] [-LogicalUnitCopySource <StorageLogicalUnit> ] [-Name <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [-VMHostGroup <HostGroup> ] [-WorkloadType <StorageLogicalUnitWorkloadType> ] [ <CommonParameters>]

Detailed 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

-Description<String>

States a description for the specified object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-JobVariable<String>

Specifies that job progress is tracked and stored in the variable named by this parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-LogicalUnitCopySource<StorageLogicalUnit>

Specifies a storage logical unit from which a clone is copied.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of a VMM object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PROTipID<Guid>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-StorageLogicalUnit<StorageLogicalUnit>

Specifies a storage logical unit object.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-VMHostGroup<HostGroup>

Specifies a virtual machine host group object or an array of host group objects.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WorkloadType<StorageLogicalUnitWorkloadType>

Specifies a storage logical unit workload type. Valid values are: Shared, Dedicated.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs

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

Outputs

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

Examples

1: Update the name of a storage 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".

PS C:\> $LogicalUnit = Get-SCStorageLogicalUnit -Name "LUN01"
PS C:\> Set-SCStorageLogicalUnit -StorageLogicalUnit $LogicalUnit -Name "New Name for Logical Unit"

2: Allocate storage to a host group.

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.

PS C:\> $LU = Get-SCStorageLogicalUnit -Name "LUN01"
PS C:\> $HostGroup = Get-SCVMHostGroup -Name "All Hosts"
PS C:\> Set-SCStorageLogicalUnit -StorageLogicalUnit $LU -VMHostGroup $HostGroup

Get-SCStorageLogicalUnit

New-SCStorageLogicalUnit

Register-SCStorageLogicalUnit

Remove-SCStorageLogicalUnit

Unregister-SCStorageLogicalUnit