PSPivotTable icon indicating copy to clipboard operation
PSPivotTable copied to clipboard

Use case needed

Open jdhitsolutions opened this issue 8 years ago • 1 comments

There doesn't seem to be a way to use the command to handle process objects. For example, I might collect data like this: $p = get-process -ComputerName chi-p50 It is very possible to have multiple instances of a process: $p | group -NoElement | sort count And want to display a table that looks like this

Process        WS   VM   Handles
a                   111   111    11111
b                    122  122   2222

These values would be sums.

jdhitsolutions avatar Jun 07 '16 21:06 jdhitsolutions

Here's another:

$vm = get-vm -computername chi-p50
$p | group -NoElement | sort count

This sort of works as I get a result:

Computername OFF RUNNING SAVED
------------ --- ------- -----
chi-p50        7      10     1

But there are also error messages: Method invocation failed because [Microsoft.HyperV.PowerShell.VMState] does not contain a method named 'toUpper'. At C:\scripts\PSPivotTable\PSPivotTable.psm1:296 char:8

  •    $_.ToUpper()} | Select-Object -unique
    
  •    ~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : MethodNotFound

Method invocation failed because [Microsoft.HyperV.PowerShell.VMState] does not contain a method named 'toUpper'. At C:\scripts\PSPivotTable\PSPivotTable.psm1:296 char:8

  •    $_.ToUpper()} | Select-Object -unique
    
  •    ~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : MethodNotFound

Method invocation failed because [Microsoft.HyperV.PowerShell.VMState] does not contain a method named 'toUpper'. At C:\scripts\PSPivotTable\PSPivotTable.psm1:296 char:8

  •    $_.ToUpper()} | Select-Object -unique
    
  •    ~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : MethodNotFound

Compare-Object : Cannot bind argument to parameter 'ReferenceObject' because it is null. At C:\scripts\PSPivotTable\PSPivotTable.psm1:359 char:54

  •                  Compare-Object -ReferenceObject $Unique -Differe ...
    
  •                                                  ~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Compare-Object], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.CompareObje ctCommand

jdhitsolutions avatar Jun 07 '16 21:06 jdhitsolutions