Citrix Virtual Apps and Desktops SDK

Get-ProvOrphanedResource

Introduced in: Citrix Virtual Apps and Desktop 7 2305

Gets the list of orphaned resources created while schemes provisioning.

Syntax

Get-ProvOrphanedResource
   -HypervisorConnectionUid <Guid[]>
   [<CitrixCommonParameters>]
   [<CommonParameters>]
<!--NeedCopy-->

Description

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

Examples

EXAMPLE 1

Returns the orphaned resource objects

$pluginId = 'AzureRmFactory'
$connections = Get-ChildItem xdhyp:\connections | where { $_.PluginId -eq $pluginId }
$result = Get-ProvOrphanedResource -HypervisorConnectionUid $connections.HypervisorConnectionUid
$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-->

Parameters

-HypervisorConnectionUid

Connection Uids group to specific hypervisor.

Type: Guid[]
Position: Named
Default value: None
Required: True
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True

CitrixCommonParameters

This cmdlet supports the common Citrix parameters: -AdminAddress, -AdminClientIP, -BearerToken, -TraceParent, -TraceState and -VirtualSiteId. For more information, see about_CitrixCommonParameters.

CommonParameters

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

Inputs

None

You can’t pipe objects to this cmdlet.

Outputs

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:

  • The Id of hypervisor orphaned resource.
  • The ProvisioningSchemeId of hypervisor orphaned resource.
  • The resource type of hypervisor orphaned resource.
  • The hypervisor orphaned resource metadata.
Get-ProvOrphanedResource