Category Archives: Extra

More blogs, articles, reviews, and anything else that is PowerShell-related, but doesn’t necessarily fit into the other categories.

The 100th Post

In less than two years time, I’ve written and published 99 posts:

the-100th-post-01

On this note, welcome to post 100! This is a exciting achievement, especially since I didn’t even like PowerShell much when it was first introduced (as Monad). I really preferred VBS then, and I didn’t even care much that we — Microsoft admins — were getting a shell, too. It didn’t all register then, and realistically, it was probably because I was still somewhat early on in my career.

It feels like I just bought the tommymaynard.com domain name and made the commitment to associate myself with Windows PowerShell. Post 100 is a post I didn’t even know was a possibility. In fact, the number of posts were never a consideration. It’s always been about quality, even in brief, right-to-the-point posts. I’ve tried to elevate this blog, by using simple and clear examples to help teach some of the basic and intermediate concepts. I intentionally add clues and use full descriptions to encourage and assist my readers.

In celebration of post 100, I’ll list my top 10 favorite posts, in no particular order:

1. Quick Learn – Clear-Host, Without Clearing the Host
http://tommymaynard.com/ql-clear-host-without-clearing-the-host

2. Quick Learn – Using OutVariable — Why Don’t I Do that More Often?
http://tommymaynard.com/ql-using-outvariable-why-dont-i-do-that-more-often

3. Script Sharing – Return File Sizes in Bytes, KBs, MBs, and GBs, at the Same Time
http://tommymaynard.com/script-sharing-return-file-sizes-in-bytes-kbs-mbs-and-gbs-at-the-same-time-2015

4. Script Sharing – Two Old HTAs: LoggedOnUser and Remote Desktop Assistant
http://tommymaynard.com/script-sharing-two-old-htas-loggedonuser-and-remote-desktop-assistant-2015

5. Quick Learn – Run Background Commands after Every Command (Part II)
http://tommymaynard.com/quick-learn-run-background-commands-after-every-command-part-ii-2015

6. Quick Learn – Determine if the Alias, or Function Name was Used
http://tommymaynard.com/ql-determine-if-the-alias-or-function-name-was-used

7. Quick Learn – Proving PowerShell’s Usefulness to Newbies, Part III
http://tommymaynard.com/quick-learn-proving-powershells-usefulness-to-newbies-part-iii-2016

8. Quick Learn – Give a Parameter a Default Value
http://tommymaynard.com/quick-learn-give-a-parameter-a-default-value-2015

9. Quick Learn – Save External Dynamic IP to Dropbox
http://tommymaynard.com/quick-learn-save-external-dynamic-ip-to-dropbox-2015

10. Extra – Why is there a tommymaynard.com?
http://tommymaynard.com/extra-why-is-there-a-tommymaynard-com-2016

How Do I Start to Learn PowerShell?

I’ve been around the Windows PowerShell community awhile, and its various forums, and have noticed a consistent theme: People often ask how and what to use to learn PowerShell. There’s plenty of articles and other content out there — ten years’ worth now — and people still ask. While I began this site to help teach PowerShell, depending on the day, it may not always the best place to start. So, what is?

There’s two things I’ve often recommended to help people learn PowerShell. One is what I would consider to be the de facto standard of all introductory PowerShell reading, Learn Windows PowerShell in a Month of Lunches, Second Edition written by Don Jones and Jeffery Hicks and published by Manning Publications.

I read this book after I had already spent a couple years learning PowerShell. While I appreciated seeing what I missed in my own education, I realized with every page turn that I could’ve learned everything I knew, in a lot less time. All I would’ve had to do was buy the book first, and make a commitment to read it. If you’re new to PowerShell and you suspect that you’re going to be a Windows system administrator in the future, then buy it and read it now, before you end up hating yourself for not doing it sooner. Let me know if I get the cue to tell you, “I told you so,” or not. I hope I don’t.

The other thing I’d recommend are two video series found on Microsoft Virtual Academy. This really helped solidified some concepts. The first one is called Getting Started with PowerShell 3.0 Jump Start. The second series, to be watched after the first, is called Advanced Tools & Scripting with PowerShell. 3.0 Jump Start. While these both focus on PowerShell 3.0, they are both still quite relevant to the current release (PowerShell 5.0, at the time of this writing). I’m not sure which I’d recommend you do first — the book or the videos — as I’m not sure if one sequence would be better than the other. Either way, do both as they ensure a good amount of beneficial exposure.

There you go. These are my two, top recommendations for learning Windows PowerShell. It should be said, that in addition to these two, one of the things I did (and I’ve said it several times now), is ensured I learned at least one new thing about PowerShell every day (no matter how big or small, or what day it was). PowerShell is an important part of the future as a Windows system administrator, whether or not, you believe that right now.

Why is there a tommymaynard.com?

If someone told me a couple years ago that I would have my own Windows PowerShell website by now, I might’ve thought they were crazy. It was back then when I was relatively new to PowerShell. I had pieced together a few scripts by then, but I wasn’t anywhere near where I am now. This isn’t to imply I know it all; I’m certainly still learning something every day — that’s actually the way I became successful with PowerShell.

But, here I am. It’s just over 20 months now, that I’ve had my own site, and have been sharing scripts, providing some quick learning, and generally, talking about PowerShell in one way or another. Prior to my most recent position, I was spread too thin; I knew a little about a lot. Today, I know a lot about only a handful of technologies, allowing me to gain a deeper perspective and understanding. My knowledge of PowerShell proves this.

Yesterday, I received a PM on Reddit. That’s happens a fair amount of the time, as it is one of the places I go to learn and read, and assist with PowerShell questions when I can. While these are typically comment replies, this one was a direct message, straight to me, from some unknown person. Here’s a screen capture of the message.

The tommymaynard.com Website01

First off, I don’t get anything tangible from this website. In some ways, it’s just a storage for things I may want to reference later. More so, however, it’s to give people that want PowerShell content to have another place to consistently find it. I remember those nights, not quite ready to fall asleep and looking for some PowerShell content to read on Twitter. I often found something, and then learned something in the final minutes before sleep. This actually led to several dreams about PowerShell, which was fine. I think I tried to convince myself I was learning in my sleep, too. The posted articles on Twitter made me successful, in that they provided an opportunity for continual learning. At some point I decided I wanted to give back.

All of this to say, that while this site isn’t lining my pockets in cash, it’s serving a purpose, and now I know it for sure. It’s refreshing to know that I’m not writing to myself. That said, hopefully it’s more than just me and “that person from Reddit.” I think it is; I think this site is truly helping people learn PowerShell, and that right there, is my reward. I’m happy that I get to play a part in helping current, but most likely new, members of the PowerShell community.

In closing, I’m reminded of the final Microsoft TechEd Conference in 2013 in New Orleans. I was in this giant room — maybe even at two different times — to hear Don Jones and Jeffrey Snover speak. I didn’t really know who these speakers where then. There must’ve been several hundred people in that same room waiting to hear Don and Jeffrey. Out of that entire room full of people, here I am, writing and publishing PowerShell content. I’ve included my notes from those sessions below. Based on the notes, you can likely judge how little I knew then. I had to write down Out-GridView, as I hadn’t heard of the cmdlet yet. Actually, I only wrote Out-Grid; I’m glad I didn’t get hung up on that one later.

The-tommymaynard.com-Website02

The-tommymaynard.com-Website03

The-tommymaynard.com-Website04

PowerShell + DevOps Global Summit 2016

For a moment, my worst fear was being realized. Okay, maybe not my absolute worse, but it felt bad. Back to this in a moment.

I was in attendance at the PowerShell Summit North America 2015, when I already knew I wanted to return to the 2016 summit. It was the first day and probably only 10 minutes into Don’s welcome. I met so many great people; I talked with and enjoyed the company of many talented and like minded individuals. I heard amazing speakers. It really was as great an opportunity as I thought it would be. If you’re reading this, and you’ve been, you know. If you’ve yet to go, then trust me, you’ll want this experience, too.

I asked my lead at work if I would be able to attend again this year, and what I heard was that  our budget may not have any room in it for a return trip. It wasn’t a sure thing in either direction. With doubt in mind, I was excited to see a contest by PowerShell.org. They offered a Free 4-Day Pass to the summit for the best article submitted for their TechLetter. After reading a forum topic on a PowerShell-related forum, I decided I would borrow the idea and write about my proudest moment in PowerShell — using constrained endpoints to reduce account elevation — and send it in.

Waiting for the January PowerShell.org TechLetter to show up took forever. As all submitted articles were due by the end of November 2015, December turned out turned out to be a long month. In addition, the TechLetter doesn’t usually arrive until mid month. I didn’t really think I had a chance. It’s not like I wasn’t going to check, however. Well, on the early morning of Tuesday, January 19th, half asleep, I opened my inbox and there it was: the January TechLetter.

Unbelievably, it said I had won. Oh, God. My first thought was disbelief (I kept having that thought), followed by feeling bad for everyone else that submitted an article, and didn’t win. I’m certain there were plenty of articles that were great, and I’m sure I’ll get to read them all in upcoming TechLetters — getting an article in there alone, is an honor in my mind. I’m still mystified that I can write about PowerShell and have it deemed worthy for the community.

So, my fear was that I might win the 4-day pass and still not be able to get the financial backing of my employer. A short time after my morning shower, I wrote an email, and later got on the phone with my lead (as I was working remotely that day), to tell her the news. Well, it was a few days later, after a night where my wife and I determined they wouldn’t fund the summit on my behalf, that I got the good news. I was going to be able to attend!

I get it’s the second go around for me, but I’m still quite excited. The venue location is going to be great (likely better than last year), and the content is going to be top notch. I want to do BBQ with Dave again, and I’ve got to have dinner with Josh again (Warren F. — are you going to be there?). This is going to be just as, if not more, rewarding than last time.

So, join in if you can. I’m glad I get to be there; it feels like it was a close one.

PowerShell Resolutions 2016

I wrote about my Windows PowerShell resolutions last year after a Tweet by Boe Prox. In what may become a tradition, he’s started up the conversation up again, over at Reddit. If you’re not convinced to make a list for yourself, then let me recommend you do. Knowing I had written and shared a list of resolutions, and that people may have read it, was enough motivation to stick to what I could and update my progress during the year. My 2015 resolutions are listed in the first link above, and were an overall success.

So, 2016. First and foremost I’m out to be a DSC genius twelve months from now. I’ve been spending a decent amount of time adding new DSC resources, modifying configuration scripts, creating new MOFs and having target nodes pull those. While this is in test, I don’t see why I wouldn’t have rolled this out to production at some point in 2016.

It’s a fair bet to assume that I’ll continue to read, and help, on the PowerShell forums at PowerShell.org, Reddit, and Microsoft Technet. Instead of linking those individually, you can find their links on my about page. If you want to learn more about PowerShell, then I recommend you read these. It’s an easy way to pick up things you might not learn otherwise. In addition, you might start to find yourself helping others sooner, or later. It happened to me.

I’m going to read PowerShell in Depth quite soon, and PowerShell in Action, when the newest version ships in the spring. I really don’t mind reading what I already know for review and solidification of concepts. Plus, I want to be able to recommend these titles to people in situations where someone would benefit from them over some of the other PowerShell titles I’ve read. I can’t wait to get started.
Update: It’s not even 2016, and I went ahead and started PowerShell in Depth. I’ve read up through Part 1 of the book and I already appreciate the deeper level content. As someone that read the Month of Lunches book, I can easily spot where the authors provided additional information.

Let’s see, what else? How about I get my first module up on the PowerShell Gallery. I can do that in 2016, once I decided what to add, or what to first write and then add.

Almost as soon as I posted this, it occurred to me: Nano Server. I expect that I’ll take some time this year to become proficient with this technology.

Extra – PowerShell Summit North America 2015 [#8]

Read them all here: http://tommymaynard.com/extra-powershell-summit-north-america-2015-0-2015/

I couldn’t believe it when it arrived: the final day of the PowerShell Summit North America 2015. Fifty some days ago and I wasn’t sure the summit would ever get here, and now, it’s over.

My final day consisted of another ride over to the Microsoft campus, another second breakfast — seriously, I ate two each morning — and several more PowerShell sessions. The standout sessions for me on the last day were Jason Helmick‘s The Top DSC Gotchas and Best Practices, and June Blender‘s PowerShell Help Deep Dive. These two speakers are two of the best when it comes to capturing the audience’s attention. Jason could keep me awake regardless of topic, and June could sell me anything. They are both great presenters, and so you should get to watching both of their sessions now. Now, as in relation to when you finish reading this post.

As I sat and listened to June speak, I kept thinking the same thing, and no, it’s not that her voice reminds me of my CPA — something I told her earlier in the week when waiting outside an elevator. Oh, by the way, I should probably put my apology out there for her now. Microsoft had these mints on the front desk, as you enter the building. I popped one in my mouth as I made my way to the elevator — bad idea. As much as I’d like to forget it didn’t happen during our conversation, a small piece of my breath mint decidely left my mouth and took flight near June’s direction. Thanks for pretending that didn’t happen, June!

What I kept thinking was that June should have spoken way sooner than day three. In future summits, she needs to do a welcome or keynote presentation, alongside, or before, or after Don. She pulls you in, and I think we all might have benefited from her speaking sooner, and to everyone.

So, as you might be aware, I had been looking forward to day three for awhile, because it was time to take the Verified Effective exam. During lunch on the second day, Don spoke to everyone that was going to take the exam and gave us some information we were going to need to know. One of the things I remembered most, was that the average time to complete the exam was 37 minutes.

Sometime on Wednesday morning, I took a look at my return flight home. The time had been changed to two hours earlier than I had planned. I called the airline and the change was made back in January. I can take some of the blame here, but for whatever reason the notification sent to Expedia, was never sent to me. That doesn’t mean it was Expedia’s fault, but suddenly I had to scramble — a little extra stress with my test. The airline couldn’t help me, nor could the hotel for a ride. If I wanted a ride from the hotel I would have to skip my exam. Ah! I asked the person at the hotel about a taxi and he had a private company, that was able to guarantee the pick up time, give me a call (“I have a guy.”). I gave them my info, got a call back, and arranged my car for 3:45 p.m. — the test started at 3 p.m. (ish).

The test wasn’t hard. In fact, I know I would have completed, if I had been given more time. I left at 3:45 p.m. (and turned in what I had completed, since Jason mentioned doing that) and headed to the airport. Originally, I wasn’t going to bother turning in anything. When I stood up at 3:45 p.m., I was only the second person to do so since the exam began. The first person had been sitting next to me and left a few minutes into the beginning of the exam. No one in a room full of 40+ people was done at 3:45 p.m. Someone did come up as I was standing at the front of the exam room and having Jason copy over my exam. I’m not sure how people felt about the exam and the amount of time to complete it, but I would definitely be interested to know. It seems like nearly all of us could have use a bit longer, unless of course everyone finished after I left, but before 4 p.m.

The summit was over. I was seated in the back of my SUV transportation and headed to the airport. I was disappointed about my test, and I was still stressed — I had to get my boarding pass, drop off and pay for my luggage, get through security, and find my gate all before it was my departure time. I didn’t have as much time as I wanted, but luckily I had enough time to make it.

In the end, I would absolutely recommend you join us next year. Hopefully, I’ll be able to do that too, because this was an opportunity like no other I’ve yet to have in my career. My prediction was correct. I look forward to continue to script in PowerShell, to continue to explore DSC, to continue to answer questions on PowerShell forums, and to continue to create tools for the community, and my employer. It’s a special bunch of people, and I’m glad I got involved. PowerShell is rewarding, and one of the best things I’ve done, and will continue to do, for my career.

It was great meeting and talking to everyone! I look forward to doing it again.

Extra – PowerShell Summit North America 2015 [#7]

Read them all here: http://tommymaynard.com/extra-powershell-summit-north-america-2015-0-2015/

When the second day was done and over, I simply didn’t have the energy to do much more than get a shower and watch 30 Rock on Netflix. Yes, 30 Rock — I still have a couple seasons to go. But, just because I didn’t write, didn’t mean I didn’t have another rewarding day. On day two, I attended sessions such as as Dave Wyatt‘s, Keeping Secrets… session, and the combo, two-part session by Jeffery Hicks and Lee Holmes. Each of those were great. Not only do they explain the how in everything, but they explain the why — I think that’s an important distinction, and a requirement for working with Windows PowerShell at the 400-level.

I also got to hear Jim Christopher explain SeeShell and Mike F. Robbins discuss PowerShellGet. They both had a well-thought-out flow to their topics. I recommend these two, without question. I’m looking forward to that future moment when I suddenly remember SeeShell while working on that future project. As well, I can’t wait for WMF 5 to be out of preview, and be ready for down level versions of Windows. PowerShellGet, and especially the PowerShell Package Manager — previously OneGet — are going to make a huge impact on desktop administrators — mark my words.

The final two sessions of the day were quite legendary. First, we heard Don Jones discuss what he knows about — and his predictions for — Nano Server. This was followed up by a QA session with Jeffrey Snover. Yes, that’s as cool as it sounds — especially on a stage this small.

Speaking of Jeffrey Snover, I didn’t get to sit with him again during lunch, but our table did have a second best guest. Don Jones decided to sit with us since “all the spots were taken at the cool kids’ table.” Of course, he was kidding — that’s at least what I’m telling myself. During the conversations with Don, he explained some of the differences between using the Microsoft Campus for the summit and what they had done in the previous year. He indicated that next year’s summit will be back in Washington, and as of now, is tentatively scheduled for the 4th, 5th, and 6th of April, although those dates were actually mentioned on day one. I’m hoping to be there next year, and look forward to venue where everything is in walking distance.

Consider how amazing this event is for a moment: In two days’ time, I sat and ate lunch with Jeffery Snover and Don Jones. The likelihood of that at a big conference is next to zero. Besides all the great PowerShell content, there’s this possibility to actually have conversations with some of the community’s most talented and influential members.

You can watch most, if not all, of the sessions here — seriously, do it, it’s worthy of your time. I’ve been somewhat vague about the session content because my intention is more in line with convincing you to attend — to work on your PowerShell knowledge and skills daily, to be a member of the PowerShell community, and to come out and meet the rest of us. I think I heard Jeffrey Snover say it twice now: it’s his favorite conference. If you’re not going to take my advice, fine, but you’ve got to take his. He’s the inventor of PowerShell; he’s the one that’s been telling us to learn PowerShell — that we’re going to need it (think: Nano Server). We’re System Administrators learning DevOps skills; we’re developers that are thinking operations. We’re blurring the lines, and moving to the front of the line.

One of the most memorial parts of the second day was the evening out. While I could have packed up and easily sat in my hotel room for the evening — I mean, I am a geek; I have a computer — I instead took the offer from Stephen Owen to head out for dinner with a handful of other enthusiasts. Best decision of the summit. I had a great time! I sat at a table at some hip and trendy joint with Warren F, JC, Paul, and Josh Atwell, and had one of the most entertaining conversations, with fellow IT people, in a long time. Never mind that we didn’t talk that much shop, but we laughed our asses off. Josh has to be one of the funniest people I’ve met. If you’re at the summit, do your best to get a seat next to him outside the conference. I also gathered he’s a smart guy, and an author — you go, Josh. Here’s the thing with this conference: everyone is smart. This was an elite group of people. Don’t let that scare you off though — I was there, too.

Extra – PowerShell Summit North America 2015 [#6]

Read them all here: http://tommymaynard.com/extra-powershell-summit-north-america-2015-0-2015/

Today was the first day of my first PowerShell Summit. What, an amazing opportunity. We’ll get to today, but a bit about last night first.

It started when I arrived at the Ri Ra, a downtown Irish pub and grub. I had a ride with Dave Wyatt, who, as I learned sometime between 4 and 5 p.m. today, has code from his Pester project shipping with Windows — well damn, that’s quite the accomplishment, Dave.

We spent a hour or so at the pub where I was able to chat with Jeffery Hicks, Richard Siddway, Teresa Wilson, and several others. At that point in time, many of these people seemed like celebrities. They still do; however, I’ve come to realize that this summit is designed to break down what might separate speakers from attendees, at a large conference. I’ve shaken hands with Mark Minasi and had a book signed by Mark Russin — hold on while I go figured out how to spell his name — ovich, but this was different kind of experience. The same Jason Helmick I watched on the DSC videos earlier that day, was standing over by the bar. I’ve yet to meet him personally, as well as plenty of others, but still, none of this felt real until today — like mid morning.

Dave and I left Ri Ra after a quick decision to find a place to eat — perhaps one of the BBQ joints we saw on our walk from the garage, where he parked. Sure, it’s only a couple blocks over… through. a. downpour (there had been tornado warnings). The umbrella and sweatshirt I considered bringing, were in my hotel room, dry and unused and probably grateful. When we arrived at the restaurant, I couldn’t see, as my glasses were drenched on both sides of the glass, and my clothes were drenched, too.

After an incredible meal at Queen City Q — something that was required to help keep me from thinking about having dinner with someone I just recently met while wearing clothes that felt as though they just came out of the washing machine — we headed out. Although the GPS in his rental car repeatedly lied to us, we finally made it out of downtown Charlotte. It required that we travel north, to go south. I’m glad to see he made it to the summit today, because I had my doubts about that thing.

So, today. It started off with (my second) breakfast and an opening welcome by Don Jones. Following that, I ended up attending the sessions I planned to originally. This meant I listened to Jason Helmick discuss PowerShell Web Access, permissions, and IIS application pools, all in relation to DSC and DSC resources. I’ve yet to create my own DSC Resources, but I’m looking forward to the opportunity. Jeffrey Snover said something later in the day about the impact of the community; he might be on to something.

I followed up Jason’s session learning about Pester, monitoring, DSC and AD, and then oData. As well, I enjoyed listening to Jeffery Hicks discuss constrained endpoints. Ever since my SharePoint constrained endpoint project, I’ve come to really enjoy the capabilities they provide. I’m looking forward to transferring that knowledge to JEA: limiting cmdlet parameters without a proxy function, sounds good to me.

Jeffrey Snover closed out the sessions in the early evening with his State of PowerShell discussion. It’s always great hearing Jeffrey speak, whether it’s at a TechED, an online video, or a lunch. That’s right, he also spoke at lunch — but not with everyone.

I was sitting amongst a group of other PowerShell enthusiasts. It was a full table, outside the empty chair that was at my right. Next thing I know, Mr. Snover sits down next to me. For 45 minutes to hour he told us stories, introduced us to topics he’d cover in his closing session, and answered questions from anyone at the table that spoke up. It was amazing, as was his ability to eat and chat so well — as if he’s perfected doing these at the same time. When we were rounded up to move to the after lunch activities, he asked where I worked and we briefly discussed Tucson, Arizona — my home town, a place he’s visited. It was a honor to be a part of the discussions that took place at that table. It was something I won’t soon forget, and something I didn’t see coming. Either was being able to guess the number of stickers on Ashley McGlone‘s laptop (25) — something that scored me a sticker.

To round out the evening, I chatted with Adam Bertram. It was an exceptional day and I’m so fortunate that I was a part of the community today, in person. I’m looking forward to tomorrow — round two.

Extra – PowerShell Summit North America 2015 [#5]

Read them all here: http://tommymaynard.com/extra-powershell-summit-north-america-2015-0-2015/

I said I’d write, and here I am. I’m on my first leg of my travel to Charlotte, North Carolina which will put me in Atlanta for an hour or so — just enough time to upload this post and eat something. I hope.

Prior to boarding I noticed that the #PSHSummit Twitter hashtag is already seeing an increased amount of usage, as many people begin their travels to the PowerShell Summit North America 2015. I can’t believe it’s already here. I’m on a full Delta flight coming out of Tucson at 6:10 a.m. That required a 4:00 a.m. start time — something I’ll end paying for at some point today.

The plan, after briefly listening to some music, is to fire up module 6 of the Getting Started with DSC JumpStart videos: I’ve got make the most of this time…

… time passes …

…Roughly an hour has past since I started that module. Like all of them so far, that module was beneficial. It helped solidify parameterizing configuration scripts, using configurations data and using credentials. I hadn’t heard of the DevOps reference, mentioned by Jeffrey Snover, before, but I like it. This was the one that indicated to treat your servers like cattle… without an emotional tie. I can do that.

I’m about a half hour outside of Atlanta and our smooth ride is about to get bumpy. Time to pack up, and return to some music to assist in drowning out the engines and squeaky luggage above me…

… time passes …

…Well, I made it to Atlanta despite the rain and bumpy ride. I’ve eaten, caught up on Twitter, and now to find my gate. The long part of my trip is over with a flight about as long as the last module in the first DSC JumpStart from Microsoft Virtual Academy.