How to utilize filters and or wildcards with Get-WMIObject

Home Forums Scripting PowerShell How to utilize filters and or wildcards with Get-WMIObject

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    12man
    Member
    #610022

    Group,

    I have been trying to utilize wildcards or filters in conjunction with Get-WMIObject.

    The goal is to run a one liner against multiple clients without providing a list or file to run against.

    As a single target it works with this type of  syntax

    Get-WMIObject -computername ‘pcname’

    I have yet to google the appropriate way to format.

    examples of directions I have tried (multiple changes on each)

    (Get-WmiObject -computername $_.name [pc_name%] -Filter Win32_UserProfile)

    (Get-WMIObject {$_.computername -Like “*PC_name*”})

     

    Is what I am trying to do possible?

     

    Thanks in advance

     

     

     

     

     

     

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.