Filtering the output

Welcome Forums General PowerShell Q&A Filtering the output

This topic contains 2 replies, has 3 voices, and was last updated by

1 year, 9 months ago.

  • Author
  • #70002

    Points: 0
    Rank: Member

    $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

    Points: 0
    Rank: Member

    Use ConvertFrom-Csv with appropriate parameters

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

  • #70014

    Points: 305
    Helping Hand
    Rank: Contributor

    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.


The topic ‘Filtering the output’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort