Sunday, May 24, 2009

Useful Yet Little Known Features in PowerShell

Over on the Stack Overflow site, there’s a fascinating question and answer(s) about little known features of PowerShell. See What are some of the most useful yet little known features in the PowerShell language for this article. If you are a PowerShell geek, you probably know these, but there are one or two that you might have missed!

Technorati Tags: ,

Saturday, May 23, 2009

TechNet Virtual Conference 2009

Where are you going to be on June 19th? If you are a techie and into Microsoft technology, then perhaps you should be attending TechNet’s free Online Conference. This is an all day, free, on-line event aimed at delivering technical information that the community requested. And did I mention, unlike other events you have to pay for, this conference is free!

The conference is divided up into two tracks: Technology and IT Manager, with content to match. See the web page: TechNet Virtual Conference 2009 for more details on the agenda.

This is an excellent idea and I am definitely looking forward to hearing Richard Siddaway and Brent Johnson in particular. I’m sure glad the sessions are recorded so I can view later the sessions I missed!

See you on-line.

Technorati Tags:

Friday, May 22, 2009

PowerShell and WMI Namespaces

Over on Tim Benninghoff blog – he has an interesting post:: PowerShell and WMI namespaces. With WMI, the classes and intances are organised under a hierarchal namespace starting at the appropriately named “root”.  Individual nodes can have children which can in turn have children and so on. To some degree, namespaces are just defined by a product team and there is little consistency across software products (such is life!). But where to start?

Despite what Tim says about using the GUI, MOW’s most excellent WMI Explorer script is one fantastic tool. Not only is it a really good browser, but as Tim notes, it’s written in PowerShell which is even more cool. I use this script in most of my training courses to add value!

His post then goes on to describe two methods of obtaining the namespaces within WMI. There are two small problems with his examples. In his first example he has a minor typo – this should read as follows:

gwmi -namespace "root" -class "__Namespace" | Select Name

In Tim’s post, he spelt the class with just a single underline (“_Namespace”) not two (“__Namespace”). WMI is sadly very picky!  Tim’s other method works fine and as he says produces the same output as his first (well once corrected!). On my system, this produces the following output:

PSH [C:\foo]: gwmi -namespace "root" -class "__Namespace" | Select Name

Name
----
subscription
DEFAULT
MicrosoftDfs
CIMV2
Cli
nap
MicrosoftIISv2
SECURITY
RSOP
MicrosoftDNS
WebAdministration
WMI
directory
Policy
virtualization
Hardware
ServiceModel
MSAPPS12
Microsoft
aspnet

The second point is that his two methods just produce a list of namespaces under the root. Since each node in the namespace can have children, his two methods do not list all the namespaces in which you can find classes. This, IMHO, is once case where the GUI is a better tool – visualising the hierarchy in a tree control is a whole lot easier than trying to do it from the command line. And you get the names spaces in alphabetical order (although you could do pipe the output above to Sort-Object easily enough). On my workstation I see a number of subsidiary namespaces below root as you can see here:

image

 

WMI Namespaces are a good thing to understand, since many of the classes you might want to access using Get-WMIObject (et al) rely on the –NameSpace paramater (and the appropriate namespace name!).

Technorati Tags: ,,,

Thursday, May 21, 2009

Windows Vista for XP Professionals

I’ve been carrying this book (see http://www.amazon.co.uk/Windows-Vista-XP-Professionals-Updating/dp/9072389018 to buy this book!) . It’s written by Dutch MCT superstar Raymond Comvalius. In summary, this is a great book – simple  and to the point. Unlike some books, there’s very few screen shots – just lots of good straightforward text!

The book contains 8 chapters:

  • Chapter 1 – Introduction
  • Chapter 2 – What’s new in Vista and is not discused in the book – a nice touch!
  • Chapter 3 – Deploying Vista – a good look at the deployment tools which are all new in Vista.
  • Chapter 4 – Managing Vista- includes details on group policies and a look at WInRM.
  • Chapter 5 – Securing Vista – explains the key new security features of VIsta including UAC, file/registry virtualization and BitLocker.
  • Chapter 6 – Networking – Vista includes a bunch of new networking features, in effect a new TCP/IP stack, which are described in this chapter.
  • Chapter 7 – Mobility – a look at the mobile features of Vista.
  • Chapter 8 – Migration to Vista – this final chapter examines how to plan your Vista migration.

This is an excellent summary of what an IT Pro needs to know moving forward to Vista. I hope Raymond writes an update for Windows 7!

Technorati Tags: ,

Wednesday, May 20, 2009

Pscx 1.2 Beta Released

The beta of the next version of the PowerShell Community extensions has been released (see Nivot Ink - Pscx 1.2 Beta Released for more details). The code itself can be downloaded from: http://pscx.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=1615.

For me, the cool thing is that this is released as a module so I can import the module when I want it – or not. Nice touch. If you are using Win 7, note this beta requires Win 7 RC!

Tuesday, May 19, 2009

2009 Summer Scripting Games

As in years past, Microsoft is hosting the 2009 Summer Scripting Games. This year, the games are co-promoted by The Microsoft Script Guys and PosCode.Org. The games will run from June 15-26 and should be a lot of fun. As happened last year, I’ve been asked to submit a sample script and am hard at work on it already!

If you are a novice, an expert, or anywhere inbetween with scripting (PowerShell or even VB Script) then visit the site, sign-up and take part.