I must say it feels like it was ages ago when we started games, but we are almost at the finish line. I have no idea who is going to win the whole thing, but I have few candidates in mind that did wonderful job and quite frankly: I was learning from them, not other way around. Looks like I’m getting rusty with whole this “scripting” thing.
I must say I was a little puzzled when reading description for this event. For me the main issue in this even is the lack of information about DHCP server. I assumed this is Windows 2012 (same as Hyper-V host), but I can’t find it anywhere in event description (I may be tired though and simply missed it). To be honest: we are not event told that DHCP server runs on Windows.
This tip may be helpful to most of people, but is specifically targeted for people who share code on blogs and any similar media where width is issue at times.
So far I had two solutions, depending on the pipeline “type”:
- multi-command pipeline – breaking on the pipe symbol
- single-command pipeline – splatting
I avoid backtick (`) as hell, because single whitespace added by potential user after it and whole code becomes broken.
Today – less PowerShell-ish topic, although PowerShell was both used and was main reason I started this journey. Few days ago Windows 8 RSAT RTM went out. Like many other admins I jumped on this wagon as soon as possible. I’ve installed the package and… nothing happened. I haven’t seen any errors yet tools that are part of RSAT where not present on my box. What I did? Obviously, I went to google and asked for solution. But found only few other folks that had the same issue, and many others who installed this package without any issues at all. Something had to be different, but I had no idea – what?
I’m currently working on a small project that will use constrained remoting endpoints together with RunAs credentials. It all went fine until I decided to change part of configuration for a moment to test something. I’m using PSSession Configuration Files all the time, so I decided I will create a new one, different from the one used before and just change configuration of endpoint using Set-PSSessionConfiguration cmdlet.
WMF 3.0 RC is awesome. It was great in CTPs, even better in beta, but it improves with each following version. One of my favourite additions in RC depends on thing that existed in PowerShell 2, but it was ignored because we could not see any value in it.
The reason for that was simple: it was just a metadata. Unless you would look closely at any command, including self-defined functions, you would never notice it’s there. It changes with version 3. Now knowing in advance what command will output can give authoring tools and hosts ability to act on this information.
Today I would like to write few words about why you shouldn’t work too hard with creating output when PowerShell can do the work for you.
Scripting, as I see it, is a way of taking stuff that “is there” and force it to do my job in a way I want it to be done. If there is something that will do job for me – I will use it. If not – I will create it. So my role is just to build the bridges, not whole road next to the old one.
Obviously, at times you do not know that road already exists. That’s where stuff like Scripting Games help a lot. I for one learned few neat tricks already. But if you fail to see highway and claim to be advanced scripter – be warned, I won’t praise your rocky road that you’ve created next to it. To the point.