Citrix Virtual Apps and Desktops SDK

Test-ProvInventoryItem

Check if an inventory item can be used as an input for machine profile.

Syntax


Test-ProvInventoryItem -HostingUnitName <String> -InventoryPath <String> [-BearerToken <String>] [-TraceParent <String>] [-TraceState <String>] [-VirtualSiteId <String>] [-AdminAddress <String>] [<CommonParameters>]

Test-ProvInventoryItem -HostingUnitUid <Guid> -InventoryPath <String> [-BearerToken <String>] [-TraceParent <String>] [-TraceState <String>] [-VirtualSiteId <String>] [-AdminAddress <String>] [<CommonParameters>]

<!--NeedCopy-->

Detailed Description

Provides the ability to validate if an inventory item can be used as an input for the MachineProfile parameter while creating or updating a provisioning scheme.

Parameters

Name Description Required? Pipeline Input Default Value
HostingUnitName The name of the hosting unit used for the provisioning scheme. true false  
HostingUnitUid The identifier for the hosting unit used for the provisioning scheme. true false  
InventoryPath The inventory path to be validated as a machine profile. 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

Return Values

Citrix.Machinecreation.Sdk.Inventoryitemvalidationresult

This object provides a validation error message from the inventory item and contains the following information:

  • ErrorMessage <string> String describing a validation error from the inventory item.

Notes

In the case of failure, the following errors can result.

CommunicationError An error occurred while communicating with the service.
PermissionDenied The user does not have administrative rights to perform this operation.
ConfigurationLoggingError The operation could not be performed because of a configuration logging error
ExceptionThrown An unexpected error occurred.  For more details, see the Windows event logs on the controller being used or Citrix Virtual Apps and Desktops logs.

Examples

Example 1


Test-ProvInventoryItem -HostingUnitName MyHostUnitName -InventoryPath MyInventoryItem

<!--NeedCopy-->

Description

Validate an inventory item with the name of the hosting unit

Example 2


Test-ProvInventoryItem -HostingUnitUid MyHostUnitUid -InventoryPath MyInventoryItem

<!--NeedCopy-->

Description

Validate an inventory item with the identifier for the hosting unit

Test-ProvInventoryItem