Unregister-SCStorageLogicalUnit

Disassociates a logical unit from a host.

Syntax

Unregister-SCStorageLogicalUnit [-StorageLogicalUnit] <StorageLogicalUnit[]> -JobGroup <Guid>
 [-JobVariable <String>] [-PROTipID <Guid>] [-RunAsynchronously] [<CommonParameters>]
Unregister-SCStorageLogicalUnit [-StorageLogicalUnit] <StorageLogicalUnit[]> [-JobGroup <Guid>]
 [-JobVariable <String>] [-PROTipID <Guid>] [-RunAsynchronously] -VMHost <Host> [<CommonParameters>]
Unregister-SCStorageLogicalUnit [-StorageLogicalUnit] <StorageLogicalUnit[]> [-JobGroup <Guid>]
 [-JobVariable <String>] [-PROTipID <Guid>] [-RemoveVM <VM>] [-RunAsynchronously] -VM <VM[]>
 [<CommonParameters>]
Unregister-SCStorageLogicalUnit [-StorageLogicalUnit] <StorageLogicalUnit[]> [-JobGroup <Guid>]
 [-JobVariable <String>] [-PROTipID <Guid>] [-RunAsynchronously] -StorageFileServer <StorageFileServer>
 [<CommonParameters>]
Unregister-SCStorageLogicalUnit [-StorageLogicalUnit] <StorageLogicalUnit[]> [-JobVariable <String>]
 [-PROTipID <Guid>] [-RunAsynchronously] -StorageInitiators <String[]> [<CommonParameters>]
Unregister-SCStorageLogicalUnit [-StorageLogicalUnit] <StorageLogicalUnit[]> [-JobVariable <String>]
 [-PROTipID <Guid>] [-RunAsynchronously] -VMHostCluster <HostCluster> [<CommonParameters>]

Description

The Unregister-SCStorageLogicalUnit cmdlet disassociates a logical unit from a host.

Examples

Example 1: Hide a logical unit from a host

PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost01"
PS C:\> $LU = Get-SCStorageLogicalUnit -Name "LUN01"
PS C:\> Unregister-SCStorageLogicalUnit -StorageLogicalUnit $LU -VMHost $VMHost

The first command gets the host object named VMHost01 and stores the object in the $VMHost variable.

The second command gets the storage logical unit object named LUN01 and stores the object in the $LU variable.

The last command unregisters LUN01 from VMHost01.

Parameters

-JobGroup

Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs.

Type:Guid
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-JobVariable

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

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RemoveVM

Specifies a virtual machine object to remove.

Type:VM
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.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StorageFileServer

Specifies a storage file server object.

Type:StorageFileServer
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StorageInitiators

Specifies an array of storage initiators.

Type:String[]
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StorageLogicalUnit

Specifies a storage logical unit object.

Type:StorageLogicalUnit[]
Required:True
Position:0
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-VM

Specifies an array of virtual machine objects.

Type:VM[]
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMHost

Specifies a virtual machine host object. VMM supports Hyper-V hosts, VMware ESX hosts, and Citrix XenServer hosts.

For more information about each type of host, see the Add-SCVMHost cmdlet.

Type:Host
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMHostCluster

Specifies a VMM host cluster object.

Type:HostCluster
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False