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>]<br><br>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.
Related Commands¶
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'<br><br> C:\PS> $result<br><br> ProvisionedScheme ProvisionedImageVersion<br><br> ----------------- -----------------------<br><br> 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'<br><br> C:\PS> $result.ProvisionedScheme<br><br> Id Name Resource<br><br> -- ---- --------<br><br> 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'<br><br> C:\PS> $result.ProvisionedImageVersion<br><br> ImageStatus Id Name<br><br> ----------- -- ----<br><br> Deleted 92bd1cb2-4d16-43ad-8672-04b28889f072 /example.vm/example.snapshot<br><br> Current def7badc-4769-4c5d-93e1-2c20018dca26 /example.vm/example.snapshot<br><br> 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'<br><br> C:\PS> $result.ProvisionedImageVersion[1].Resource<br><br> Id ResourceType Metadata<br><br> -- ------------ --------<br><br> 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'<br><br> C:\PS> $result.ProvisionedImageVersion[1].Resource[0].Metadata<br><br> Key Value<br><br> --- -----<br><br> Role Base Disk<br><br> 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'<br><br> C:\PS> $result.ProvisionedVirtualMachine<br><br> Id Name Resource<br><br> -- ---- --------<br><br> 7141f207-844f-f271-a076-10258186bb52 ExampleVM01 {00000000-0000-0000-0000-000000000000, 539e7ebb-296f-4021-9faa-8614ff159e77, 00000000-000...<br><br> 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'<br><br> C:\PS> $result.ProvisionedVirtualMachine[0].Resource<br><br> Id ResourceType Metadata<br><br> -- ------------ --------<br><br> 00000000-0000-0000-0000-000000000000 Disk {Role, ParentDiskId, StorageId}<br><br> 539e7ebb-296f-4021-9faa-8614ff159e77 Disk {Role, StorageId}<br><br> 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'<br><br> C:\PS> $result.ProvisionedVirtualMachine[0].Resource[0].Metadata<br><br> Key Value<br><br> --- -----<br><br> Role OS Delta Disk<br><br> ParentDiskId 5eef2ad5-2b05-442c-a5b5-1a7e9ecaf36d<br><br> 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'<br><br> C:\PS> $result.ProvisionedVirtualMachine[0].Resource[1].Metadata<br><br> Key Value<br><br> --- -----<br><br> Role Identity Disk<br><br> 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'<br><br> C:\PS> $result.ProvisionedVirtualMachine[0].Resource[2].Metadata<br><br> Key Value<br><br> --- -----<br><br> Role PersonalVDisk<br><br> 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."