PowerShell 2.0 released for Windows XP, Vista, Server 2003 and 2008

The very fantastic 2.0 release of PowerShell comes pre-installed with Windows 7 and Windows Server 2008 R2 (both of which I would recommend moving to at your first opportunity), but surprisingly hot on the heels of the releases of the new operating systems, the final version has now been released for Windows XP, Windows Vista, Windows Server 2003 and Windows Server 2008, after a beta was available for several months.


PowerShell 2.0 comes as part of the Windows Management Framework along with Windows Remote Management (WinRM) 2.0, which is required for the new remoting features in PowerShell 2.0, and a new version of the Background Intelligent Transfer Service (BITS), version 4.0.


Check out the announcement on the PowerShell team blog and the various install packages on the KB page.

SuperChristmas 2009

SuperMondays, in partnership with Thursday FizzAdesign AssociationRefresh Teeside and VBUG are proud to announce:



 SuperChristmas is the Christmas party that brings our organisations together to round off an excellent year and to set the scene for 2010. The party will start at 7:00pm on Thursday 17th December 2009 at Hoults Yard.


Tickets are on sale for £7.50. You can buy them here… 


The ticket price includes a light dinner, ceilidh dancing, and as much free beer/wine/soft drinks as the budget will allow…all served in a farm house theme decked out with bales of hay!


Everybody is welcome, so please do invite your friends … there will be no presentations on the night so leave your laptops, notebooks and netbooks at home!


Looking forward to seeing you there!


Running Windows 7′s Problem Steps Recorder from the Command Line

Last month we had a VBUG Newcastle meeting for IT Pros with two great presentations (it would’ve been three but we’ve had to re-schedule one – more news on that when I have it). The first presentation was from Microsoft Premier Field Engineer, Richard Diver, called Implementing the “Black Box” – Performance Monitoring and Analysis for proactive and reactive support, server baselining and capacity planning and covered a number of tools…


If you haven’t been using them, you should take a look into:


  • The Windows Sysinternals tools, which can be run without downloading, via Sysinternals Live by mapping a drive direct to \\live.sysinternals.com\tools\
  • IT Pros should especially look to Process Explorer to give a more comprehensive view of what’s happening on a system. You can even replace Windows Task Manager permenantly with it.
  • Many people who have opted to stay with XP until perhaps an upgrade to Windows 7 may not have seen the newer features of Performance Monitor (perfmon) and the Reliability Monitor (which was introduced in Vista and Server 2008).
  • Windows 7′s fabulous Problem Steps Recorder, which allows users to easily record screenshots of the issues that they’re having to send to the support teams (or to let you see exactly what the relative that always calls you up for tech support is doing wrong!).

…and some of the other useful links that Alex put in the TechNet UK Newsletter, after she and Sarah joined us on the night.


One of the questions that came out of the audience, regarding Problem Steps Recorder, was “can you run it from the command line?” At the time I think there were a few chuckles as people thought about how it might be used as a tool for spying, but after a while I started to think about the possibilities of automating around PSR…


Out of the box, if you want to use Problem Steps Recorder, you have to tell a user (let’s imagine they’re on the phone) to open the Start menu and type “psr” or “psr.exe” or some part of “Record steps to reproduce a problem”, which is how it is officially surfaced in Windows 7. You then have to tell them to start recording, go through the steps that are causing them the problem, stop recording, name and save the PSR output file somewhere and perhaps email it to you.


I thought, what if I could have them launch something that would automatically decide on a file name (based on the username, machine name and time), start recording and pop up a cut down UI that just had a button that would stop recording and save the file to a network share, or potentially email it straight to me. I know that’s not really saving a lot of steps, and they aren’t especially complicated steps anyway, but I’m a great believer in technology being as invisible as possible, so if something can be tailored to suit a particular environment, to make life a little bit easier for specific users, then I think it’s worth doing.


It turns out that there are command line parameters for Problem Steps Recorder, but they aren’t all that easy to find. Once I’ve written my script I’ll post it here, but in the meantime, here’s the help for psr.exe:


psr.exe [/start |/stop][/output <fullfilepath>] [/sc (0|1)] [/maxsc <value>]
    [/sketch (0|1)] [/slides (0|1)] [/gui (o|1)]
    [/arcetl (0|1)] [/arcxml (0|1)] [/arcmht (0|1)]
    [/stopevent <eventname>] [/maxlogsize <value>] [/recordpid <pid>]

/start            :Start Recording. (Outputpath flag SHOULD be specified)
/stop            :Stop Recording.
/sc            :Capture screenshots for recorded steps.
/maxsc            :Maximum number of recent screen captures.
/maxlogsize        :Maximum log file size (in MB) before wrapping occurs.
/gui            :Display control GUI.
/arcetl            :Include raw ETW file in archive output.
/arcxml            :Include MHT file in archive output.
/recordpid        :Record all actions associated with given PID.
/sketch            :Sketch UI if no screenshot was saved.
/slides            :Create slide show HTML pages.
/output            :Store output of record session in given path.
/stopevent        :Event to signal after output files are generated.

PSR Usage Examples:

psr.exe
psr.exe /start /output fullfilepath.zip /sc1 /gui 0 /record <PID>
    /stopevent <eventname> /arcetl 1

psr.exe /start /output fullfilepath.xml /gui 0 /recordpid <PID>
    /stopevent <eventname>

psr.exe /start /output fullfilepath.xml /gui 0 /sc 1 /maxsc <number>
    /maxlogsize <value> /stopevent <eventname>

psr.exe /stop

Notes:
1.    Output path should include a directory path (e.g. ‘.\file.xml’).
2.    Output file can either be a ZIP file or XML file
3.    Can’t specify /arcxml /arcetl /arcmht /sc etc. if output is not a ZIP file.


I’m pleased to say that Richard enjoyed presenting to the group as much as we enjoyed his presentation, so he’s coming back to do another session on 25th November on Advanced Troubleshooting with Sysinternals Tools. I’ll post more details shortly.

PowerShell webcast at Quest Connect 2009

Tomorrow (Wednesday 21st October), PowerShell MVPs Dmitry Sotnikov and Kirk Munro will present a webcast at 10am (GMT+1) entitled “What’s All This Talk about PowerShell Anyway?” as part of the Quest Connect 2009 virtual conference.


This should be a great session for any sys admins who are starting out with PowerShell, covering the use of PowerShell and Quest’s PowerGUI to manage Active Directory, Exchange, Hyper-V, etc.


There’s some good sounding sessions throughout the rest of the event, so check out Dmity’s post for all the details and links.