Skip to content

Get-Histogram - $Data vs Pipeline #2

@lansalot

Description

@lansalot

Your examples at https://github.com/nicholasdille/PowerShell-Statistics

PS C:\> $Processes = Get-Process
PS C:\> $Histogram = $Processes | Get-Histogram -Property WorkingSet64 -BucketWidth 50mb -BucketCount 10

cmdlet Get-Histogram at command pipeline position 1
Supply values for the following parameters:
Data[0]:
Get-Histogram : Cannot validate argument on parameter 'Data'. The argument is null, empty, or an element of the
argument collection contains a null value. Supply a collection that does not contain any null values and then try the
command again.
At line:1 char:14
+ ... Processes | Get-Histogram -Property WorkingSet64 -BucketWidth 50mb -B ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Get-Histogram], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Get-Histogram

Don't work - appears the cmdlet is expecting input via $Data instead of the pipeline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions