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…

Sunday, January 30, 2011

Creating PSDrives for Modules

In my PowerShell training, I spend time examining modules and how you can use them to manage code and avoid profile bloat. In the (forgive the pun) modules on modules, I do lots of demos where being able to quickly set your location to the personal or system modules folder is useful. One simple way I demonstrate is to create PS drives pointing to the folders. I do this as follows:

# First, create variables pointing to each folder
$mod       = (ls env:psmodulepath).value.split(";")[0]
$sysmod    = (ls env:psmodulepath).value.split(";")[1]

# Now create PsDrives
New-PSDrive -name mod    -root $mod     –PsProvider FileSystem | out-null
New-PSdrive -name sysmod -root $sysmod  –PsProvider FileSystem | out-null

As you can see, I first create variables corresponding to the two built in Profile folders. The PsModulePath environment variable is set to a string holding the names of these folders, delimited by a semi-colon. Once I have the $mod and $sysmod variables, I can call New-PSDrive to create the drives. The last two PowerShell statements do return a value, so to to keep the output to a minimum, I just pipe the results to out-null (although I’ll quickly point out there are other ways to avoid the output!)

Friday, January 28, 2011

Powershell WebCast–Formatting in PowerShell

As I wrote earlier this week, on Wednesday night (well night in the UK!), I delivered PowerShell.Com’s first webcast. The webcast was a huge success – we had a total of 1350 people signed up to attend. At the peak we had just over 675 users watching (about par for the course in terms of attrition!). If you were amongst those who missed any or all of the web cast, or just want to re-see part of it, the web cast itself is posted to PowerShell.com (http://powershell.com/cs/media/p/8773.aspx). I’ve also posted my slides and demo code to my website – www.reskit.net/powershell/formatting.zip.

Enjoy!

Tuesday, January 25, 2011

Webcast: Formatting with PowerShell

Tomorrow, 26 January, I’ll be presenting a web cast of formatting with PowerShell. Those kind forks at Idera, sponsors of PowerShell.Com, have organised an on-line webcast where I’ll be looking at formatting with PowerShell. As of this afternoon, over 900 folks  have signed up for the event!! The webcast is live at 18:00 GMT (19:00CET). For the US folks, that works out to 13:00 EST and earlier further west.

The webcast examines how you format output using PowerShell. It’s aimed at a 250 technical level presentation. I first look at default formatting and using Format-Table and Format-List (and Format-Wide). I’l exmine .NET Composite formatting strings and PowerShell's -F operator – these enable you to format individual values into output strings. I’ll then move gears and look at using hash tables with Format-Table and Format-List to provide more precise control over the formatting of tables. I’ll also spend time answering your questions.

To find more about the webcast, and to sign up to attend, see: https://www2.gotomeeting.com/register/626513458. I hope to see you all there!

Friday, December 24, 2010

PowerShell Jobs

I’ve just seen an interesting blog article, that shows using PowerShell Jobs to do a specific task in Forefront Identity Manager (FIM). This article was neat ins two ways.

First, even though I am not really an FIM guy, by looking at the script, I had a pretty clear idea of what the script would do. So while I am not clear on the details (just how big is a management agent, how complex is the import process, and what do I do with them anyway!), I can see what the script will do. This shows up a point I keep making to my PowerShell classes: learning a new product’s cmdllets is mainly about learning about how that product’s objects are surfaced (WMI, CMDLET, Provider, etc) and then what they are and what they are used for. The latter bits of this of course require product knowledge, outside of PowerShell.

The second thing neat about this article was how the author took a set of operations (importing several management agents into FIM). In terms of the importing, you could have written the script to not use just – just calling the script block directly  inside the loop instead of inside a separate job. This approach delivers parallelism that can speed up dramatically the time for a task to happen. But, it depends.

Each time you run a PowerShell job (whether in the ISE or console), PowerShell creates an instance of PowerShell.exe to execute the script or script block. This means that each job comes with a bit of overhead – process creation has CPU/IO/Memory requirements. But if you can run multiple tasks in separate processes, then with Window’s multiprocessing features, the jobs run in parallel and therefore a much shorter overall time. At least in theory!

As ever it depends. If the task being executed uses a lot or resources to actually execute, then having multiple tasks run in parallel therefore raises the resource utilisation. Specifically, with more than one or two ‘heavy’ tasks, you can find the system is paging heavily. This paging might actually end up slowing the execution down to the point where there the benefits of parallelisation are swept away by the paging costs.

A related issue is what I call the 3:00 wakeup test. If had to be woken up at 3:00 in the morning to have to fix this script, what would I make of it. Because the script is more complex, it might take me longer to work out what is going on (and therefore how to fix things).

So-this script illustrates something that can really improve the performance of certain tasks. But as ever it depends!

Technorati Tags: ,,

Saturday, December 11, 2010

Lync Server and PowerShell–a new forum

Over at Www.PowerShell.Com, there’s a new forum: PowerShell for Microsoft Lync Server. This is a forum where you can ask any and all your questions around using PowerShell and Lync Server 2010. As you may know, Lync Server 2010 follows in the foot steps of Exchange and other MS server applications in offering a complete PowerShell Admin experience.

For those of you who are getting into Lync, your basic administration can be done from the Lync Server Control Panel (a sliver light application that replaced the MMC console used in Office Communications Server and earlier versions of what we now call Lync. But for heavy duty admin, PowerShell, and the 543 cmdlets in the Lync Module are going to be your focus. I teach Lync in the UK and know that many of the admins I’ve taught thus far are going to struggle with PowerShell as many of them have little or no PowerShell background (with too many still living in the land where administration must mean doing it at the GUI).

So if you are getting into Lync, and are having trouble doing a specific thing – come on down. If you are a seasoned OCS admin, and a bit unsure on PowerShell – definitely come on over and ask your questions.

Friday, December 10, 2010

First PowerShell PowerCamp A Fantastic Success

Last Saturday (Dec 4th) a group of 29 hearty souls sat down at an absurdly early hour and began to experience the first ever weekend PowerShell PowerCamp. After a short intro from super-star technology writer and consultant Jon Honeyball, I took the floor and spent the rest of the guiding the attendees through PowerShell. I projected slides, did tons of demos, while the attendees typed along on their own laptops. We did take a few minutes out for coffee and lunch, but worked on into the darkness before gathering our senses and meeting for a lovely meal in a local pub. Sunday saw more of the same, with a most excellent presentation of the Managing Hyper-V with PowerShell by superstar ex-Microsoft superstar James O'Neil.

The attendees were from a variety of companies and backgrounds but all shared a desire to learn PowerShell. Unlike some of the folks I see in my general Windows courses, the PowerCamp attendees all see the value in PowerShell and also see the value, to their CVs and careers, of learning PowerShell. It’s clear that for some weekends like this are just the ticket!

Moving forward, I will be running two more PowerShell PowerCamp weekends. The next one is March 26-27 and will be held in York, England. Price and full details will be announced shortly. Watch this space!

Thursday, November 25, 2010

PowerShell Training

I’ve been doing quite a lot of PowerShell training of late for organisations big and small. The biggest organisation was Microsoft’s Hotmail team where I ran a week long class over the summer – organisations with that many servers to manage could not function as well with out PowerShell. But despite it having been around for few years, many (most?) IT Pros don’t really know PowerShell – well not yet anyway. Microsoft’s broad adoption of PowerShell has meant a lot of my customers moving over to doing things with PowerShell. This is a good thing – but there’s a lot of resistance that needs to be overcome.

As see it, organisations must acknowledge that PowerShell is here, is part of Microsoft’s Common Engineering Criteria (what every team in MS must do). PowerShell will only become more pervasive. In short, it matters. So it’s time to start learning it and adopting it as an enterprise tool.

While I can talk about PowerShell being a strategic task automation platform, IT Pros need to work with Powershell itself and the product specific cmdlet set(s). And they need to understand how to write scripts – detecting the errors that will happen, dealing with credentials, working with .NET/WMI/COM, etc. There is a bit of a learning curve here, and that’s something Microsoft can work on as they develop PowerShell Version 3 (which would be expected to ship inside the next version of windows in a couple of years).

So how do you learn PowerShell. Well – for those who are motivated there is a plethora of on-line material, ranging from blog posts, twitter references, web tutorials, free e-books, etc, etc, etc. Use your favourite search engine to mine a vast amount of content – most of it pretty good. For those who are self motivated, the internet is a good source of learning material.

If you prefer the structure of a formal class, as I know I do, then you have a number of options. Microsoft has issued two PowerShell official training courses:

Microsoft CPLSs also offer another 5-day class, PowerShell for Administrators. This is a 3 day class covering PowerShell V1.

As an alternative: I offer two 3 and 4 -day PowerShell classes: an Introduction to PowerShell class and an Advanced PowerShell Class. I find that, with PowerShell, this is enough time to get someone started. Armed with the knowledge and practice gained during those sessions, delegates begin their journey, and come back in a few months for more advanced topics like XML, database access, error handling, etc.

How you learn PowerShell is really up to you – you have options! So go on – you know it makes sense!

Wednesday, November 24, 2010

IPv6–Are You Ready?

Last week, I got the chance to teach a nice Microsoft networking course up in York at the University’s IT Academy. It was a great week! For me one of the highlights was talking about IPv6. The delegates had heard of it, but by and large it was somewhat foreign. So I dived into as much detail as I could, and used Joseph Davies’ most  excellent IPv6 book  as a reference. I know Joseph well – he and I collaborated on two TCP/IP books (TCP/IP for Windows Server 2000, and TCP/IP for Windows Server 2003).

I’ve been writing about IPv6 for over a decade. In the first TCP/IP book I co-wrote (TCP/IP Blueprints), I provided some details on what was then (the book was first published in 1997!) the state of IPv6. At that time IPv6 was a cool concept, it was hard to make much of a case for it. My view then was that once Microsoft produced a decent IPv6 stack as standard, folks would flock to it. Well – they did – a good stack was produced for Window XP/Wiv6. Windows Server 2003 – but I was wrong and there was little groundswell for IP. With Windows 7 and Server 2008 R2, Microsoft produced a killer IPv6 feature, Direct Access (see http://technet.microsoft.com/en-us/network/dd420463.aspx for details on this feature). But even with Direct Access, the rush to IPv6 is not really visible.

Well last week, Vint Cerf, the guy responsible for much of what we know as IP today, wrote that we’re running out of time. In an article titled: Google vice-president issues a start internet warning, Cerf says "There's no question we're going to be out of address space by springtime of 2011”. To back him up, here’s an online counter you can use to see just how close to the end of IPv4 address availability:

When I popped this counter up yesterday morning, it showed 101 days till X-day (the day when there will be no more IPv4 address blocks for the regional IP registries to dish out). Later in the day, the counter showed 100 days,  but by this morning, it’s down to 98 days. As the counter is real time – the estimated X-day may well be earlier than 2 March 2011.  What’s worse is that when the number of blocks available (currently there 11)

Frankly, this counter scares me a just a little. Now of course, the world will not end on 3 March, or whenever the day after X-day is. We’ll be able to limp along for many more years thanks to the use of NAT and more aggressive public IPv6 address reuse.

But there are two things that really are clear to me: First, the days of IPv4 really are numbered (and this time we really, really mean it!). Secondly, it's really is now time to learn and deploy IPv6.  I look forward to the discussions with my ISP over IPv6!

What are YOUR plans for IPv6??  You do have some, don’t you!!

 

Technorati Tags: ,,

Tuesday, November 23, 2010

Microsoft Releases Lync Documentation

Continuing the tradition started with OCS, the Microsoft UC team have released a mountain of documentation for Lync 2010. As with OCS, there’s both a set of detailed documents, and a .CHM (complied HTML Help file) with all the documents in one place. Even better, you can get the detailed documents as downloadable .DOC files and as web documents you can read on line. A nice job!
To get to the detailed documents, you can go to this page in TechNet: http://technet.microsoft.com/en-us/library/gg398616.aspx. The .CHM file is at: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9720c3f1-ddd4-426b-b98a-f1205561ce00&displaylang=en.
The UC team is to be congratulated for producing such comprehensive and accessible information. If only ALL software teams were so good!

Monday, November 22, 2010

More PowerShell Training

It must be the season – but I’ve got another 5-day PowerShell course coming up in December. I’ll be teaching in London from December 13th – December 17th at Global Knowledge’s Baker Street centre. I’ll be running the full 5-day 10325 PowerShell V2 Microsoft official class. Five fun days – with lots of great labs. This is a great course and I’m looking forward to teaching it. If you are interested, contact me and I’ll ensure you get the details and can get booked on the event. And, for the lucky few, I’ll have a few copies of PowerShell Plus to give away. So book early!!

Technorati Tags: ,,

Tuesday, November 16, 2010

PowerCamp Weekend PowerShell Session–FULL!

WOW – I know PowerShell is on the minds of a lot of IT Pros, but the reaction to the weekend PowerCamp has been pretty overwhelming. We’re full but are taking names of folks for standby should some of the currently committed folks need to backout. However, we’re looking at some more options.

First, I’m hoping to run some more Weekend PowerShell PowerCamps. I have no committed dates yet, but I’m looking at a date in York late winter and Thames Valley in the spring. As things firm up, I’ll blog them. Where would you most like to spend a weekend – and would you?

Secondly, if you want to really master PowerShell, I am teaching the much longer 5-day Microsoft Class (course 10325) in December. This is longer than the weekend retreats, and has more hands on labs. (and you can more probably pay for the class using SA Vouchers which may help the Enterprise SA folks). The plan is to run this course in London – although the exact location is not yet clear. I’m firming up the location this week and should know by early next week.

Please let me know if you have any interest for any of these PowerShell training sessions!!!

Technorati Tags: ,

Wednesday, November 10, 2010

PowerShell Weekend PowerCamp is Full!

In a blog post last week, I announced a weekend PowerShell PowerCamp event. At the time of writing, we had a few folks interested.  But following Jon’s article in PC Pro and my blog post – the event has generated a huge amount of interest. The original plan was for 10-15 attendees, but demand has exceeded that. The hotel has responded with a a bigger room. So the event is definitely happening and I’ll have a full house! There is a waiting list just in case folks have to drop out – and of course, I’ll be running other, more formal training sessions on PowerShell in the coming months.  And if there is sufficient demand, a further weekend PowerCamp might be a possibility!!

For those who are coming – I look forward to welcoming you on the day and to covering a massive amount of content in just two days. For those NOT coming, you will miss a very interesting and fun event!

Friday, November 05, 2010

Weekend PowerShell Camp Event On The Cards

I’ve been advocating PowerShell to folks far and wide over the years – including evangelising it to my pal Jon Honey ball of PC Pro fame. His problem, like a lot of folks, is that there just is never the time to learn it – plus he knows VBS so that’s good enough, right?  Well, I think I have convinced him that that is the way dinosaurs think and that he really needs to to make the great conversion.

So he’s come up with a wizard idea: a weekend event in, where the dinosaurs and others have a fun time as they come up to speed and finally learn PowerShell. Maybe not EVERYTHING about PowerShell – that would be a pretty tall order for 2 days. But certainly gaining a good comfort factor backed up with lots of resources to help you when you get back home. In other words, a Weekend PowerShell Camp.

The way we’d work it is that I’ll run through the core aspects of PowerShell – and you follow along on your own laptop. I’ll have some exercises you can work through to demonstrate PowerShell’s key features. In preparation, you setup and configure your own laptop - you pick the virtualisation platform and load the VMs yourself. Then, you plug into the wireless and follow along with me. We’ll spend 2 long days drilling into the core of PowerShell and look at what you can do with it. And a nice meal on the Saturday. costs are likely to be around 100GPB for the weekend, including the wireless during the day, coffee/tea all day and lunch in the hotel (you can stay in the hotel overnight should you wish – but you would need to arrange that yourself).  We are planning for the 1st weekend in December at the Marriot in Huntingdon Cambridgeshire. 

As it happens, Jon announced the idea in the December of PC Pro magazine’s Real World Computing section. He has had a number of requests to come along already – with a bit of luck the weekend may already be a sell out.  But if you’ve not registered interest, get in touch with either Jon or myself and we’ll send you the fuller details.

Technorati Tags: ,,

Thursday, October 28, 2010

Choosing a Type Face–Help is at Hand

The type face or faces you use in your writing can have a profound effect on how your message is received and how people perceive you. In the long distant past, I learned how set type by hand and how to bind books – and I still love the whole process. The trays of different size fonts, the smell of the inks, being able to set physical type quickly (memorising where each letter is found in a type case) and being able to break down a page and return the different type pieces to their correct place, etc. One semester, I earned money printing all the signs that that the union put up to advertise events and did some t-shirt silk screening for event t-shirts. I even bound a course thesis – gaining an A if only for the pretty leather cover!

While much of the mechanisms of hand typography are now history, the value of specific fonts remains. If I were to post an article in Comic Sans, readers might not take it seriously. And posting my PowerShell scripts in a variable width font might make the script a lot harder to read. Using multiple fonts may seem like a good idea but end up confusing the reader. So many fonts, so many mistakes awaiting. Oddly enough type faces have been in the news a bit lately.

One of my favourite fun fonts is Comic Sans. I find it neat, elegant and informal. However today I discover that it’s the most hated font in the world.  See the BBC’s on-line article: What’s so wrong with Comic Sans?  I’m still convinced Comic Sans is not all that bad!!

Next I found an interesting albeit long article in the On-line Guardian entitled  “True to type: how we fell in love with our letters.” This is a super article by Simon Garfield that examines the history of type faces, the care often taken in their design and some of the terminology of typography. I really enjoyed reading this article despite it’s length! It definitely brought back memories of hand type setting.

Finally, the thing that sparked this blog article. Having used fonts for many years, I guess I am aware of some of the pitfalls of a bad type face choice. For the most part, I tend to stick to what I like. I love Trebuchet for the body and title of this blog for example – and have done for some years. No one’s commented on it so I guess it’s OK. But for the uninitiated, I’ve found a super graphic that helps answer the question: what typeface should I use. 

The graphic, effectively a large flow chart, is at:  http://inspirationlab.files.wordpress.com/2010/04/infographiclarge_v2.png. This graphic starts by asking what sort of project you need a type face for (Logo, Invitation, book, etc.). Then it asks you some questions (are you completely in doubt, do you want new or older faces, did you cry when you watched Terminator). Based on that information, the graphic makes some suggestions. So if you are looking to create an infographic, that’s condensed  and is without a lot of tables (oh and you did cry watching Terminator), use the OCR typeface for example. The graphic is a PNG, and you need to blow it up a bit in order to read it. But like the Guardian article, this graphic has been fun to look over!

So much like the number 11 bus – you wait for ages then three come along at once – today’s been a pleasant diversion into type faces. Now back to my day job.

Technorati Tags:

Lync Server 2010 Reaches RTM

In a post on the UCG’s Team Blob, Kirk Gregersen announces that MS have completed RTM for Lync Server 2010. General Availability is set for November 17th . The launch will be a virtual event – watch it http://www.microsoft.com/lync.  Training courses to match the two upcoming Lync MCP exams will be available sometime next spring/summer.

Lync 2010 looks to be a really excellent product. I’m teaching my first Lync course this week (Lync 2010 Ignite). We’re doing pretty much all of the product over a packed 5 days. The course is running on top of the RC version of the server using Windows 2008R2 virtual servers running inside Hyper-V. We’ve managed to make most of the key scenarios work – IM, presence some conferencing and voice. Some of the modalities are not easy due to the constraints of the classroom equipment. As I tell the delegates, if they go away thinking you need serious hardware to run Lync well, then I’ve done a good job. The labs were mostly successful. Most of the delegates got most of the labs to work – there was the odd typo and some hyper-V glitches. Not bad for a beta product. The beta programme was quite rushed so to some degree, waiting for the first set of roll-up patches will probably make sense for most customer.

Nevertheless, it’s time to start the planning process. And the training process. This is going to be a rock and roll product that finally is, not only a great IM/Presence/Conferencing product, but a creditable alternative to iron PBXs. I can’t wait to do more training in it. And for any company planning to deploy it – get some training. This is a rich complex product that provides critical enterprise infrastructure. It needs careful planning and disciplined knowledgeable support.  End-user training should be undertaken to ensure that the users can take full advantage of the richness on offer!

One thing that comes out loud and clear this week is that PowerShell is really required to administer LS2010. The new Silverlight Control Panel is nice, but there are a lot of things for which PowerShell and the over 500 Lync cmdlets are just better for, particularly when you start talking about Enterprises and full voice deployments.  I hope organisations that plan to invest on Lync will send their IT Pros on a good PowerShell class.

As it turns out, my mate Jon Honeyball and I are organising a PowerShell PowerCamp Introductory Weekend where we’re going to condense the normal 4 day master class down in to two – he announced it in the . More details on that soon – and I’ll also be pumping some new PowerShell Lync scripts onto my scripting blog. And if you want the marginally less-manic version, I’m teaching PowerShell in London in mid-December!

In summary: Lync 2010: welcome to the world! May you have a long and prosperous life!

Technorati Tags:

Friday, October 15, 2010

Administrator's Crash Course in PowerShell–EBook

Powershell superstar Don Jones has published a 4-part Crash Course in Windows PowerShell V2. Get it at: http://nexus.realtimepublishers.com/accwp.php

Technorati Tags: ,

Thursday, October 07, 2010

Microsoft Launches Course 10325–Automating Administration with Windows PowerShell 2.0

Over a year after Microsoft launched Windows PowerShell V2.0, Microsoft Learning has now launched a formal course with the above title.  This is long over due but very welcome.

From Microsoft’s announcement, this “five-day, instructor-led course offers you the knowledge and helps you develop the skills you need to automate administrative tasks using Windows PowerShell® version 2. The course describes core features and capabilities of Windows PowerShell version 2, using Windows Server® 2008 R2 as the example software environment.”

Well that’s the good news. The bad news, again from Microsoft’s formal announcement  “However, this course is not intended to provide comprehensive coverage of either Windows PowerShell version 2 features or Windows Server 2008 R2 features.

This is a good course (I was Technical Reviewer on it), and I will enjoy teaching it. Not only that, but it leaves room in the market for my own PowerShell Master Classes!

As an MCT, I am ready, able and willing to teach this class anywhere in the world. Have passport (and laptop), will travel.

Tuesday, October 05, 2010

Failover Clustering Cmdlets–Great Documentation

I just came across a really great page that documents the Failover Clustering Cmdlets in Windows Server 2008 R2. This page from Jose Barreto’s blog has a super diagram showing a model of these cmdlets. This model shows a box for each noun used by the cmdlets. Inside each box you see the the verbs that operate on the the noun, as well key attributes of a specific instance of that noun.  Thus for the Cluster noun, you see two identifiers (-ClusterName, –Properties) and the supported verbs (Get, New, Remove, Stop, Start, Test). Then you get links between the various objects showing how they relate to each other.  Then you get links between the nouns/objects. In other words - a good old fashioned data model.

For any cmdlet set, verb names are going to be constrained, e.g. get, set, new, start, stop, etc. So to learn a set of cmdlets, you need to focus on the nouns. Once you know the nouns, you will know the cmdlets (well for the most part). The diagram does a great job of showing how the the individual clustering objects (i.e. the nouns) relate to each other. What this diagram does so well is that it also shows the key objects involved in fail over clustering and how they relate since the cmdlet nouns are the key failover clustering objects.

Microsoft should document all cmdlet sets like this!

 

Sunday, October 03, 2010

PowerShell in Windows–A Nice Feature List

The TechNet folks have produced a nice list of PowerShell features offered by Microsoft. This page has a list of all the features offered plus links to information about how to get the individual features. The list looks reasonable complete – and is a good jumping off place for learning more about PowerShell in Windows.

Sunday, September 26, 2010

Lync Server 2010 and Virtualisation

With the Lync Server 2010 RC available, the details of what it will take to run Lync in production are emerging. One really nice change from OCS 2007 is that Lync is now fully supported when virtualised. With OCS 2007, only some roles were supported, although anecdotal evidence suggested OCS would work OK virtualised – the issue was more with the client.

This means that all major workloads, including presence, IM, conferencing and Enterprise Voice can be run in a virtual environment. This includes Standard and Enterprise editions. There are some restrictions on virtualisation platforms though, only VMware and Hyper-V are supported. For both virtualisation platforms, only Serve 2008 R2 is supported. And for Hyper-V, you must also run the host as Server 2008 R2.  Microsoft will support virtualisations using SE to support up to around 2000 users and Enterprise Edition pools supporting up to 40k users. Edge servers can also be virtualised.

For Hype-V at least, the hosting requirements will significant: 8 Core 2.27Ghz processors with 16GB+ of ram and fast disks (particularly for your back end SQL servers). With virtualisation, your overall consolidation ratio is around 3:1 A suitably speced out host machine will support around 4 Front End servers, or 4 A/V Conferencing Servers for a user base of up to 40k users. For full functionality, you’d also want at least Directors (2 Director roles can be co-located on a single Hyper-V host) and two Edge servers (also co-located on a single VM host). You can also co-locate your Monitoring and Archiving server roles.

You can also virtualise your SQL Server back end database, but in a large Enterprise environment, you may just want to keep your back end cluster as a pair of real servers. You can of course, co-locate two SQL Server VMs on a single host to serve as your fail over back end cluster. Although this only provides resilience in the case the guest OS or applications go down!

The total level of consolidation in such a scenairo would be from around 19 servers, down to around 6 or 7 large hosts machines. You’d then need to consider your Mediation Server requirements! To some degree, the number of mediation servers required will be based on your requirements (how many PSTN ingress/egress locations do you have and what sort of gateways are  you using). With Lync 2010’s Media Bypass facilities (and suitable PSTN gateways!) you could co-locate up to around 4 Mediation Servers on a single host. My guess, although I do not have the means to test it) is that you could probably support more Mediation Servers on a given host, depending on the Gateway architecture

Thursday, September 16, 2010

Windows PowerShell Cookbook–2nd Edition

Lee Holme’s latest book, Windows PowerShell Cookbook (2nd Edition) has finally made it to the UK. I ordered this book as soon as O’Reilly mailed me to say it has been released. I arrived home last week and I’ve been eagerly poring over it with some enthusiasm.

This second edition is a significantly expanded work, now around 850 pages in print. There are hundreds of examples of how to use a specific aspect of PowerShell along with commentary explaining what’s going on. If you know PowerShell fairly well, there are always those nooks and crannies you’ve not explored thoroughly . I started playing today with p/invoke to get access to Win32APIs, for example, which was something I’ve been meaning to do for a while, and I also discovered a cool switch on the Add-Type cmdlet that solves a problem I’ve been having for while!

The full set of sample scripts is also available - http://examples.oreilly.com/9780596801519/PowerShellCookbookModule.zip.

If you go to the O’Reiley catalogue page, you can order the book along with an E-book. I have the e-book on my phone for viewing and consuming when I’m on the move (a great way to spend a 2-hour flight – reading more about Powershell).

In summary: buy this book.

Tuesday, September 14, 2010

Microsoft Lync 2010/Microsoft Lync Server 2010 - Resources

Here are the resources I’ve found so far. I am updating this regularly as I find more stuff!

Last Update: 13:15 18September 2010

 

Background Information

Here is some background information on Lync Server 2010 and Lync 2010:

Lync Software Components

Microsoft has released some product bits of the product as separate downloads:

Microsoft Blogs

Non MS Blog Posts

Podcasts

Planning Tools

Product Documentation

Microsoft has released several white papers on the http://technet.microsoft.com/en-us/lync/default.aspx site, including:

  • Determining Your Infrastructure Requirements for Lync Server 2010 (RC).doc - Download
  • Planning for Archiving Lync Server 2010 (RC).doc - Download
  • Planning for Clients and Devices Lync Server 2010 (RC).doc - Download
  • Planning for Enterprise Voice Lync Server 2010 (RC).doc - Download
  • Planning for External User Access Lync Server 2010 (RC).doc - Download
  • Planning for IM and Conferencing Lync Server 2010 (RC).doc - Download
  • Planning for Other Features Lync Server 2010 (RC).doc - Download
  • Planning for Your Organization Lync Server 2010 (RC).doc - Download

Pricing and Licensing

Lync Server 2010 follows a Server/Client Access License (CAL) model whereby a Lync Server 2010 license is required for each operating system environment running Lync Server 2010 and a CAL is required for each user or device accessing the Lync Server.

  • Pricing for Lync Server and Client – this page sets out the details of licensing for Lync Server and client.  Pricing on the page is ‘estimated’ – in other words see your reseller as prices will vary from the 'official’ costs shown here.

Support

At present, there’s no formal support for Lync 2010.  At present, the two places where you can find more information are Microsoft’s OCS 2007 Forums:

Webcasts – CS14 at TechEd

Microsoft presented CS14 topics at TechEd North America earlier in 2010. The presentations and slide decks are all available for download and use. These presentations talk about CS’14’ – but aside from the branding, the details are the same!

Press and Release PR Coverage

As often happens, much the industry found out about Lync Server’s public debut from non-Microsoft sources, quickly followed by the MS presentation. Here is some of the press background if you are interested.

Email me any changes or updates and I’ll try to keep this list up to date!

[UPDATES TO ORIGINAL POSTING]

  • 15 Sept 2010 - Added CS4 web casts, Added Podcast section and did some minor re-org of the list itself. Also added update list
  • 17 Sept 2010 – Separated out the Press/PR stuff from basic tech info. Added Lab deployment guide reference.
  • 18 Sept 2010 – fixed missing link to Thomas/Cezar's podcast, added Worked Deployment Guide from Jeff Schertz.
  • 4 Oct 2010 – added details on licensing and links to planning documentation.

 

Technorati Tags: ,,

Monday, September 13, 2010

PowerShell Master Classes

I’ve been teaching my PowerShell Master Classes both in Europe and in the US over the past 6 months. After two classes in Stockholm, I taught in the US (teaching Microsoft’s Hotmail Engineering team), and in Copenhagen – plus a one-day session for a client in the City of London. 

There are now two classes – both three days. The PowerShell Basics class covers the basics of PowerShell both from the command line and as a scripting tool. The PowerShell Advanced class looks at more advanced features of PowerShell, particularly its use in the OS, as well as key applications including SQL Server, Exchange 2010, SQL and IIS.

The next runs of the PowerShell Master Classes are:

I’ll post more details on the agenda for these classes shortly. I am also working on a Weekend 2-day Script Camp – watch this space for more details once we have them finalised.

Microsoft Ships RC of Lync (renamed from Communications Server)

Thanks to May Jo Foley’s piece in ZDNet, I see Microsoft has just shipped a release candidate for Lync Server 2010. Lync, formerly known as Communications Server ‘14’ is the successor to Office Communications Server. The name, said to connect link and sync, is important in that it simplifies the branding with much shorter names for the constituent components.

Lync combines presence, instant messaging, conferencing and telephony – allowing you to simplify communications and in due course reduce the costs of running your legacy phone system.  Presence enables your users to know what each other is doing thus simplifying communications. If I want to chat to someone, and I see they are in a meeting, I know the call would be wasted. Combined with presence, IM enables fast peer to peer and sometimes peer to multiple peer communication. Lync 2010’s voice capabilities should enable many companies to adopt the product as their main PBX.

At the time of writing, Microsoft has put up the RC for download here: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=29366ba5-498f-4d21-bc3e-0b4e8ba58fb1&utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+MicrosoftDownloadCenter+%28Microsoft+Download+Center%29#tm (don’t you love the snappy urls?). This page also has links to more Lync Server 2010 information, but these links do not yet exist. No doubt these will get put up shortly.

The download is just over 1.5GB and contains both the Standard and Enterprise Editions of Lync 2010. In keeping with recent platform changes, this RC (and the final product in due course) ships as 64-bit only which means you need to be running a 64-bit OS (and here I recommend running Server 2008 R2!).

Over the coming weeks, I’ll blog more about the functions and features of this cool product. Not least of which is the PowerShell interface.

Saturday, September 04, 2010

Calling Functions in PowerShell

I spent quite a bit of time earlier this week with a problem in calling worker functions. In a PowerShell script, or a PowerShell session, if there are a set of commands you run more than once or twice, one thing you can do is to put them into function then just call the function rather than typing out all the individual commands. Worker functions can make scripts a lot shorter. You can see an example of a worker function over here: http://pshscripts.blogspot.com/2010/09/get-umalquracalendarps1.html. In that example, you can see a worker function, DisplayValues (begins at line 45), which I then call several times in the script.

The problem I had this week was that for some reason, the worker function was spewing out nothing like what I was expecting. I started at the code for some time before spotting the problem – I’d not use the right calling process to invoke the function. A typical newbie mistake.

In .Net method calls, you state the name of the object, a “.” followed by the method name, and a parameter list enclosed in parentheses:  $object.method($a, $b, $c).  But a function is called without the parentheses, and the  parameters are space, not comma delimited, or function $a $b $c.

To illustrate this problem, I’ve written a little script that defines a worker function then calls it several ways:

function wf1 {
param (    $a, $b, $c)
"`$a:" ; $a; ""
"`$b:" ; $b; ""
"`$c:" ; $c; ""
}

wf1("Foo",'Bar',"foobar")
wf1  "Foo",'Bar',"foobar"
wf1  "Foo" 'Bar' "foobar"
wf1 –c “foobar” –a “Foo” –b “Bar:

The output from this is left as an exercise for the reader!

Now the first two times the script calls the worker function, PowerShell assigns the array (i.e the stuff delimited by commas) to the first parameter, leaving the second two parameters empty. Not what you want. The second two examples call the worker function correctly. Arguably the last of the calling sequence is better from a production orientated point of view.

On interesting thing – all four of those calling sequences ‘works’ and by default presents no apparent errors. However, if you set strict mode (Set-Strictmode) and setting version to 2 would warn that the first call was in error like this:

PSH [C:\foo]: . 'C:\Users\tfl\AppData\Local\Temp\Untitled5.ps1'
The function or command was called as if it were a method. Parameters should be separated by spaces. For information about parameters, see the about_Parameters Help topic.
At C:\Users\tfl\AppData\Local\Temp\Untitled5.ps1:8 char:4
+ wf1 <<<< ("Foo",'Bar',"foobar")
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : StrictModeFunctionCallWithParens

Now had I had the relevant line set in my profile, I’d not have wasted an hour wondering why things were not working.

Thursday, September 02, 2010

Paper.Li – Organising Twitter Information

Although Newspapers of the physically printed variety are dying all around us, the metaphor that is a newspaper fails to die. I’ve been playing a bit today with Paper.Li – one of those hundreds of sites that leverage Twitter and add value to your Twitter stream. I’ve created my own 'newspaper’ - http://paper.li/doctordns. This page is updated once every 24 hours and features links that Paper.Li has gleaned from my twitter feed.  It’s nicely laid out and features my own tweets, plus tabs I follow. In my case, the paper also includes tweets with the hash-tag #PowerShell. I’m kind of surprised I don’t see more Grateful Dead links, but we’ll see.

The papers that you can create with Paper.Li are one of three broad types: You and your tweet stream, hash tag, @people. The first is the model I noted above – Paper.Li parses your tweet feed/stream (tweets you get from those you follow and those you make) and makes a paper. The second makes the newspaper from tweets containing a particular hash tag. For example, the PowerShell hash tag is #PowerShell, and there’s a related newspaper  http://paper.li/tag/PowerShell.  The @people paper is based on a list of folks you create on Twitter. http://paper.li/jkavanagh58/powershell, for example, is a paper based on @jkavanagh58’s PowerShell twitter list.

 

 

Technorati Tags: ,