Citrix Virtual Apps and Desktops SDK

Compare-ProvVMHardwareSettings

Introduced in: Citrix Virtual Apps and Desktop 7 2603

Gets information about virtual machines that have hardware configuration mismatches compared to their provisioning scheme template.

Syntax

Compare-ProvVMHardwareSettings
       [-ProvisioningSchemeName] <String>
       -VMName <String>
       [-SkipCertificateValidation]
       [<CitrixCommonParameters>]
       [<CommonParameters>]
<!--NeedCopy-->
Compare-ProvVMHardwareSettings
       [-ProvisioningSchemeUid] <Guid>
       -VMName <String>
       [-SkipCertificateValidation]
       [<CitrixCommonParameters>]
       [<CommonParameters>]
<!--NeedCopy-->

Description

Gets information about virtual machines that have hardware configuration mismatches compared to their provisioning scheme template. This cmdlet helps identify VMs that may have been manually modified or have drifted from their intended configuration, allowing administrators to detect and remediate configuration inconsistencies across their machine catalogs.

Examples

EXAMPLE 1

Retrieves VMs from a specific catalog using Get-BrokerMachine, extracts their MachineName values, and then checks for hardware setting mismatches between those VMs and their provisioning scheme template using Compare-ProvVMHardwareSettings.

$provisionedVms = Get-BrokerMachine -CatalogName 'manual-powermanaged-catalog'
$vmNames = $provisionedVms| Select-Object -ExpandProperty MachineName

$vmNames
vm1
vm2
vm3

$res = Compare-ProvVMHardwareSettings -ProvisioningSchemeName "MyProvScheme" -VMName "vm1"
<!--NeedCopy-->

Parameters

-VMName

The name of the VM in the hypervisor.

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

-ProvisioningSchemeUid

The unique identifier of the provisioning scheme.

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

-ProvisioningSchemeName

The name of the provisioning scheme containing the VM to check.

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

-SkipCertificateValidation

Forces the cmdlet to skip checking SSL certificates. By default, the cmdlet will check the certificate from the server. If the certificate is not valid, the cmdlet will not connect to the server.

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

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.VMHardwareSettingsDesync

Returns information about VMs that have hardware setting mismatches compared to their provisioning scheme template.

Compare-ProvVMHardwareSettings