Unregister-SCStorageLogicalUnit
取消关联主机的逻辑单元。
语法
Unregister-SCStorageLogicalUnit
[-StorageLogicalUnit] <StorageLogicalUnit[]>
-JobGroup <Guid>
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Unregister-SCStorageLogicalUnit
[-StorageLogicalUnit] <StorageLogicalUnit[]>
[-JobGroup <Guid>]
-VM <VM[]>
[-RemoveVM <VM>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Unregister-SCStorageLogicalUnit
[-StorageLogicalUnit] <StorageLogicalUnit[]>
[-JobGroup <Guid>]
-StorageFileServer <StorageFileServer>
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Unregister-SCStorageLogicalUnit
[-StorageLogicalUnit] <StorageLogicalUnit[]>
[-JobGroup <Guid>]
-VMHost <Host>
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Unregister-SCStorageLogicalUnit
[-StorageLogicalUnit] <StorageLogicalUnit[]>
-VMHostCluster <HostCluster>
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Unregister-SCStorageLogicalUnit
[-StorageLogicalUnit] <StorageLogicalUnit[]>
-StorageInitiators <String[]>
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
说明
Unregister-SCStorageLogicalUnit cmdlet 将逻辑单元与主机取消关联。
示例
示例 1:隐藏主机的逻辑单元
PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost01"
PS C:\> $LU = Get-SCStorageLogicalUnit -Name "LUN01"
PS C:\> Unregister-SCStorageLogicalUnit -StorageLogicalUnit $LU -VMHost $VMHost
第一个命令获取名为 VMHost01 的主机对象,并将对象存储在$VMHost变量中。
第二个命令获取名为 LUN01 的存储逻辑单元对象,并将对象存储在$LU变量中。
最后一个命令从 VMHost01 注销 LUN01。
参数
-JobGroup
在运行最后一个包含相同作业组标识符的命令之前,为作为集合运行的一系列命令指定标识符。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | True |
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 |
-PROTipID
指定触发此操作 (PRO 提示) 的性能和资源优化提示的 ID。 此参数允许审核 PRO 提示。
Type: | Guid |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemoveVM
指定要删除的虚拟机对象。
Type: | VM |
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 |
-StorageFileServer
指定存储文件服务器对象。
Type: | StorageFileServer |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageInitiators
指定存储发起程序数组。
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageLogicalUnit
指定存储逻辑单元对象。
Type: | StorageLogicalUnit[] |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VM
指定一个虚拟机对象数组。
Type: | VM[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMHost
指定一个虚拟主机对象。 VMM 支持 Hyper-V 主机、VMware ESX 主机和 Citrix XenServer 主机。
有关每种类型的主机的详细信息,请参阅 Add-SCVMHost cmdlet。
Type: | Host |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VMHostCluster
指定 VMM 主机群集对象。
Type: | HostCluster |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |