Update-CMApplicationStatistic

Updates the statistics for an application.

Syntax

Update-CMApplicationStatistic
      [-InputObject] <IResultObject>
      [-PassThru]
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-CMApplicationStatistic
      [-Id] <Int32>
      [-PassThru]
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-CMApplicationStatistic
      [-Name] <String>
      [-PassThru]
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Update-CMApplicationStatistic cmdlet updates the statistics for a Configuration Manager application.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1: Update statistics for an application by ID

PS XYZ:\>Update-CMApplicationStatistic -Id "16781415"

This command updates statistics for an application that has the ID 16781415.

Example 2: Update statistics for an application by name

PS XYZ:\>Update-CMApplicationStatistic -Name "Test"

This command updates statistics for an application named Test.

Example 3: Update statistics for an application by name by using a variable

PS XYZ:\> $App = Get-CMApplication -Name "Test"
PS XYZ:\> Update-CMApplicationStatistic -InputObject $App

The first command gets the application object named Test and stores the object in the $App variable.

The second command updates statistics for the application stored in $App.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

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

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

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

-Id

Specifies an array of IDs of applications.

Type:Int32
Aliases:CIId, CI_ID
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Specifies a Configuration Manager application statistic object.

Type:IResultObject
Aliases:Application
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

Specifies an array of names of applications.

Type:String
Aliases:LocalizedDisplayName, ApplicationName
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

Add this parameter to return an object that represents the item with which you're working. By default, this cmdlet may not generate any output.

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet doesn't run.

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

Inputs

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

System.Object