Thursday, February 24, 2011

London Weekend PowerShell PowerCamp – March 19-20 2011

What is it?

This fast paced weekend event covers all the key aspects of Windows PowerShell - from the command line and writing production-oriented scripts. We start with the basics including installation and configuration, formatting and providers and remoting. We then look at scripting, managing script libraries using modules, using objects, and finishing with the PowerShell features added into Windows. The event will be all lecture, with the opportunity to type along with the tutor.

What is the Agenda?

Day 1 – The Basics

• PowerShell Fundamentals – starting with the key elements of PowerShell (Cmdlets, Objects and the Pipeline) plus installation, setup, and profiles

• Discovery – finding your way and learning how to discover more

• Formatting – how to format output nicely – both by default and using hash tables and display XML

• Remoting – working with remote systems using PowerShell’s remoting capabilities

• Providers – getting into OS data stores via PSProviders

Day 2 – Diving Deeper

• Scripting Concepts – automating everyday tasks including PowerShell’s language constructs, error handling and debugging (both from the command line and using an IDE)

• Modules – managing PowerShell script libraries in the enterprise

• .NET/WMI/COM Objects – working with native objects

• PowerShell and Windows Client/Server – how you can use built in PowerShell cmdlets

• PowerShell in Key Microsoft Servers - a look at PowerShell today in SQL, SCVMM plus a look forward to the future with SharePoint 2010

What will it cost?

The cost is £200 (+VAT at the prevailing rate) for the weekend. Meals and accommodation are not covered.

Where is the event going to take place?

The PowerShell PowerCamp will be held at Microsoft Cardinal Place, 100 Victoria Street in Victoria on the weekend of March 19-20, 2010.

Who is the tutor?

The PowerShell Weekend PowerCamp will be delivered by Thomas Lee. Thomas is a veteran PowerShell MVP who has been involved in the PowerShell community since the very beginning. He provides training and consultancy around a range of Microsoft products, with a recent focus on PowerShell and Lync Server. Thomas runs PowerShell training courses around the world, and has been a speaker at conferences across the world for the past decade. In his spare time, he lives with his wife, daughter, and wine cellar in a small cottage in the UK. His Twitter handle is DoctorDNS and he maintains two blogs (Under the Stairs at http://tfl09.blogspot.com and PowerShell Scripts Blog at http://pshscripts.blogspot.com)

What do I need to bring

You need to bring a laptop with at least two VMs pre-configured. The first should be a Server 2008 R2 domain controller and the other one a member server. The virtualisation software is not of concern – but you need 64-bit guest OS support. Thus you can use Hyper-V, VMware Workstation or Oracle’s Virtual Box. 

How do I book?

Contact DoctorDNS@Gmail.com to book a place and to arrange for the invoice to be paid. Payment will need to be cash, cheque or bank transfer – I don’t take credit cards.

More Details

Watch Thomas’s blog for any hot breaking news on the event.

Friday, February 18, 2011

PowerShell on my iPhone

I recently got a new iPhone 4 16GB, courtesy of American Express (a long story!) and have been slowly making the transition from my HTC Desire Android (a nice phone) to the iPhone. There are some observations I’ll leave for another day – but let’s just say that the iPhone is not perfect and the Desire/Android is worth competitor.

One neat thing I have found in my search for applications for the new phone is iPowerShell V2, built by Sapien. iPowerShell is neat reference tool for users of Microsoft’s PowerShell, for use on the iPhone or iPod Touch. It contains full descriptions of all the core PowerShell Version 2 cmdlets, their syntax, parameters and examples of proper usage. It also contains the complete set of “about item” help topics as well as provider and alias help.

I’ve not yet found a way to extend it (i.e. to add or modify the contents, but I find it useful to dip into and out of. I particularly like browsing the about_* files using iPowerShell.

Here’s a screen shot of the application:

image

Thursday, February 17, 2011

IPv4 X-Day Arrived–No One Died

At a ceremony held on 3 February, 2011 the Internet Assigned Numbers Authority (IANA) allocated the remaining last five /8s of IPv4 address space to the Regional Internet Registries (RIRs) in accordance with the Global Policy for the Allocation of the Remaining IPv4 Address Space. Each /8 contains a total of 2^24 addresses, although depending on how the /8 blocks get subnetted, the actual amount of usable IPv4 addresses would be lower.

So after 30 years or thereabouts, the free pool of available IPv4 addresses is fully depleted from a global perspective, that is, IANA has no more. The individual RIRs of course still have address block to give out as do individual ISPs. There are companies with /8 block (e.g. HP that has the original DEC 16.0.0.0) that might be persuaded to give some of all of their /8 blocks back either to IANA or a RIR. And there are a lot of companies that have smaller allocations (e.g. /16, /24, etc.) that also might be persuaded. And I’m sure that ISPs and RIRs will start to be a lot more aggressive over smaller allocations. If nothing else, the cost of holding allocations is pretty likely to begin to cost more.

With better use of the now scarce resource that is IPv4 addresses, the Internet will continue to operate just fine for at least the next few years. But the writing is on the wall – IPv6 needs to happen sooner rather than later. I use Xilo as my ISP – and ever since switching to them around a year ago, IPv6 is ‘in testing’. I keep asking, but it’s still in testing.

It’s time for Xilo, and all ISPs, to ramp up and start rolling out IPv6. With the handing over of the last /8 block, IPv6 needs to be here for all of us soon. Of course, it’s not just the ISPs that need to adopt and adapt. The manufacturers of ADSL/Cable modems, Wireless access points, switches, particularly consumer grade devices, need to be upgraded to fully support IPv6.  And there probably needs to be a new protocol to do complete setup for an ISP customer (configuring not only the individual hosts, but also the router itself.  Not sure DHCPv6 is quite enough. A PowerShell module perhaps?

So start asking your ISP, your hardware manufacturer and your corporate IT department: when do you support IPv6? And start learning more about IPv6.

Technorati Tags: ,

Wednesday, February 16, 2011

Weekend PowerShell PowerCamp–York UK

I’ve written (and tweeted) in the past about my weekend PowerShell PowerCamps. Now have two more on the schedule and ready to book. These two will be held in York, at the University of York. A great venue easily accessible from much of the north east (Newcastle down to Leeds), the North West (Manchester and Liverpool) and the north Midlands. And for those farther afield, the organisers will have a great B&B offer, plus we’ll have dinner on the Saturday night in York.

This event will be, as the web site promises, fast paced!  I’ll be covering the basics of PowerShell, from the fundamentals at the command line through to writing production oriented scripts. On the first day, we start with topics including installation and configuration, formatting, providers and PowerShell remoting. On day 2, we look at scripting, modules, a deeper dive into objects and a quick lap around the PowerShell features included in Windows Server 2008 R2.

You should come along with a laptop with either Windows 7 and Server 2008 R2 loaded (in a virtual environment). The virtualisation product you use is irrelevant – you can use VMware, Oracle Virtual Box, Hyper-V, etc. You should, however, have at least two VMs (a DC and a ‘client’) so you can investigate PowerShell features as we cover them in the class. If you don’t have a MSDN or TechNet subscription to get the DVDs for these OSs, you download the trial versions for the class. See here for Windows 7 and see here for Server 2008 R2 X64. I’ll be running Server 2008 R2 with Hyper-V plus a number of VMs to conduct the demos – so be sure to bring along your laptop all setup. We will not be providing computers for you – so please come prepared (and contact me if you have any concerns).

There are two dates currently scheduled in York: 26 March 2011 and 18 June 2010. Both are to be held at the University of York. See the web site for more details of costs and to book.

And for those hoping for more information about PowerCamp in London – watch this space! News should be available this week.

Technorati Tags: ,,

Monday, February 14, 2011

Lync PowerShell Blog–A Challenge For You!

The folks behind the Lync Server 2010 PowerShell blog have another fun wheeze on: The PowerShell Challenge. The idea of this contest is simple: each week, the Blog team present 4 things and you need to figure out which is The Odd One Out (or as they put it, One Of These Things Is Not Like The Others).  You can read up on the rules here.

The PowerShell challenge has been going for a few weeks, and there are still 4 folks with perfect scores (naturally, I am one of those). But you can still join in the fun and compete in this week’s contest. Who knows, the top runners might have a bad week and you could end up winning the competition. But it’s not whether you win or lose – I am finding this contest very useful in helping me to get better familiar with the Cmdlets.

To see a summary of the past challenges (and answers), plus this weeks’ challenge, see: http://blogs.technet.com/b/csps/p/otherschallengearchive.aspx.

 

Wednesday, February 09, 2011

Formatting of Repeating Groups in PowerShell–Two Neat Tricks

When you use Format-Table to create a table from a pipeline/variable, you’ll find that PowerShell truncates the output of a column. Here’s a simple example

 

PSH [C:\foo]: Get-Process | Group company | Sort count | Select –Last 2 | Format-Table

Count Name                       Group
----- ----                       -----
   18 Microsoft Corporation     {System.Diagnostics.Process (conhost), ...
   51                           {System.Diagnostics.Process (ApMsgFwd),...

 

As you can see, PowerShell has truncated the Group colum to just show one member of the group. Note that ’ve deliberately truncated the width of the console to produce this output to avoid Blogger from ‘helpfully’ wrapping the column when you read this post – if you try the pipeline you’ll likely see a few more.

Here’s the first neat tric: To get more output you can use the –wrap parameter on the call to format Table

PSH [C:\foo]: Get-Process | Group Company | Sort Count | Select –Last 2 | Ft -wrap


Count Name                      Group
----- ----                      -----
   19 Microsoft Corporation     {System.Diagnostics.Process (conhost), System.Dia
                                gnostics.Process (conhost), System.Diagnostics.Pr
                                ocess (conhost), System.Diagnostics.Process (dwm)
                                ...}
   51                           {System.Diagnostics.Process (ApMsgFwd), System.Di
                                agnostics.Process (audiodg), System.Diagnostics.P
                                rocess (csrss), System.Diagnostics.Process (csrss

Now this better, but this still truncates the group to just 4 entries. What if you want to see more? To to that, and here’s the second neat trick, you need to set a preference variable, FormatEnumerationLimit. You set this variable to the number of group entries you want to see. By default PowerShell sets this to 4. If you set it higher, you will see something like this:

 

PSH [C:\foo]: $FormatEnumerationLimit = 10

PSH [C:\foo]: get-Process | group company | sort count | select -last 2 | ft -wrap


Count Name                      Group
----- ----                      -----
   19 Microsoft Corporation     {System.Diagnostics.Process (conhost), System.Dia
                                gnostics.Process (conhost), System.Diagnostics.Pr
                                ocess (conhost), System.Diagnostics.Process (dwm)
                                , System.Diagnostics.Process (explorer), System.D
                                iagnostics.Process (explorer), System.Diagnostics
                                .Process (ielowutil), System.Diagnostics.Process
                                (msnmsgr), System.Diagnostics.Process (msseces),
                                System.Diagnostics.Process (OUTLOOK)...}
   51                           {System.Diagnostics.Process (ApMsgFwd), System.Di
                                agnostics.Process (audiodg), System.Diagnostics.P
                                rocess (csrss), System.Diagnostics.Process (csrss
                                ), System.Diagnostics.Process (Idle), System.Diag
                                nostics.Process (inetinfo), System.Diagnostics.Pr
                                ocess (lsass), System.Diagnostics.Process (lsm),
                                System.Diagnostics.Process (MDM), System.Diagnost
                                ics.Process (mqsvc)...}

In this case, you new see 10 members of the group and not the default of 5. Were you to set $FormatEnumerationLimit to, say, 1000, then you would see up to 1000 entries. If you look at the variable (Get-Variable FormatEnumerationLimit | FL *), the description of this variable says: “Dictates the limit of enumeration on formatting IEnumerable objects”. This is a 32-bit integer so you could set it higher than 1000, although that's probably a bit OTT. Setting it to say 100 in your profile is probably good enough for most things.

Thanks to Alexandar for pointing me to this preference variable. For more information on this and the other PowerShell prefernce variables, you can get-help on about_perferencevariables.

Monday, February 07, 2011

PowerShell Master Class Returns to Stockholm–March 8-10 2011

I’ve just had confirmation from Lab Center that I’ll be running another Introduction to PowerShell master class event in Stockholm on March 8-10.

Lab Center is one of the best training centres that I’ve had the privilege to work with – and given the great folks I hang out with these days, that’s saying something. The centre is in downtown Stockholm just 10 minutes walk from the central train statin and 2 minutes stroll from the nearest T-Banna station

The agenda for the lab is as follows:

Day 1 – The Basics

  • PowerShell Fundamentals – the key elements of PowerShell plus installation, setup, and profiles
  • Discovery – finding your way and learning how to discover more
  • Formatting – how to format output nicely
  • Remoting – working with remote systems
  • Providers – getting into OS data stores

Day 2 – Diving Deep in to Scripting

  • Scripting Concepts – automating everyday tasks including language constructs, error handling and debugging
  • Modules – managing PowerShell in the enterprise
  • .NET/WMI/COM Objects – working with objects

Day 3 – Practical PowerShell

  • PowerShell and Windows Client/Server – how you can use built in PowerShell cmdlets
  • PowerShell in Key Microsoft Servers - a look at PowerShell today in SQL, SCVMM plus a look forward to the future with SharePoint 2010
  • Taking it to the Next Level – the stuff we can’t cover in these three days.

 

We’ve got a nearly full class – but there’s always room for on e more. So if you fancy Stockholm in the early spring along with as much PowerShell as your head can handle – book today. I hope to see you there…