Edit

Share via


Get-AzConnectedVMwareInventoryItem

Implements InventoryItem GET method.

Syntax

List (Default)

Get-AzConnectedVMwareInventoryItem
    -ResourceGroupName <String>
    -VcenterName <String>
    [-SubscriptionId <String[]>]
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

GetViaIdentityVcenter

Get-AzConnectedVMwareInventoryItem
    -Name <String>
    -VcenterInputObject <IConnectedVMwareIdentity>
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

Get

Get-AzConnectedVMwareInventoryItem
    -Name <String>
    -ResourceGroupName <String>
    -VcenterName <String>
    [-SubscriptionId <String[]>]
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

GetViaIdentity

Get-AzConnectedVMwareInventoryItem
    -InputObject <IConnectedVMwareIdentity>
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

Description

Implements InventoryItem GET method.

Examples

Example 1: List Inventory Items in a resource group of a vcenter

Get-AzConnectedVMwareInventoryItem -ResourceGroupName "test-rg" -VcenterName "test-vc"
Name                SystemDataCreatedAt   SystemDataCreatedBy                  SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy             SystemDataLastModifiedByType Kind                   ResourceGroupName
----                -------------------   -------------------                  ----------------------- ------------------------ ------------------------             ---------------------------- ----                   -----------------
resgroup-713957     2/16/2023 3:54:14 PM  ac9dc5fe-b644-4832-9d03-d9f1ab70c5f7 Application             8/1/2023 5:27:42 AM      ac9dc5fe-b644-4832-9d03-d9f1ab70c5f7 Application                  ResourcePool           test-rg
resgroup-754929     2/16/2023 3:54:14 PM  ac9dc5fe-b644-4832-9d03-d9f1ab70c5f7 Application             8/1/2023 5:27:44 AM      ac9dc5fe-b644-4832-9d03-d9f1ab70c5f7 Application                  ResourcePool           test-rg
dvportgroup-1153526 2/16/2023 3:54:17 PM  ac9dc5fe-b644-4832-9d03-d9f1ab70c5f7 Application             8/1/2023 5:26:11 AM      ac9dc5fe-b644-4832-9d03-d9f1ab70c5f7 Application                  VirtualNetwork         test-rg
host-713958         2/16/2023 3:54:17 PM  ac9dc5fe-b644-4832-9d03-d9f1ab70c5f7 Application             8/1/2023 5:26:32 AM      ac9dc5fe-b644-4832-9d03-d9f1ab70c5f7 Application                  Host                   test-rg
vmtpl-vm-1085854    2/16/2023 3:54:17 PM  ac9dc5fe-b644-4832-9d03-d9f1ab70c5f7 Application             8/1/2023 5:29:46 AM      ac9dc5fe-b644-4832-9d03-d9f1ab70c5f7 Application                  VirtualMachineTemplate test-rg
datastore-563660    2/16/2023 3:54:17 PM  ac9dc5fe-b644-4832-9d03-d9f1ab70c5f7 Application             10/5/2023 5:15:03 PM     ac9dc5fe-b644-4832-9d03-d9f1ab70c5f7 Application                  Datastore              test-rg

This command list all the inventory items of vcenter test-vc in a resource group named test-rg.

Example 2: Get a specific Inventory Item

Get-AzConnectedVMwareInventoryItem -Name "vm-1528708" -VcenterName "test-vc" -ResourceGroupName "test-rg"
Id                           : /subscriptions/204898ee-cd13-4332-b9d4-55ca5c25496d/resourceGroups/test-rg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/test-vc/InventoryItems/vm-1528708
InventoryType                : VirtualMachine
Kind                         : VirtualMachine
ManagedResourceId            :
MoName                       : ArcVMwareTest-VM-e976dc7c
MoRefId                      : vm-1528708
Name                         : vm-1528708
Property                     : {
                                 "inventoryType": "VirtualMachine",
                                 "managedResourceId": "",
                                 "moRefId": "vm-1528708",
                                 "moName": "ArcVMwareTest-VM-e976dc7c",
                                 "provisioningState": "Succeeded",
                                 "osType": "Other",
                                 "ipAddresses": [ ],
                                 "folderPath": "ArcPrivateClouds-67",
                                 "powerState": "poweredOff"
                               }
ProvisioningState            : Succeeded
ResourceGroupName            : test-rg
SystemDataCreatedAt          : 10/5/2023 7:16:13 PM
SystemDataCreatedBy          : ac9dc5fe-b644-4832-9d03-d9f1ab70c5f7
SystemDataCreatedByType      : Application
SystemDataLastModifiedAt     : 10/5/2023 7:16:13 PM
SystemDataLastModifiedBy     : ac9dc5fe-b644-4832-9d03-d9f1ab70c5f7
SystemDataLastModifiedByType : Application
Type                         : microsoft.connectedvmwarevsphere/vcenters/inventoryitems

This command gets a Inventory Item named vm-1528708 in a resource group named test-rg.

Parameters

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Parameter properties

Type:PSObject
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzureRMContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Identity Parameter

Parameter properties

Type:IConnectedVMwareIdentity
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GetViaIdentity
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Name of the inventoryItem.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:InventoryItemName

Parameter sets

GetViaIdentityVcenter
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Get
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

The Resource Group Name.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

List
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Get
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SubscriptionId

The Subscription ID.

Parameter properties

Type:

String[]

Default value:(Get-AzContext).Subscription.Id
Supports wildcards:False
DontShow:False

Parameter sets

List
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Get
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VcenterInputObject

Identity Parameter

Parameter properties

Type:IConnectedVMwareIdentity
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

GetViaIdentityVcenter
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-VcenterName

Name of the vCenter.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

List
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Get
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

IConnectedVMwareIdentity

Outputs

IInventoryItem