Citrix Daas SDK

Get-ProvVMConfiguration

Gets the custom configuration properties for virtual machines created using Machine Creation Services.

Syntax

Get-ProvVMConfiguration
   [-ProvisioningSchemeUid <Guid>]
   [[-ProvisioningSchemeName] <String>]
   [-VMName <String>]
   [-VMId <String>]
   [-Version <Int32>]
   [-ReturnTotalRecordCount]
   [-MaxRecordCount <Int32>]
   [-Skip <Int32>]
   [-SortBy <String>]
   [-Filter <String>]
   [-FilterScope <Guid>]
   [<CitrixCommonParameters>]
   [<CommonParameters>]
<!--NeedCopy-->

Description

Provides the ability to list current configuration properties for virtual machines created using Machine Creation Services.

The returned list of properties details what has been applied to VMs specifically with Set-ProvVM. It does not consistute the full set of properties VMs will have when the configuration is applied, to view that information use Get-ProvVMConfigurationResultantSet

Examples

EXAMPLE 1

Configuration is listed on the ProvScheme. Get-ProvVMConfiguration is used to obtain configuration data for all machines in example-catalog. Compare with Example 1 under Get-ProvVMConfigurationResultantSet

Get-ProvScheme -ProvisioningSchemeName example-catalog | select ProvisioningSchemeName, ServiceOffering, CustomProperties
ProvisioningSchemeName : example-catalog
ServiceOffering        : serviceoffering.folder\Standard_D2_v3.serviceoffering
CustomProperties       : <CustomProperties xmlns="http://schemas.citrix.com/2014/xd/machinecreation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                         <Property xsi:type="StringProperty" Name="SchemaVersion" Value="2" />
                         <Property xsi:type="StringProperty" Name="UseManagedDisks" Value="true" />
                         <Property xsi:type="StringProperty" Name="OsType" Value="Windows" />
                         </CustomProperties>
...

Get-ProvVMConfiguration -ProvisioningSchemeName example-catalog

            AdAccountSid                  : S-1-5-21-1369695582-2951410066-511316603-110984
            ConfigurationCreatedTimeInUTC : 1/21/2025 2:04:38 AM
            ConfigurationInfo             : Base level configuration with no personalization, created during new provisioned vm
            CpuCount                      :
            CustomProperties              :
            LastAppliedTimeInUTC          : 1/21/2025 2:04:38 AM
            MachineProfile                :
            MemoryInMB                    :
            NetworkMaps                   : {}
            ProvisioningSchemeName        : test
            ProvisioningSchemeUid         : 4091679f-4e34-4396-adac-0cf124159694
            ServiceOffering               :
            State                         : InUse
            VMId                          : 42268c88-47bc-b606-19cf-4cd047dc4811
            VMMetadata                    :
            VMName                        : new02
            Version                       : 0
            WriteBackCacheDiskSize        :
            WriteBackCacheMemorySize      :
<!--NeedCopy-->

Parameters

-ProvisioningSchemeUid

The unique identifier of the provisioning scheme.

Type: Guid
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: True

-VMName

The name of the VM in the hypervisor.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: True

-VMId

The ID of the VM in the hypervisor.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: True

-Version

The version of the machine configuration.

Type: Int32
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-ReturnTotalRecordCount

See about_Prov_Filtering for details.

Type: SwitchParameter
Position: Named
Default value: False
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-MaxRecordCount

See about_Prov_Filtering for details.

Type: Int32
Position: Named
Default value: False
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-Skip

See about_Prov_Filtering for details.

Type: Int32
Position: Named
Default value: 0
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-SortBy

See about_Prov_Filtering for details.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-Filter

See about_Prov_Filtering for details.

Type: String
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-FilterScope

Gets only results allowed by the specified scope id.

Type: Guid
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-ProvisioningSchemeName

The name of the provisioning scheme.

Type: String
Position: 2
Default value: None
Required: False
Accept pipeline input: False
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.ProvisionedMachineConfiguration

The object has the following properties:

Version <int>

The current version of the configuration

CpuCount <int>

The number of processors allocated to the VM.

MemoryInMB <int>

The maximum amount of memory allocated to the VM.

CustomProperties <string>

Properties of the provisioning scheme which that are specific to the target hosting infrastructure. (See about_Prov_CustomProperties)

ServiceOffering <string>

The service offering that the scheme uses when creating VMs in cloud hypervisors.

MachineProfile <string>

The inventory path to the source VM used by the provisioning scheme as a template.

VMMetadata <char[]>

The metadata that will be used to created VMs in a plain text format.

ProvisioningSchemeName <string>

The name of the provisioning scheme associated with the VM.

ProvisioningSchemeUid <Guid>

The unique identifier of the provisioning scheme associated with the VM.

VMId <string>

The identifier for the VM in the hypervisor.

VMName <string>

The name of the VM in the hypervisor.

ConfigurationCreatedTimeInUTC < datetime>

Time in UTC when the configuration was created

LastAppliedTimeInUTC < datetime>

Time in UTC when the configuration was applied most recently

WriteBackCacheDiskSize < int>

Specifies the size in Gigabytes of the disk to use as a Write Back Cache when UseWriteBackCache is set during the Provisioning Scheme creation. This parameter can only be set or modified if the Provisioning Scheme was previously created with UseWriteBackCache. This parameter only applies to newly created VMs and does not affect VMs which have already been created from the Provisioning Scheme.Setting this parameter to 0 is not allowed.

WriteBackCacheMemorySize < int>

Specifies the size in Megabytes of the memory to use as a Write Back Cache when UseWriteBackCache is set during the Provisioning Scheme creation. This parameter can only be set or modified if the Provisioning Scheme was previously created with UseWriteBackCache. This parameter only applies to newly created VMs and does not affect VMs which have already been created from the Provisioning Scheme

ConfigurationInfo < string>

Detailed information about the configuration created

ADAccountSid < string>

Unique Sid of the provisioned virtual machine

NetworkMaps < string>

Specifies how the attached NICs are mapped to networks. If this parameter is omitted, the current NICs setting of the provisioning scheme is not updated; otherwise the NICs setting is updated, and new machines will be created with the number of NICs specified in the map, with each NIC attached to the specified network. Cannot set to an empty value.

State < string>

Indicates if the configuration is actively applied

Get-ProvVMConfiguration