Windows PowerShell Select
Introduction to Windows PowerShell Select
These are three way that PowerShell uses 'Select':
This WMI example employs the Win32_logicaldisk class to display volumes with DriveType =3. A value of 3 means local and non-removable. See how Select * feeds off Get-WmiObject -query.
# PowerShell Select Statement
Example 2 Check to See if Windows Remoting is Running
Here is another example of a WMI Query Language (WQL) statement using 'Select'.
# PowerShell Select * remoting services
Note 2: WinRm is the Windows service which is a prerequisite for PowerShell v 2.0's remoting capabilities.
Windows Management Instrumentation (WMI) is one of the hidden treasures of Microsoft's operating systems. Fortunately, SolarWinds have created a Free WMI Monitor so that you can discover these gems of performance information, and thus improve your PowerShell scripts.
Take the guess work out of which WMI counters to use when scripting the operating system, Active Directory, or Exchange Server. Give this WMI monitor a try - it's free.
This script filters the event logs for two properties, log = Application and type = Error; furthermore this PowerShell script formats the output into a table.
# Powershell Select Example from Event Logs
Summary of PowerShell Select
This page deals with PowerShell 'Select' as in is in a WMI Query Language (WQL) statement. For instance, Get-WmiObject uses '-query' to introduce a classic 'Select * from' a phrase.
If you like this page then please share it with your friends
See More Microsoft PowerShell WMI Examples:
Please email me if you have any example scripts. Also please report any factual mistakes, grammatical errors or broken links, I will be happy to correct the fault.