Windows PowerShell


Windows PowerShell - Nouns

Introduction to Windows PowerShell - Nouns

In PowerShell, nouns always come after the verb.  Verb-noun, get-Process, new-Alias, set-Location.

Experiment

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

get-noun  (get-service)
get-noun | get-Member  (get-service | get-Member)
get-help noun (get-help service.  NOT get-help | get-service)

Special note, the pipeline symbol displays as ¦ in PowerShell, but as | in notepad.

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

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 Microsoft PowerShell syntax

PowerShell Home  • Syntax  • -f format  • Pipeline  • Quotes  • Format-table  • Group  • Select-String

Please write in if you see errors of any kind.  Please report any factual mistakes, grammatical errors or broken links, I will be happy to not only to correct the fault, but also to give you credit.

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

Webcomputerperformance.co.uk

Guy Recommends: SolarWinds Exchange Monitor

Exchange Monitor from SolarWindsHere is a free tool to monitor your Exchange Server

 

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

Please report a broken link, or an error.