Show-VirtualDisk
Makes a virtual disk available to a host.
Syntax
Show-VirtualDisk
[-FriendlyName] <String[]>
[-TargetPortAddresses <String[]>]
[-InitiatorAddress <String>]
[-HostType <HostType>]
[-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>]
[-AsJob]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Show-VirtualDisk
-UniqueId <String[]>
[-TargetPortAddresses <String[]>]
[-InitiatorAddress <String>]
[-HostType <HostType>]
[-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>]
[-AsJob]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Show-VirtualDisk
-Name <String[]>
[-TargetPortAddresses <String[]>]
[-InitiatorAddress <String>]
[-HostType <HostType>]
[-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>]
[-AsJob]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Show-VirtualDisk
-InputObject <CimInstance[]>
[-TargetPortAddresses <String[]>]
[-InitiatorAddress <String>]
[-HostType <HostType>]
[-CimSession <CimSession[]>]
[-ThrottleLimit <Int32>]
[-AsJob]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Show-VirtualDisk cmdlet makes a virtual disk available to a host (by initiator and target ports). This cmdlet is equivalent to a VDS unmask operation.
Examples
Example 1: Make a virtual disk available to the local computer
PS C:\> $initaddress = (Get-InitiatorPort)
PS C:\> $tarport = (Get-TargetPort)
PS C:\> Show-VirtualDisk -FriendlyName "SQLData_27a" -TargetPortAddresses $tarport.NodeAddress -InitiatorAddress $initaddress.NodeAddress
This example makes the "SQLData_27a" virtual disk available to all initiators and target ports of the local computer.
Parameters
-AsJob
Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CimSession
Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.
Type: | CimSession[] |
Aliases: | Session |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FriendlyName
Specifies the friendly name of the virtual disk to make available to the specified hosts.
Type: | String[] |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-HostType
Specifies the operating system of the host computer.
Type: | HostType |
Accepted values: | Unknown, Other, Standard, Solaris, HPUX, OpenVMS, Tru64, Netware, Sequent, AIX, DGUX, Dynix, Irix, CiscoISCSIStorageRouter, Linux, MicrosoftWindows, OS400, TRESPASS, HIUX, VMwareESXi, MicrosoftWindowsServer2008, MicrosoftWindowsServer2003 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InitiatorAddress
Specifies the address for an initiator to which the virtual disk should be unmasked.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Specifies the input object that is used in a pipeline command.
Type: | CimInstance[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Specifies the name of the virtual disk to make available to the specified hosts.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PassThru
Specifies that the cmdlet should output an object representing the virtual disk it unmasked. By default, this cmdlet does not generate any output.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TargetPortAddresses
Specifies one or more target port addresses to which the virtual disk should be unmasked.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ThrottleLimit
Specifies the maximum number of concurrent operations that can be established to run the cmdlet.
If this parameter is omitted or a value of 0
is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer.
The throttle limit applies only to the current cmdlet, not to the session or to the computer.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-UniqueId
Specifies the UniqueID of the virtual disk to make available to the specified host.
Type: | String[] |
Aliases: | Id |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
You can pipe an MSFT_VirtualDisk object to the InputObject parameter.
Outputs
If you specify the PassThru parameter, this cmdlet outputs an object representing the virtual disk you made available to a host computer.
Notes
- When used in Failover Cluster, cmdlets from the Storage module operate on cluster level (all servers in the cluster).