PowerShell Filter

Handian Sudianto 5,161 Reputation points
2024-07-19T06:39:27.7333333+00:00

Hello,

I have powershell script like below output.

The result is fine but when i want to filter only showing Type="Vmware Backup" and only to show "Job Name" and "Last Result" columns why i not get the result?

Something wrong with the syntax?

User's image

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,549 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,583 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Andreas Baumgarten 111.1K Reputation points MVP
    2024-07-19T07:38:43.04+00:00

    Hi @Handian Sudianto ,

    than it looks like something with the VMware Backup value isn't working properly.

    Maybe you have a trailing space at the end or at the beginning?

    You can try/test -match instead of -eq


    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards

    Andreas Baumgarten

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.