Adds a incrementing integer property to each pipeline object.
Add-Counter.ps1 [[-PropertyName] <String>] [[-InitialValue] <Int32>] -InputObject <PSObject> [-Force]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Get-PSProvider |Add-Counter Position |select Position,Name
Position Name ——– —- 1 Registry 2 Alias 3 Environment 4 FileSystem 5 Function 6 Variable 7 Certificate
The name of the property to add.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: Counter
Accept pipeline input: False
Accept wildcard characters: False
The starting number to count from.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: 1
Accept pipeline input: False
Accept wildcard characters: False
The object to add the property to.
Type: PSObject
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Overwrites a property if one with the same name already exists.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.