Coming Soon: GET:IT Endpoint Management 1-Day Conference on September 28th at 9:30 AM ET Coming Soon: GET:IT Endpoint Management 1-Day Conference on September 28th at 9:30 AM ET

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

  • 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.

Live Webinar: Active Directory Security: What Needs Immediate Priority!Live on Tuesday, October 12th at 1 PM ET

Attacks on Active Directory are at an all-time high. Companies that are not taking heed are being punished, both monetarily and with loss of production.

In this webinar, you will learn:

  • How to prioritize vulnerability management
  • What attackers are leveraging to breach organizations
  • Where Active Directory security needs immediate attention
  • Overall strategy to secure your environment and keep it secured

Sponsored by: