Get-ProvCostSummary
Introduced in: Citrix Virtual Apps and Desktop 7 2503
Get the cost summary.
Syntax
Get-ProvCostSummary
-ProvisioningSchemeUid <Guid>
[-SummaryType <SummaryType>]
-Start <DateTime>
-End <DateTime>
[-SkipCertificateValidation]
[<CitrixCommonParameters>]
[<CommonParameters>]
Get-ProvCostSummary
-HypervisorConnectionUid <Guid>
-HostedMachineIds <String[]>
-Start <DateTime>
-End <DateTime>
[-SkipCertificateValidation]
[<CitrixCommonParameters>]
[<CommonParameters>]
Description
Get the cost summarized by differnt types of resources, such as the cost of virtual machines, the cost of disks, etc.
Examples
EXAMPLE 1
Get the cost summary of the specified provisioning scheme and the cost is summarized by virtual machines.
$res = Get-ProvCostSummary -ProvisioningSchemeUid $provScheme.ProvisioningSchemeUid -Start $start -End $end
$res
ResourceCostItems Status
----------------- ------
{Citrix.MachineCreation.Sdk.ResourceCostItem, Citrix.MachineCreation.Sdk.ResourceCostItem, Citrix.MachineCreation.Sdk.ResourceCostItem}
PS C:\Users\hanw.CITRITE> $res.ResourceCostItems
Resource Cost Currency AdditionalData
-------- ---- -------- --------------
testgroup/vm1 0.657357407561623 USD
testgroup/vm2 0.641455672223132 USD
/subscriptions/subscriptionId/resourcegroups/testgroup/providers/microsoft.compute/snapshots/mc-basedisk-zczx5 0.13854085 USD
EXAMPLE 2
Get the cost summary of the specified virtual machines.
$res = Get-ProvCostSummary -HypervisorConnectionUid $hypervisorConnectionUid -HostedMachineIds $vmIds -Start $start -End $end
EXAMPLE 3
Get the cost summary of the specified provisioning scheme and the cost is summarized by disks.
$res = Get-ProvCostSummary -ProvisioningSchemeUid $provScheme.ProvisioningSchemeUid -SummaryType "Disk" -Start $start -End $end
$res.ResourceCostItems
Resource Cost Currency AdditionalData
-------- ---- -------- --------------
IdentityDisk 0.049687954 USD
OSDisk 0.2949408 USD
OtherStorage 0.13854085 USD
Parameters
-ProvisioningSchemeUid
The unique identifier of the provisioning scheme.
| Type: | Guid |
| Position: | Named |
| Default value: | None |
| Required: | True |
| Accept pipeline input: | False |
| Accept wildcard characters: | True |
-Start
The start date of the period for which the cost is calculated.
| Type: | DateTime |
| Position: | Named |
| Default value: | None |
| Required: | True |
| Accept pipeline input: | False |
| Accept wildcard characters: | True |
-End
The end date of the period for which the cost is calculated.
| Type: | DateTime |
| Position: | Named |
| Default value: | None |
| Required: | True |
| Accept pipeline input: | False |
| Accept wildcard characters: | True |
-HypervisorConnectionUid
The unique identifier of the hypervisor connection.
| Type: | Guid |
| Position: | Named |
| Default value: | None |
| Required: | True |
| Accept pipeline input: | False |
| Accept wildcard characters: | True |
-HostedMachineIds
The unique identifier of the hosted machine.
| Type: | String[] |
| Position: | Named |
| Default value: | None |
| Required: | True |
| Accept pipeline input: | False |
| Accept wildcard characters: | True |
-SummaryType
The summary type, such as 'VM', 'Disk', etc.
| Type: | SummaryType |
| Accepted values: | VM, Disk |
| Position: | Named |
| Default value: | None |
| Required: | False |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
-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 |
| Introduced in: | Citrix Virtual Apps and Desktop 7 2511 |
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.ResourceCost
This object provides details of the cost summary.
ResourceCostItems \<Citrix.MachineCreation.Sdk.ResourceCostItem\[\]\> The cost items for the virtual machines.
Status \<string\> The status of the cost calculation.