This is the list of proposed sessions for 2013. It is subject to change depending on circumstances.
All sessions are delivered by Live Meeting on Tuesdays at 7:30 UK time
29 January – PowerShell and Active Directory 26 February – PowerShell Advanced Functions 26 March – PowerShell cmdlets for Hyper-V 30 April – Notes from the PowerShell summit (may be changed) 21 May – Powershell Web Access 25 June – guest speaker PowerShell MVP Max Trinidad 30 July – Lessons from the Scripting Games 27 August – PowerShell eventing engine 24 September – CIM – cmdlets and sessions 29 October – PowerShell and XML 26 November – PowerShell type system – formatting and types files 17 December – PowerShell error handling
I was asked about searching a user name for a string and replacing it so that the object is renamed.
This is a three stage activity. First get the user. Two modify the name. Three rename the object. In active directory the name attribute has the LDAP name of cn but the Microsoft AD cmdlets treta it as name. So we end up with this code:
My company has been contracted by Microsoft to design and author Microsoft Official Curriculum (MOC) course 10961A, Automating Administration with Windows PowerShell v3. While there is no announced release date I can share, I did want to share some of the experience. As I write this, 10961A’s proposed outline is going through several review cycles. In the meantime, I wanted to sit down and start doing some detail-level design on some of the more complex labs in the course - the most complex of which is a proposed Module 10, consisting of little more than a big, 2-hour lab where you write a script to provision a newly installed Server Core computer. This, for me, is the ultimate lab. It’s practical, meaning it focuses on a scenario that’s extremely real-world. It’s also not “perfect,” meaning it doesn’t throw you into an everything-just-works environment and hand-hold you though a few self-guided demos. Initiating communications between a domain client and a non-domain machine is tricky in PowerShell, and automating that is not entirely straightforward. The approach I’m planning to take will break down all the major sub-tasks, and then walk students through some of the considerations for each. What commands will you need? What information will you need up front in order to run them? Where will you get that information - and how? I think it’ll be a very nice “putting it all together” module (although there are two modules after it, so it isn’t exactly the end of the course). It should occupy the entire afternoon of the course’s fourth day (Thursday), which makes for a nice open-ended wrap to that day (meaning faster students can finish and leave early, while leaving time for slower students to work through everything without feeling rushed). In the lab, you’ll write a parameterized script that saves off your old Remoting TrustedHosts list, queries DHCP for the new server’s IP address, and saves that IP address into your TrustedHosts. You’ll make a Remoting connection to the new machine and have it join itself to the domain while renaming itself, wait for it to reboot, and then add a role (IIS) to it. You wrap by putting TrustedHosts back to where it came from. This is actually a trimmed-down, more methodical version of a workshop I just did last week at Live! 360 in Orlando. That workshop took four hours, which I don’t have in the class’ time budget, so I trimmed out a few things that were cool, but not entirely necessary, such as testing to see if a DHCP reservation already exists before creating one (without testing, you can potentially get an error, but it’s non-tragic). I’m looking forward to getting into the actual writing of the module once the outline is approved; I think this’ll really be the highlight of the course. It replaces a module in the older 10325A course (which I also wrote) where you break down a script someone else wrote, customizing it to run in your environment. While I think that’s a useful skill, the feedback I got was that it wasn’t the most interesting lab possible, and that the script I provided (written by Jeffery Hicks, actually) was pretty complex given the time allotted. This new lab provides the same beginning-to-end scripting opportunity, but hopefully folks will find it to be a lot more practical and useful, both educationally and when they get back to the office.
PowerShell Deep Dives is a book put together by the PowerShell community. I"™m editing one of the sections and have contributed some of the chapters. Manning have just started releasing it on their MEAP program. The full book will hopefully be ready in the spring.
Best of all the royalties are being donated to worthwhile cause.
John Mello gave a presentation entitled “Intro to PowerShell’s Pipeline, Part 1”. A copy of his slide deck and code examples are available here.
Script Club :
John R. Nahrgang and [Lido Paglia](http://paglia.org/)Â presented a work in progress script that returns all the members of the Local Administrators Group on a filtered list of Active Directory PCs. A copy of the script is available [here](https://powershell.org/wp-content/uploads/2012/12/PhillyPosh_2012-12-05_ScriptClub.zip).
Various other information worth mentioning.
In response to [last month's script club](https://powershell.org/2012/11/08/phillyposh-11012012-meeting-summary-and-presentation-materials/), Carl Larson submitted a script that splits an Active Directory users' *distinguishedName* into an array and then put's it back together so that you can get the Parent OU. This script is meant as a jumping off point for [John Mello's](http://mellositmusings.com/) expressed difficulty trying to pull a user name from a full Active Directory path. A copy of the script is available [here](https://powershell.org/wp-content/uploads/2012/12/PhillyPosh_2012-12-05_Extras.zip).
As I write this, we’re down to one ticket for the PowerShell Summit North America 2013. So what do you do if you really wanted to go, but miss that last, golden ticket?
Cry a Little
Let’s face it, this was totally avoidable. It’s probably your boss’ fault for not approving the expense, and so some subtle retribution may be in order. Burn the coffee for a week. Reboot domain controllers randomly. You know, just sulk.
I’ve written previously about my frustration with reporting in PowerShell - how I see admins struggle with ugly, low-level COM code to manipulate Excel spreadsheets, just so they can get nice-looking reports with a degree of automation. Enough. The right thing to do is put your data in SQL Server, and use SQL Server Reporting Services to generate awesome looking reports, complete with charts and graphs. With the right setup, you can completely automate data collection, report generation, and delivery. And it doesn’t have to cost a single dime. Plus, the learning curve isn’t too steep, and the skills you’ll learn along the way will be massively beneficial to you over the long haul - far more so than the time sunk into becoming an Excel jockey. So I’ve written a little book about it, which you’ll find on at https://powershell.org/ebooks, entitled Making Historical and Trend Reports in PowerShell. Unlike my earlier book on HTML reporting, which was mainly around producing inventory reports, this one’s specifically designed to make reports based on collected-over-time data, like disk utilization, performance, and so on. And I’ve bundled in a PowerShell module that should make this easy, insulating you from 99% of the SQL Server-related stuff. Right now (November 2012) I’m looking for folks to test stuff out and let me know (via comments here) if you find any problems. I want to make sure that what I’ve got in here works and is understandable. Final publication is scheduled for January 2013, after which I’ll start taking suggestions for stuff to add to the book.
So, as you may know, I have an ongoing hobby project called _Creating HTML Reports in PowerShell. _I’m working on an update for next year, and one of the things I’ve been looking at are embedded charts within the report. Problem is, I don’t know what people would actually chart. Now… I’m going to ask you for ideas, but you need to read this whole post before you go popping a comment in. Because there are some restrictions. First, I’m
not talking about historical data or trend reports
. Those require a data store of historical data. If you’re not using SQL Server for that (even free SQL Express), learn how. Excel isÂ
not
your trend database, no matter how little learning it requires (and I bet if you added up all the time you’ve spent becoming an Excel jockey, you’d be shocked). Once you’ve got the data in SQL (even Express), you can use SQL Server Reporting Services (SSRS) to generate truly kick-butt reports with very little effort. Reports which can be scheduled and e-mailed. Truly, folks, this is worth spending time on - and I may make that my next ebook project. **Second, **don’t tell me “disk space.” I know that one. Pie and stacked bar charts showing size/free space are a great idea. Got it. Anything else? **Third, **I’m not talking about performance charts. PerfMon does those, and also, see my first point. PowerShell is not a performance monitoring tool. Operations Manager is. Oh, and it dumps data into SQL Server and you can use SSRS to report on it. If your company needs historical performance reports (and most probably do) and is to cheap to get you a real monitoring solution, consider taking drastic measures. I’m not suggesting you put Ex-Lax in the boss’ coffee every time he asks you to re-create OpsMan on your own. He’d deserve it, and it might help, but I’m not suggesting it. In keeping with point 3, that means I don’t want suggestions like “charts showing network throughput.” That’s performance. I’m not suggesting such a thing wouldn’t be useful, because I know it would be. I’m saying it’s out of scope for this particular project. If you give me in-scope suggestions, I’ll build you a tool. Fire off out-of-scope stuff and I’m just going to go build a kegerator for my beer instead. SO… given those restrictions, what sort of data could you query from a computer (say, using WMI/CIM or something) that you’d want displayed in chart form? Anything?
A long time ago… about a year, in fact… Jason Helmick and I started talking about a community-owned PowerShell “certification.” It went nowhere. Well, not very far. Some background on exams: Microsoft, in my opinion, will never do a PowerShell cert. I say this having been part owner of a company that did outsourced exam development for the company. The deal is that Microsoft tries to certify _job tasks, _not _tools. _Nobody (well, maybe me) wakes up thinking, “gonna do me some PowerShell today.” No, PowerShell is the means to an end: “gonna automate me some user creation today” is more likely. And Microsoft tries to certify that end. PowerShell’s an important tool, and it already shows up on certification exams here and there. For the most part, I agree with Microsoft’s reasoning, there. The argument can be summarized as saying “bosses don’t hire IT pros based on their ability to operate a low-level tool, they hire them to perform job tasks, which encompasses the tool.” Except that, in the case of PowerShell, I think it’d be tremendously useful for an employer to use PowerShell expertise as a discriminating factor in hiring. I mean, “someone who can automate stuff” is more valuable than “someone who can only do stuff manually,” in any situation. So “PowerShell Verified” was intended to be a way for someone to prove - at least to themselves - that they’ve taken their PowerShell skills _to the minimum level necessary to be an effective automator. _Not a guru. Not an expert. Not Poshoholic. _Minimally effective, _who could then grow from there with experience. So that’s what I’m going to put together. I want to explain why I’m not using the word “Certification,” though. In my mind, certifications come from, mainly, first-parties like Microsoft. Microsoft has to jump through a lot of hoops to make sure their exam content is accurate, legally defensible, blah blah blah. They worry about security, brain dumps, and other stuff that diminishes the value of the certification. I don’t have that kind of bandwidth or their resources, so in many ways my little program will be less effective than a “real” certification. Plus, few bosses will give a rat’s patooty what that Don Jones guy said about your skillz (I can’t even convince bosses to buy you guys 12-core 64GB workstations for your desk). So my “Verified” program is going to be _low stakes, _meaning you take it to prove something to _
yourself
_. Here’s how this is going to go.