Monthly Archive


Monthly Archives: July 2008

Subject swap

Due to unforeseen circumstances we have had to swap the subject of tonight's User Group Live Meeting.  I'm doing a session on administering IIS 7 from PowerShell showing and contrasting the various options.  Marco's session on the net cmdlets is postponed until next month


Share this post :


Technorati Tags: PowerShell,User Group

UK PowerShell User Group Live Meeting

Date: 31 July  2008

Time: 7pm BST (GMT+1)

Marco Shaw, PowerShell MVP will be talking about /n software netcmdlets

Join the meeting.
Audio Information
Computer Audio
To use computer audio, you need speakers and microphone, or a headset.
First Time Users:
To save time before the meeting,
check your system to make sure it is ready to use Microsoft Office Live Meeting.
Unable to join the meeting? Follow these steps:

  1. Copy this address and paste it into your web browser:
  2. Copy and paste the required information:
    Meeting ID: JQ5754
    Entry Code: 6M+7p&KhN

If you still cannot enter the meeting, contact support

Microsoft Office Live Meeting can be used to record meetings. By participating in this meeting, you agree that your communications may be monitored or recorded at any time during the meeting.


Share this post :


Technorati Tags: PowerShell,User Group

PowerShell Event Registration Open

There will be a TechNet PowerShell event in Birmingham (UK) on the afternoon of 14 October 2008.  Registration is open at


Share this post :


Technorati Tags: PowerShell

Blog Mirror

This blog is now mirrored on  Evidently is blocked by some firewalls so the blogs cannot be accessed. should be accessible.




Technorati Tags: PowerShell,blog

PowerGUI – intellisense

One nice touch I found with the PowerGUI editor recently - if you start to type a path in the filesystem there is an intellisense popup to enable you to select the folder and subfolders.  Very useful and saves typing and mistakes.  Not sure when this feature first appeared but it is good.


Share this post :


Technorati Tags: PowerShell

PowerShell Event

There will be a TechNet PowerShell event in Birmingham (UK) on the afternoon of 14 October 2008. Registration details will follow next week when they are available.

If there is sufficient interest we will look at running a PowerShell User Group event afterwards


Share this post :


Technorati Tags: PowerShell

PowerGUI 1.5.1 RTM

PowerGUI has released version 1.5.1  - download from

Details from


Share this post :


Technorati Tags: PowerShell

String expansion

One of the nice features of PowerShell is string expansion.  Put a variable in the middle of a double quoted string (single quoted strings take the contents literally and don't expand) and the variable is substituted into the string when it is evaluate.


PS> $a = "a"
PS> $b = "b"
PS> $c = "c"

PS> "$a"

PS> "$a$b$c"

Define three string variables as shown and then try substituting them into the string.  It works as shown. This seems to break down when an underscore character gets involved.

PS> "$a_"

PS> "$a$b"
PS> "$a$b_"
PS> "$a_$b"
PS> "_$a$b"
PS> "_$a$b$c"
PS> "$a_$b$c"
PS> "$a$b_$c"
PS> "$a$b$c_"
PS> "_$a$b$c"

Put the underscore character after the variable and the variable is ignored. Put it before a variable and it works.

Use an escape character

PS> "$a`_$b"

and it works.

So the underscore character has the effect of nullifying a variable.  I've not seen this before and if anyone has an explanation I'd love to hear it.  I've not been able to find an explanation by checking out the usual sources. Maybe I'm missing something here but in the mean time be careful when using _ characters like this.


Share this post :


Technorati Tags: PowerShell

User Group Meeting – New Date

Apologies but we need to move the Live Meeting hosted by the UK PowerShell User group to 31 July.

Marco Shaw, PowerShell MVP, will be talking about /n software NetCmdlets

Webcast will be 1 hour starting at 7pm UK time (GMT+1)

If you are not a member of the user group leave me a comment with contact  details or email me at powershell-uk {At} hotmail [dot] co (dot) uk


Share this post :


Technorati Tags: PowerShell,User Group

WMI Classes

In this post!43CFA46A74CF3E96!1525.entry I talked about the difference between Get-WmiObject and [WmiClass].  I've had a comment left asking "But how do you know that there is Win32_Process inside this class?!?!?"

This question could have several meanings.  What I did in the post was a bit of a circular argument as I started with Win32_Process deliberately - mainly because it and notepad should be available to everyone working with PowerShell.  So I know that the class is Win32_Process because thats how I set it up to be.

WMI classes are not the same as .NET classes.  WMI is COM based. We can access it through the System.Management.xxxx  .NET classes which is what we are working with when we use the PowerShell WMI commands.

In the wider context how do I know that windows processes are represented by Win32_Process. Partly its experience - I've been working with Windows and WMI for a long time.  How long did you ask?  Hmmmm, I could tell you but...........

The other way to discover what the WMI classes represent is to dig into them.

Get-WmiObject -List

will give you a list of WMI classes in the cimv2 namespace which is where most of the common Windows admin WMI classes sit.  The names are often self describing. Have a try of them with Get-WmiObject - its read only so you won't damage your system.

Other methods include:

- use wmiexplorer from

- PowerShell scriptomatic from

- WMI Reference information from

Hope this helps


Share this post :


Technorati Tags: PowerShell,WMI