Skip to content

Get-Provresource

Gets the list of resources created for provisioning schemes, image versions, and virtual machines.

Syntax

Get-ProvResource -ProvisioningSchemeName <String> [-BearerToken <String>] [-TraceParent <String>] [-TraceState <String>] [-VirtualSiteId <String>] [-AdminAddress <String>] [<CommonParameters>]  

Get-ProvResource -ProvisioningSchemeUid <Guid> [-BearerToken <String>] [-TraceParent <String>] [-TraceState <String>] [-VirtualSiteId <String>] [-AdminAddress <String>] [<CommonParameters>]

Detailed Description

Let you retrieve the list of provisioning resources, such as disks created for a provisioning scheme, image versions, and virtual machines.

Parameters

Name Description Required? Pipeline Input Default Value
ProvisioningSchemeName The name of the provisioning scheme. true true (ByPropertyName)
ProvisioningSchemeUid The unique identifier of the provisioning scheme. true false
BearerToken Specifies the bearer token assigned to 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

Citrix.Machinecreation.Sdk.Provisioningscheme

You can pipe an object containing a parameter called 'ProvisioningSchemeName' to Get-ProvResource.

Return Values

Citrix.Machinecreation.Sdk.Provisionedresource

This object provides details of the provisioning scheme and contains the following information: ProvisionedScheme <Citrix.MachineCreation.Sdk.ProvisionedSchemeResource> An object containing provisioning scheme id, name, and resources attached to the provisioning scheme. ProvisionedImageVersion <Citrix.MachineCreation.Sdk.ProvisionedImageVersionResource[] > A list of objects containing provisioning scheme id, name, and resources attached to the provisioning image versions. ProvisionedVirtualMachine <Citrix.MachineCreation.Sdk.ProvisionedVirtualMachineResource[] > A list of objects containing provisioning scheme id, name, and resources attached to the provisioned virtual machines.

Notes

The Get-ProvResource cmdlet returns an object containing three sub-objects: o The provisioned scheme o Array of provisioned image versions o Array of provisioned virtual machines

Examples

Example 1

C:\PS> $result = Get-ProvResource -ProvisioningSchemeUid 'e9aa1cf8-b2a8-4c3c-a309-1d53f7882e92'  

                C:\PS> $result  

                ProvisionedScheme                                    ProvisionedImageVersion  

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

                Citrix.MachineCreation.Sdk.ProvisionedSchemeResource {/example.vm/example.snapshot, /example...

Description

Returns the ProvisionedScheme object, ProvisionedImageVersion object, and ProvisionedVirtualMachine object for the provisioning scheme ID "e9aa1cf8-b2a8-4c3c-a309-1d53f7882e92."

Example 2

C:\PS> $result = Get-ProvResource -ProvisioningSchemeUid 'e9aa1cf8-b2a8-4c3c-a309-1d53f7882e92'  

                C:\PS> $result.ProvisionedScheme  

                Id                                   Name                    Resource  

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

                e9aa1cf8-b2a8-4c3c-a309-1d53f7882e92 Example_Catalog

Description

Returns the Id, Name, and Resource of the ProvisionedScheme object for the provisioning scheme ID "e9aa1cf8-b2a8-4c3c-a309-1d53f7882e92."

Example 3

C:\PS> $result = Get-ProvResource -ProvisioningSchemeUid 'e9aa1cf8-b2a8-4c3c-a309-1d53f7882e92'  

                C:\PS> $result.ProvisionedImageVersion  

                ImageStatus Id                                   Name  

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

                Deleted     92bd1cb2-4d16-43ad-8672-04b28889f072 /example.vm/example.snapshot  

                Current     def7badc-4769-4c5d-93e1-2c20018dca26 /example.vm/example.snapshot  

                Deleted     9dca4d28-acc6-49c8-bdc4-94cc12b958ea /example.vm/example.snapshot

Description

Returns ImageStatus, ID, and Name of the ProvisionedImageVersion sub-object for the provisioning scheme ID "e9aa1cf8-b2a8-4c3c-a309-1d53f7882e92."

Example 4

C:\PS> $result = Get-ProvResource -ProvisioningSchemeUid 'e9aa1cf8-b2a8-4c3c-a309-1d53f7882e92'  

                C:\PS> $result.ProvisionedImageVersion[1].Resource  

                Id                                   ResourceType Metadata  

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

                0005f0fa-2f3f-4361-9103-5d9e6b9c656c Disk         {Role, StorageId}

Description

Returns the Resource (Id, ResourceType, and Metadata) of the ProvisionedImageVersion object for the provisioning scheme ID "e9aa1cf8-b2a8-4c3c-a309-1d53f7882e92."

Example 5

C:\PS> $result = Get-ProvResource -ProvisioningSchemeUid 'e9aa1cf8-b2a8-4c3c-a309-1d53f7882e92'  

                C:\PS> $result.ProvisionedImageVersion[1].Resource[0].Metadata  

                Key       Value  

                ---       -----  

                Role      Base Disk  

                StorageId 1a033f55-d552-5ba9-e364-2af7b859303e

Description

Returns the Metadata (Role and StorageId) of the resource of the ProvisionedImageVersion sub-object for the provisioning scheme ID "e9aa1cf8-b2a8-4c3c-a309-1d53f7882e92."

Example 6

C:\PS> $result = Get-ProvResource -ProvisioningSchemeUid 'e9aa1cf8-b2a8-4c3c-a309-1d53f7882e92'  

                C:\PS> $result.ProvisionedVirtualMachine  

                Id                                   Name        Resource  

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

                7141f207-844f-f271-a076-10258186bb52 ExampleVM01 {00000000-0000-0000-0000-000000000000, 539e7ebb-296f-4021-9faa-8614ff159e77, 00000000-000...  

                1f8cceed-1c6b-efb3-079e-486477e2b2c2 ExampleVM02 {00000000-0000-0000-0000-000000000000, 2574798c-014c-4457-9040-d040246c2dc8, 00000000-000...

Description

Returns ID, Name, and Resource of the provisioned virtual machines for the provisioning scheme ID "e9aa1cf8-b2a8-4c3c-a309-1d53f7882e92."

Example 7

C:\PS> $result = Get-ProvResource -ProvisioningSchemeUid 'e9aa1cf8-b2a8-4c3c-a309-1d53f7882e92'  

                C:\PS> $result.ProvisionedVirtualMachine[0].Resource  

                Id                                   ResourceType Metadata  

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

                00000000-0000-0000-0000-000000000000 Disk         {Role, ParentDiskId, StorageId}  

                539e7ebb-296f-4021-9faa-8614ff159e77 Disk         {Role, StorageId}  

                00000000-0000-0000-0000-000000000000 Disk         {Role, StorageId}

Description

Returns the Resource (Id, ResourceType, and Metadata) of the ProvisionedVirtualMachine object for the provisioning scheme ID "e9aa1cf8-b2a8-4c3c-a309-1d53f7882e92."

Example 8

C:\PS> $result = Get-ProvResource -ProvisioningSchemeUid 'e9aa1cf8-b2a8-4c3c-a309-1d53f7882e92'  

                C:\PS> $result.ProvisionedVirtualMachine[0].Resource[0].Metadata  

                Key          Value  

                ---          -----  

                Role         OS Delta Disk  

                ParentDiskId 5eef2ad5-2b05-442c-a5b5-1a7e9ecaf36d  

                StorageId    1a033f55-d552-5ba9-e364-2af7b859303e

Description

Returns the Metadata (Role, ParentDiskID, and StorageId for OS Delta Disk) of the Resource of the ProvisionedVirtualMachine object for the provisioning scheme ID "e9aa1cf8-b2a8-4c3c-a309-1d53f7882e92."

Example 9

C:\PS> $result = Get-ProvResource -ProvisioningSchemeUid 'e9aa1cf8-b2a8-4c3c-a309-1d53f7882e92'  

                C:\PS> $result.ProvisionedVirtualMachine[0].Resource[1].Metadata  

                Key       Value  

                ---       -----  

                Role      Identity Disk  

                StorageId 1a033f55-d552-5ba9-e364-2af7b859303e

Description

Returns the Metadata (Role and StorageId for Identity Disk) of the Resource of the ProvisionedVirtualMachine object for the provisioning scheme ID "e9aa1cf8-b2a8-4c3c-a309-1d53f7882e92."

Example 10

C:\PS> $result = Get-ProvResource -ProvisioningSchemeUid 'e9aa1cf8-b2a8-4c3c-a309-1d53f7882e92'  

                C:\PS> $result.ProvisionedVirtualMachine[0].Resource[2].Metadata  

                Key       Value  

                ---       -----  

                Role      PersonalVDisk  

                StorageId

Description

Returns the Metadata (Role and StorageId for Personal Virtual Disk) of the Resource of the ProvisionedVirtualMachine object for the provisioning scheme ID "e9aa1cf8-b2a8-4c3c-a309-1d53f7882e92."

Was this article helpful?