Disconnect-VirtualDisk
Disconnect-VirtualDisk
Disconnects a virtual disk from the specified computer, revoking access to the virtual disk.
構文
Parameter Set: ByFriendlyName
Disconnect-VirtualDisk [-FriendlyName] <String[]> [-AsJob] [-CimSession <CimSession[]> ] [-PassThru] [-StorageNodeName <String> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
Parameter Set: ByName
Disconnect-VirtualDisk -Name <String[]> [-AsJob] [-CimSession <CimSession[]> ] [-PassThru] [-StorageNodeName <String> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
Parameter Set: ByUniqueId
Disconnect-VirtualDisk -UniqueId <String[]> [-AsJob] [-CimSession <CimSession[]> ] [-PassThru] [-StorageNodeName <String> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
Parameter Set: InputObject (cdxml)
Disconnect-VirtualDisk -InputObject <CimInstance[]> [-AsJob] [-CimSession <CimSession[]> ] [-PassThru] [-StorageNodeName <String> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
詳細説明
The Disconnect-VirtualDisk cmdlet disconnects a virtual disk from the specified computer, revoking access to the virtual disk.
To disconnect a virtual disk from a remote computer, from a management node in a subsystem that is registered on the management node, specify the StorageNodeName parameter.
パラメーター
-AsJob
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-CimSession<CimSession[]>
リモート セッションまたはリモート コンピューターでコマンドレットを実行します。New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など、コンピューター名またはセッション オブジェクトを入力します。既定値は、ローカル コンピューターで実行中の現在のセッションです。
エイリアス |
Session |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-FriendlyName<String[]>
Specifies the friendly name of the virtual disk to disconnect.
エイリアス |
なし |
必須? |
true |
位置は? |
1 |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-InputObject<CimInstance[]>
Specifies the VirtualDisk object to disconnect. Enter a VirtualDisk CIM object, which you can get by using the Get-VirtualDisk cmdlet.
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
-Name<String[]>
Specifies the name of the virtual disk to disconnect.
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-PassThru
Specifies that the cmdlet should output an object representing the disconnected virtual disk. By default, this cmdlet does not generate any output.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-StorageNodeName<String>
Specifies the name of a computer. The cmdlet disconnects the virtual disk from the computer that you specify.
Use this parameter only when you run the cmdlet from a management node to disconnect a virtual disk from a remote cluster subsystem.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-ThrottleLimit<Int32>
このコマンドレットを実行するために確立できる最大同時操作数を指定します。このパラメーターを省略するか、値として 0
を入力した場合、Windows PowerShell® では、コンピューターで実行している CIM コマンドレットの数に基づいて、コマンドレットに対する最適なスロットル制限を計算します。スロットル制限は現在のコマンドレットのみに適用され、セッションまたはコンピューターには適用されません。
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-UniqueId<String[]>
Specifies the UniqueID of the virtual disk to disconnect.
エイリアス |
Id |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
<CommonParameters>
このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_VirtualDisk
You can use the pipeline operator to pass an array of VirtualDisk objects to the InputObject parameter to specify one or more virtual disks to disconnect.
出力
出力型は、コマンドレットによって生成されるオブジェクトの型です。
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_VirtualDisk
The Disconnect-VirtualDisk cmdlet does not output objects unless you use the Passthru parameter, in which case it outputs objects that represent the virtual disks that you disconnected.
注
Microsoft.Management.Infrastructure.CimInstance
オブジェクトは、Windows Management Instrumentation (WMI) オブジェクトを表示するラッパー クラスです。シャープ記号 (#
) の後のパスは、基になる WMI オブジェクトの名前空間とクラス名です。
例
Example 1: Disconnect a virtual disk by friendly name
This example disconnects a virtual disk named VirtualDisk01 from the local machine to prevent futher access to the virtual disk.
PS C:\> Disconnect-VirtualDisk -FriendlyName VirtualDisk01
Example 2: Disconnect a virtual disk from a remote computer from a management node
This command disconnects a virtual disk to from remote computer from a management node in a subsystem that is registered on the management node.
PS C:\> Get-StorageSubSystem –FriendlyName "Clustered Storage Spaces on Cluster01" | Get-VirtualDisk –FriendlyName "VDisk01" | Disconnect-VirtualDisk –StorageNodeName "ClustNode1"