Filtering the output

This topic contains 2 replies, has 3 voices, and was last updated by  Fredrik Kacsmarck 1 year ago.

  • Author
  • #70002


    $Status=invoke-command -ComputerName "" {bpimagelist -U -client -hoursago 1 }

    $Status gives me the below output, however couldn't filter it as Policy and Sched Type

    Backed Up Expires Files KB C Sched Type On Hold Policy
    —————- ———- ——– ——– – ————— ——- ————
    05/03/2017 01:00 07/04/2017 13158 4567 N Differential In 0 INT_DFS

    Some one please help!

  • #70011

    Max Kozlov

    Use ConvertFrom-Csv with appropriate parameters

    (-Delimiter, may be -Header if you want skip first two lines)

  • #70014

    Fredrik Kacsmarck

    What do you mean by filtering in this case?

    Just to output those two values or sorting or?
    What have you tried so far?

    Also what you can do and how you need to solve it may also depend on the datatype of status.
    So if you do:


    I would guess that bpimagelist is command line program and not a powershell command?
    In that case $status is most likely just a string and not an array or hashtable.
    So you would need to process the string to get the information the way you want it and so forth.


You must be logged in to reply to this topic.