Citrix Virtual Apps and Desktops 2305 SDK

Get-ProvOrphanedResource

Gets the list of orphaned resources created while schemes provisioning.

Syntax


Get-ProvOrphanedResource -HypervisorConnectionUid <Guid[]> [-BearerToken <String>] [-AdminClientIP <String>] [-TraceParent <String>] [-TraceState <String>] [-VirtualSiteId <String>] [-AdminAddress <String>] [<CommonParameters>]

<!--NeedCopy-->

Detailed Description

Let you retrieve the list of orphaned provisioning resources, such as disks, snapshots, galleries, virtual machines and network interfaces etc.

Parameters

Name Description Required? Pipeline Input Default Value
HypervisorConnectionUid Connection Uids group to specific hypervisor. true true (ByPropertyName)  
BearerToken Specifies the bearer token assigned to the calling user false false  
AdminClientIP Specifies the Client IP of the calling user false false  
TraceParent Specifies the trace parent assigned for internal diagnostic tracing use false false  
TraceState Specifies the trace state assigned for internal diagnostic tracing user false false  
VirtualSiteId Specifies the virtual site the PowerShell snap-in will connect to. false false  
AdminAddress The address of a Citrix Virtual Apps and Desktops controller the PowerShell snap-in will connect to. You can provide this as a host name or an IP address. false false Localhost. Once a value is provided by any cmdlet, this value becomes the default.

Input Type

Return Values

Citrix.Machinecreation.Sdk.Hypresource

This object provides details of hypervisor orphaned resource.

  • Id <string> An Id of hypervisor orphaned resource.

  • ResourceType <string> Resource type of hypervisor orphaned resource.

  • ProvisioningSchemeId <string> ProvisioningSchemeId of hypervisor orphaned resource.

  • Metadata <Citrix.MachineCreation.Sdk.ProvisionedResourceMetadata[]> Hypervisor resource orphaned metadata key/value.

Notes

The Get-ProvOrphanedResource cmdlet returns an object containing three sub-objects: o The Id of hypervisor orphaned resource. o The ProvisioningSchemeId of hypervisor orphaned resource. o The resource type of hypervisor orphaned resource. o The hypervisor orphaned resource metadata.

Examples

Example 1


C:\PS> $pluginId = 'AzureRmFactory'

                    C:\PS> $connections = Get-ChildItem xdhyp:\connections | where { $_.PluginId -eq $pluginId }

                    C:\PS> $result = Get-ProvOrphanedResource -HypervisorConnectionUid $connections.HypervisorConnectionUid

                    C:\PS> $result

                    resourceId                                                                                                                                                                            ResourceType               ProvisioningSchemeId                    Metadata

                    -----------------                                                                                                                                                                     ------------               --------                                --------

                    {/subscriptions/3fd5967f-7152-46c4-b061-2bd5d0cad70c/resourceGroups/citrix-xd-66575601-158f-48f1-a013-9c85e5f10c21-9peif/providers/Microsoft.Compute/snapshots/AZMC01-baseDisk-vy3ov} microsoft.compute/disks    d5a53d4e-dc8b-416a-80ce-8eef5eb2256f

<!--NeedCopy-->

Description

Returns the orphaned resource objects

Get-ProvOrphanedResource