Windows PowerShell command line syntax

  Parameters  Command Line Parameters  param() and $args[]
  Pipelines   Pass objects down the pipeline
  Objects     Working with objects
  Date&Time   Date and Time Format patterns (DateTimeFormatInfo)
  Redirection Spool output to a file

Evaluate expressions

  Escape chars, delimiters, Here Strings and quotes
  Methods     ToUpper, PadRight, Substring etc
  Comparison  -like, -lt, -gt, -eq, -ne, -match
  Wildcards   Match multiple items
  Regular Expressions Search for a string

Variables

  Variables   Create/read variables
  Arrays      Array variables
  Automatic variables ($_, $Args etc)
Environment variables,PowerShell providers Functions and Filters Write a named block of code Ref vars Pass a reference variable to a function DataTypes Powershell data types

Scripts

  Run a script  How to run a powershell script
  DelOlder      Delete files and folders older than n days
  StampMe       Rename a file with the current Date/Time
  pshinfo       List Ram, Disk Space, Service pack, Uptime
  InstalledApps List the applications installed
  HotFixInfo    List machines with a KB hotfix installed
  ServiceStatus List installed services and service status

Discussion forum
Links to other websites, books etc...


Back to the Top

© Copyright SS64.com 1999-2010
Some rights reserved