Tag Archives: WMI

How to get configuration manager inventory data using PowerShell –

In order to find information from our environment,very often we go out query the information directly at the source, on the network. We will query 100 hundreds of computers to gather information on a specific subject, and use it with conditional logic  to

Source: How to get configuration manager inventory data using PowerShell –

How to Create Queries in Configuration Manager

select SMS_R_System.NetbiosName, SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName from SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceId = SMS_R_System.ResourceId where SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like “%Visio%”

Source: How to Create Queries in Configuration Manager

PowerShell Magazine » #PSTip List all WMI namespaces on a system

PowerShell Magazine » #PSTip List all WMI namespaces on a system.

OMCI Sample Scripts – Systems Management – Wiki – Systems Management – Dell Community

OMCI Sample Scripts – Systems Management – Wiki – Systems Management – Dell Community.

Troubleshooting WMI just became a little easier | TechRepublic

Troubleshooting WMI just became a little easier | TechRepublic.

WQL Operators and Wildcards

With Powershell beeing around I need this more and more often si I thought I might as well link to it

WQL Operators.
WQL WildCards

Test GPO WMI filter using Powershell

GPO WMI filters can get screwed up when edited. Quick way of testing a WMI filter is available using Powershell:

  1. Grab the GPO WMI filter from GPMC and put it into clipboard
  2. in Powershell console:
    gwmi -Query ‘Paste your WMI filter here’
    in words:
    write gwmi -Query ‘ (single qoute)
    paste in your wmi filter
    ‘ (single qoute) 

Result could look like this:
gwmi -Query ‘SELECT ProductType, CSName FROM Win32_OperatingSystem WHERE (ProductType = “1”) AND Not CSName = “CB002021”)

When any results are returned WMI filter evaluates to $true (GPO applies), else $false (GPO does not aplly)

Don’t forget that you get the luxury to test against multiple computer just by adding the -Computername parameter:

gwmi -Query ‘SELECT ProductType, CSName FROM Win32_OperatingSystem WHERE (ProductType = “1”) AND Not CSName = “CB002021”)‘ -Computername PC01,PC02

smsagent

Tips, tricks and time-savers for the Windows and ConfigMgr administrator

To The Point

Anything about Technology and Business

Brian's Power Windows Blog

Microsoft in the Enterprise. Windows, Hyper-V, Exchange, SQL, and more!

PowerScripting Podcast

Shownotes and links for the PowerScripting Podcast, a podcast to help people learn Windows Powershell

Learn Powershell | Achieve More

What is this Powershell of which you speak?