Windows PowerShell

Guy recommends:
Free config generator

Solarwinds Config Generator

This CG will put you in charge of controlling changes to network routers and other SNMP devices.

Download your free Config Generator



Windows PowerShell Nouns

Introduction to Windows PowerShell Nouns

In PowerShell, nouns always come after the verb.  For instance: Verb-noun, Get-Process, New-Alias or Set-Location.  One advantage of researching a noun is that it can lead to other interesting cmdlets in the same family.

Noun Experiments

Experiment with these commands, just substitute the noun that you are interested in:

Get-Service)
Get-Service | Get-Member
Get-Help Service
#  NOT Get-help | Get-Service)

Special note: the pipeline symbol displays as ¦ at the PowerShell command-line, but as | in notepad.

# To get a list of nouns for PowerShell v 2.0 try this:
Clear-Host
Get-command -noun

Note: There is a sister parameter -verb

Refine your list like so:

# To get a list of nouns for PowerShell v 2.0 try this:
Clear-Host
Get-command -noun Proc*

PowerShell Noun List

Acl  (Get-Acl)

Alias

Childitem (Get-Childitem has an Alias of dir)

Command (Get-Command)

Content (Get-Content machines.csv)

Drives

Env

Eventlog (not eventvwr)

  ˚

File (Out-file)

Item (Get-Item d:\scripts)

Object (Rare in that Get-object does not work, object used with where, new, group and sort, for example, new-object comobject and New-Object DirectoryServices.DirectoryEntry. Also where-object)

Process

Property (Get-Property c:\boot.ini)

Provider

Service

WmiObject

See also Windows PowerShell Verbs

Guy Recommends: SolarWinds Engineer's Toolset v10Engineer's Toolset v10

The Engineer's Toolset v10 provides a comprehensive console of utilities for troubleshooting computer problems.  Guy says it helps me monitor what's occurring on the network, and the tools teach me more about how the system itself operates.

There are so many good gadgets, it's like having free rein of a sweetshop. Thankfully the utilities are displayed logically: monitoring, discovery, diagnostic, and Cisco tools.  Download your copy of the Engineer's Toolset v 10

Summary of Windows PowerShell Nouns

Firstly, remember the sequence: verb-noun.  Secondly make a point of collecting PowerShell nouns.  Each construction begins with a verb then a hyphen, finally the Verb or object for example,  Get-Childitem.  However, because 'get' is the default PowerShell verb, it is sometimes omitted thus you see 'Service' rather than Get-Service.

See more PowerShell examples for syntax advice

PowerShell Tutorials  • Syntax  • Get-Verb  • PowerShell Nouns  • Get-Member  • Get-Credential

PowerShell -as  • Comparison operators  • Conditional operators  • Get-Date  • Quotes

Please write in if you have a better example script. Also please report any factual mistakes, grammatical errors or broken links, I will be happy to correct the fault.

Download my ebook:Getting Started with PowerShell
Getting Started with PowerShell - only $9.25

You get 36 topics organized into these 3 sections:
   1) Getting Started
   2) Real-life tasks
   3) Examples of Syntax.

In addition to the ebook, you get a PDF version of this  Introduction to PowerShell ebook  It runs to 120 pages of A4.

 *


Google

WebThis Site

Guy Recommends: WMI Monitor and Its Free!Solarwinds WMI Monitor

Windows Management Instrumentation (WMI) is one of the hidden treasures of Microsoft operating systems.

 Fortunately, Solarwinds have created the WMI Monitor so that you can examine these gems of performance information for free.  Take the guess work out of which WMI counters to use for applications like Microsoft Active Directory, SQL or Exchange Server.

Download your free copy of WMI Monitor

 

Home Copyright © 1999-2010 Computer Performance LTD All rights reserved

Please report a broken link, or an error.