Archive for the category “PowerShell”
March 29th, 2008 at 12:19 pm by David Potter
I’m working little-by-little towards using PowerShell as my primary command shell instead of cmd.exe. I’m still a ways away, but PowerShell Community Extensions takes me a bit closer to my goal. Here’s a description from their web site:
PowerShell Community Extensions (PSCX) is aimed at providing a widely useful set of additional cmdlets, providers, aliases, filters, [...]
January 30th, 2008 at 3:38 pm by David Potter
Calling static methods
Table of contents for Intro to PowerShellGetting PowerShellBasic PowerShell ConceptsCommonly Used CmdletsPowerShell Scripts and ProfilesUsing PowerShell types with commands and variablesError handling in PowerShell scriptsCalling static methods PowerShell is extremely flexible in what it allows you to do, even allowing you to call static methods on just about any class in just about any assembly. [...]
December 18th, 2007 at 9:07 pm by David Potter
Error handling in PowerShell scripts
Table of contents for Intro to PowerShellGetting PowerShellBasic PowerShell ConceptsCommonly Used CmdletsPowerShell Scripts and ProfilesUsing PowerShell types with commands and variablesError handling in PowerShell scriptsCalling static methods When writing a PowerShell script, often you want to control what happens when an error occurs. There are several mechanisms available, two of which I’ll describe here.
$ErrorActionPreference variable
The [...]
December 18th, 2007 at 8:47 pm by David Potter
Using PowerShell types with commands and variables
Table of contents for Intro to PowerShellGetting PowerShellBasic PowerShell ConceptsCommonly Used CmdletsPowerShell Scripts and ProfilesUsing PowerShell types with commands and variablesError handling in PowerShell scriptsCalling static methods When executing a command in PowerShell that expects a non-string argument, sometimes you need to specify more than just the string representation of the parameter. Here is an [...]
November 26th, 2007 at 6:27 pm by David Potter
PowerShell Scripts and Profiles
Table of contents for Intro to PowerShellGetting PowerShellBasic PowerShell ConceptsCommonly Used CmdletsPowerShell Scripts and ProfilesUsing PowerShell types with commands and variablesError handling in PowerShell scriptsCalling static methods Each time you start up PowerShell, your session is set to an initial state. Any changes you made in previous PowerShell sessions (with a few exceptions) are not [...]
November 26th, 2007 at 2:57 pm by David Potter
Commonly Used Cmdlets
Table of contents for Intro to PowerShellGetting PowerShellBasic PowerShell ConceptsCommonly Used CmdletsPowerShell Scripts and ProfilesUsing PowerShell types with commands and variablesError handling in PowerShell scriptsCalling static methods The following cmdlets provide functionality that you may find yourself using on a regular basis. It’s also likely that you’ll use some of them without knowing it as [...]
November 21st, 2007 at 8:05 pm by David Potter
Basic PowerShell Concepts
Table of contents for Intro to PowerShellGetting PowerShellBasic PowerShell ConceptsCommonly Used CmdletsPowerShell Scripts and ProfilesUsing PowerShell types with commands and variablesError handling in PowerShell scriptsCalling static methods Although PowerShell provides access to the commands and applications available in cmd.exe in a fairly transparent way, there are still a lot of differences which means there is [...]
November 21st, 2007 at 6:58 pm by David Potter
Getting PowerShell
Table of contents for Intro to PowerShellGetting PowerShellBasic PowerShell ConceptsCommonly Used CmdletsPowerShell Scripts and ProfilesUsing PowerShell types with commands and variablesError handling in PowerShell scriptsCalling static methods When I worked at Microsoft I spent over a year working with Windows PowerShell (called Monad or Microsoft Shell (MSH) at the time). PowerShell is a truly wonderful [...]



