description | external help file | Module Name | ms.date | online version | schema | title |
---|---|---|---|---|---|---|
Retrieves information about a device assigned to a virtual machine. |
Microsoft.HyperV.PowerShell.Cmdlets.dll-Help.xml |
Hyper-V |
06/12/2024 |
2.0.0 |
Get-VMAssignableDevice |
Retrieves information about the assignable device from a specific virtual machine.
Get-VMAssignableDevice [-CimSession <CimSession[]>] [-ComputerName <String[]>]
[-Credential <PSCredential[]>] [-VMName] <String[]> [-InstancePath <String>]
[-LocationPath <String>] [<CommonParameters>]
Get-VMAssignableDevice [-VM] <VirtualMachine[]> [-InstancePath <String>] [-LocationPath <String>]
[<CommonParameters>]
The Get-VMAssignableDevice
cmdlet retrieves information about the assignable devices that are
associated with a specific virtual machine (VM). This cmdlet can be used to list all assignable
devices that can be attached to a VM or to retrieve details about specific devices that are already
assigned. The retrieved information can include the device's instance path, location path, and
other relevant properties.
Get-VMAssignableDevice -VMName "MyVM"
This example retrieves all assignable devices associated with the virtual machine named MyVM.
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[]
Parameter Sets: VMName
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies one or more Hyper-V hosts from which the assignable devices are to be retrieved. NetBIOS
names, IP addresses, and fully qualified domain names are allowed. The default is the local
computer. Use localhost or a dot (.
) to specify the local computer explicitly.
Type: String[]
Parameter Sets: VMName
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Retrieves one or more user accounts that have permission to perform this action. The default is the current user.
Type: PSCredential[]
Parameter Sets: VMName
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Represents the Device Instance path in the host machine.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the location path to the assignable device
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Retrieves the virtual machine which a device is assigned.
Type: VirtualMachine[]
Parameter Sets: VMObject
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Retrieves the names of the assignable devices assigned to the specified virtual machine.
Type: String[]
Parameter Sets: VMName
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.