MJFChat: Everything sysadmins and devs need to know about task automation
Transcript posted at the bottom of this page.
We are entering the second year of our twice-monthly interview show on Petri.com that will cover topics of interest to our tech-professional audience. We have branded this show “MJFChat.”
In my role as Petri’s Community Magnate, I will be interviewing a variety of IT-savvy technology folks. Some of these will be Petri contributors; some will be tech-company employees; some will be IT pros. We will be tackling various subject areas in the form of 30-minute audio interviews. I will be asking the questions, the bulk of which we’re hoping will come from you, our Petri.com community of readers.
We will ask for questions a week ahead of each chat. Readers can submit questions via Twitter, Instagram, Facebook and/or LinkedIn using the #AskMJF hashtag. Once the interviews are completed, we will post the audio and associated transcript in the forums for readers to digest at their leisure. By the way, did you know MJFChats are now available in podcast form? Go here for Spotify and here for Apple Podcasts on iTunes. Google Play support is coming soon.
Our next MJFChat, scheduled for Monday, January 20, is all about PowerShell, and task-automation in general. My special guest is Adam Bertram, a Microsoft MVP, trainer and founder of the IT career-development platform TechSnips. Bertram also is one of the authors featured on Petri.com
We want you to submit your best questions for Adam ahead of our chat. If you’ve got questions about PowerShell and task-automation, who better than “Adam the Automator” to answer them? If there are any specific topics or scenarios you’d like him to cover, make sure to chime in ahead of time.
Also: If you know someone you’d like to see interviewed on the MJFChat show, including yourself, send me a note at [email protected] (Let me know why you think this person would be an awesome guest and what topics you’d like to see covered.) We’ll take things from there….
Mary Jo Foley: 00:01 Hi, you’re listening to the petri.com MJF chat show. I am Mary Jo Foley, AKA your petri.com community magnet and I am here to interview tech industry experts about various topics that you, our readers and listeners want to know about. Today’s MJF chat is going to be all about PowerShell and task automation. And my special guest today is Adam Bertram, a Microsoft MVP and senior cloud architect at club way. Bertram is also one of the authors featured on petri.com welcome Adam and thank you so much for doing this chat with me.
Adam Bertram: 00:43 Hello, thanks for having me Mary Jo.
Mary Jo Foley : 00:45 Yeah, it’s exciting. We’ve talked to on and off through Twitter and email over the years and it’s finally great to virtually meet you here, so thanks.
Adam Bertram: 00:52 Yeah, definitely.
Mary Jo Foley: 00:53 So I’m gonna just like start as a newbie of PowerShell since I don’t use PowerShell myself and I want to open with why would anyone want to learn PowerShell anyway?
Adam Bertram: 01:07 Well I think first off to realize you have to come, I’d have to understand what kind of role that person is. So PowerShell was generally built to be for IT professionals to do all kinds of task automation. So when it started out, it was all in the windows world. So a lot of windows, SIS, admins were all about PowerShell automating things and windows server exchange, exchange was a big one at first. And generally, just I mean I could go on and on about all the different things about PowerShell can automate, but building scripts to just make SIS admins daily activities easier.
And since then it’s kind of evolved from just a windows world to more open source where now it’s available on Linux, Mac OS and just about every other operating system you can think of. And since then it’s kind of taken a different toll where developers now are using it in the open-source world on the Linux side. And I know coming from, I was an automation engineer at one time where I was essentially a PowerShell developer. So you can even develop, I mean, entire tools and orchestration frameworks and things with the PowerShell. So generally it’s such a universal and ubiquitous language that I mean many, many different people have used it lots and lots of different ways in the IT world.
Mary Jo Foley: 02:33 I guess that’s one thing I find really confusing because there’s, I see people all the time comparing PowerShell to something that I’m like, wait, why are they comparing it to that? Right? So like power, I’ve seen people say, why would I use PowerShell versus windows subsystem for Linux or windows terminal? And I was like, that’s interesting. But why, why would people even make that comparison?
Adam Bertram: 02:55 Well, I think, you know, it depends on, I guess PowerShell is just one tool in an admin or developers arsenal. So, you know, whenever somebody asks me, well, why should I use PowerShell for this? First thing is the first thing I would ask is, do you already know PowerShell? Are there people on your team that know PowerShell? Can you collaborate together on this single language? And second of all, does PowerShell come with or is there community modules and things that have commands that are already built to manipulate various things.
So for example, you know, you’re, you’re going to use a WSL or Windows Subsystem for Linux or running Bash for example. You know, Bash is just a shell scripting language. It doesn’t have a, it’s not quite as rich. And objects as PowerShell is so Bashed can’t, you know, you can’t simply say get content and it’ll read a text file, you can’t simply download a module and say get exchange mailbox for example. And it doesn’t understand those sorts of things. So it’s more of a rich language and it allows you and your team to really kind of take a shortcut, I guess and use the existing command list of things that are already available at PowerShell.
Mary Jo Foley: 04:15 Hmm. Gotcha. Another one. I see, I’ve seen a couple of times compared, and I wonder if it’s an interesting or valid comparison or maybe it’s something that you would use and like two things together is PowerShell and power platform. So you know, Power Apps and Power Automate which used to be called Flow and Power BI. Like do is PowerShell replaced any part of the power platform or is it something as, as a developer, you would think of those as an and?
Adam Bertram: 04:44 Well, PowerShell is a smaller, as a, as a subset of a bigger ecosystem like the Power Platform is. So, for example, I just did a webinar with on Power Automate and one of the examples was with power automate power automate has a lot of existing connectors that connect to various services out there. And one of them was Azure AD. So I demonstrated creating an Azure AD account, creating a group, getting all that set up. And there are various tasks in there that have to happen to create a new Azure AD user.
Like, for example, creating a random password. There’s no built-in connector for that. Using, PowerShell and Azure, auto, the Azure automation connector inside of Power Automate, you can write script wherever you need, kind of build out any kind of custom little thing that you need to do and plug it into a platform, like Power Automate. So it’s kind of complimentary service to where if the, entire platform doesn’t provide a native solution to the problem, you can typically get down into PowerShell and write whatever kind of script you need to make it happen.
Mary Jo Foley: 05:57 Hmm. I gotcha. Okay. Another kind of area of confusion for me anyway, possibly for some of our listeners and readers is PowerShell, well actually let me restart Windows PowerShell, PowerShell Core, Azure PowerShell. Like how, what are those? There’s like all these different things like, okay, I know the origins of PowerShell is, it came up through the windows platform, but then you see people talking PowerShell Core or even Azure PowerShell, like how does, how do those three things relate to each other?
Adam Bertram: 06:32 So when it first started, it was only window. It was, it was just PowerShell. It was easy back in the day, 10 years or so ago even. Well, even like, I can’t remember when core came out, but it was, it was pretty easy back in the day. It was just PowerShell. It really, it was called technically everybody called it PowerShell, but technically it was called windows PowerShell because it was just on windows. But since then it’s evolved over time and because you know, Microsoft is really embracing use whatever tool you want, anytime you want. It’s really gotten into the open-source world. So I can’t remember how many years ago it was open source, but it was open source.
And when it was open-sourced and made available cross-platform on Linux and Mac OS and other platforms, then it turned into PowerShell Core. Um it was called PowerShell Core because windows PowerShell was built on.net framework and PowerShell Core is built on.net core and they poured it all that code over to be able to run on the various other platforms. And since then, technically nowadays it’s just called PowerShell again. So it went from windows PowerShell to PowerShell Core and now PowerShell Core is just called PowerShell, just ubiquitously across everything and taken to confusion a little bit more there you have, you mentioned Azure PowerShell. So I, I’m assuming you’re mentioned, you’re talking about the cloud shell, the cloud shell is a browser-based console that you can bring up directly in [email protected] and it will bring up both Bash and PowerShell. And you can, write, you can get on a, a PowerShell console and write your scripts and run your commands to do what have you directly in Azure, in the in the Azure portal.
Mary Jo Foley: 08:31 Okay. Gotcha. That’s good. Okay. So now we’ve kind of laid the groundwork for talking about PowerShell 7, right? Because I feel like PowerShell 7 is similar to .net 5. It’s like how Microsoft is going to level everything up in a way. So where, where are we at with PowerShell 7?
Adam Bertram: 08:51 Yup. PowerShell 7 the big premise behind PowerShell 7 was we are going to make all of the functionality in Windows PowerShell available cross-platform. So PowerShell 6 on all the incremental versions in there was an effort to start that cross-platform journey. And then 7 was really focused on making all the functionality and Windows PowerShell available for PowerShell or PowerShell Core on Windows exactly the same. So establish a common baseline there. And what I’ve seen since then, I mean there’s been various features like the ternary operator, some air handling features. I mean in reality, PowerShell 7 is not a whole, a whole lot different than PowerShell 6 other than there are some additional supported commands available that were available in Windows PowerShell.
They did a lot of work there. But as far as generally new features, there’s not a whole lot. Because you know, a couple of years ago you know, Jeffrey Snowbird was saying that well the PowerShell is kind of as of windows PowerShell 5.1, I think, it was the whole Monad Manifesto, which was the original document they had created a long-ago of okay, this is what I envisioned PowerShell to be. That was kind of fulfilled after a desired state configuration came around. And this, the PowerShell is a language that evolved over time that was kind of fulfilled and ever since then that the effort has been more towards cross-platform, open-source and generally just getting it to a stable state. And I think that’s where PowerShell 7 is right now and they will continue to make iterative improvements over time. But it won’t be near the amount of just feature after feature after feature coming up like it was years ago.
Mary Jo Foley: 10:51 Okay. Yeah, I saw some people tweeting, I think last week saying RC 2. So release candidate 2 have PowerShell 7’s out. So it seems like it’s imminent that Microsoft’s going to release the final of PowerShell 7.
Adam Bertram: 11:04 Yeah, I think Joey Aiello, a program manager on the PowerShell team. He announced that RC2 will be supported in production. Just like GA is going to be. So RC2 and GA will be supported in production and GA I believe it’s been pushed back a month or so, but I believe they are planning on GA’ing it next month.
Mary Jo Foley: 11:29 Oh, okay. Cool. So when you are talking to other admins, do you suggest they start using PowerShell Core now and ditch using windows PowerShell or what do you tell them they should be thinking about there?
Adam Bertram: 11:41 Well it depends on where they’re starting from. So if they’re starting from an evergreen environment to where maybe they have, they don’t have any existing PowerShell scripts out there that depend on windows PowerShell, definitely PowerShell Core all the way because that’s the way going forward Windows PowerShell there are going to be no more fixes that way. There might be some fixes here and there’s going to be no major features. It’s just pretty much you know, going the way of the Dodo bird.
Mary Jo Foley: 12:11 But will it be like a maintenance mode, kind of like.net framework?
Adam Bertram: 12:15 Yes, yes. I think so. If there are any security vulnerabilities, you know, anything like that, they’re going to release, they’re going to maintain it to some degree, but it’s definitely not going to be the focus by any means. So yeah, I think that if they are starting from fresh, definitely go to PowerShell Core. Don’t even, don’t even get into Windows PowerShell because that’s, I don’t know if it’s considered a legacy or the more PC term heritage now. It’s going, going away.
So, but if they do have you know if they’ve heavily depended on Windows PowerShell in the past, they’ve got lots of PowerShell scripts out there. I definitely think that admin should start writing new scripts in PowerShell Core and figure out and do lots of testing and start that slow migration process because Windows PowerShell and PowerShell Core can both be run on the same box independently. They are completely different entities, so you can seamlessly do a slow migration over and test all of your scripts and make sure that they are compatible and that PowerShell Core will operate the same way that Windows PowerShell does.
Mary Jo Foley: 13:30 That’s great. Okay. So in terms of just the community around PowerShell, I know you’ve been a very active participant there. I’m curious about your view about how the focus seems to be evolving for PowerShell both from Microsoft and the PowerShell community in general. Like what do you think’s going on out there and in the bigger world and as far as priorities and thinking about PowerShell and emphasis on PowerShell, how would you characterize the way things are evolving?
Adam Bertram: 14:00 So, you know, I’ve been in PowerShell since it was Monad back in the day and I’ve been like you said an advocate of it for a very long time being one of the first PowerShell MVPs back in the day before you know before lots of things changed. So we started out, just for example, we started out as PowerShell MVPs and coming from the Microsoft perspective, what I’ve seen is that we started out with PowerShell MVPs now that has been removed or that program has been removed and all of the PowerShell MVPs, I think there was like 70 or 80 of us at the time. Well, then we were kind of merged into the bigger cloud and data center management category of the Microsoft MVP program. And that was one of the shifts that I’ve seen as far as Microsoft’s priorities of PowerShell. You know, back in the heyday it seemed like, you know, the PowerShell language of itself was that was the main focus. People automate things.
The PowerShell Microsoft was, it really seemed like from the Microsoft perspective and also members of the community where PowerShell was you know, quote-unquote a first-class citizen. We were going to do everything in PowerShell and PowerShell. And over the years it seems like PowerShell has sort of been, it’s still very, very important to Microsoft and to the community. But it was, it’s kind of evolved more into a tool, from Microsoft’s perspective, a tool to manage Azure because, you know, as you well know, Azure is a big product or a big service for Microsoft and it seems like they’re more promoting PowerShell as another tool just like a Python or any other SDKs or anything to manage Azure. And since then, because of that shift that I’ve kind of seen for Microsoft and also from the community, I’ve actually started focusing more of the content that I produce.
As you said when you introduced me, I’m now a senior cloud architect at Cloudway and that’s for Azure. So I’ve been getting more interested in, okay, well, sure we’ve been automating things in just PowerShell all day, every day. Now I want to learn how to take the PowerShell skills that I have and really use those to automate things in the cloud. And I think just me knowing PowerShell and if you, if other admins out there have the PowerShell skills, you can easily transfer that all and then use that knowledge that you have to automate various things in Azure, ou know, AWS has really good PowerShell modules and support and I really think that’s really helped me in my career, having those skills to be able to just transfer that all and use that and apply it to another area. But I think that definitely PowerShell isn’t just, you know, the first-class citizen, the main focus now with more of a sub-focus I guess of a broader kind of cloud computing, Dev Ops kind of automation ecosystem.
Mary Jo Foley: 17:23 Okay. You bring up a couple of things I want to ask you about there. So one is how do, how do you suggest CIS admins and Devs keep up with what’s going on with PowerShell right now? Like you talk about how, you know, staying current with that has helped you with your career path. What would you say to somebody who said, I need a way to know all the stuff that you know about PowerShell books or websites or Twitter feeds? Like, is there anything that comes to the top of mind right off the bat? Like, you need to look at this?
Adam Bertram: 17:56 I think if, if somebody is just starting out wanting to learn PowerShell, for me, there’s, everybody has different learning styles. But for me, what I prefer is to first do a course. You know, I’m a Pluralsight author, so I will evangelize Pluralsight and I also do some LinkedIn learning courses now. So there are, I know from firsthand experience, there are lots of great online courses out there for you to get started with, to kind of, figure out, to know what you don’t know yet, to introduce you to new topics and, get involved and how I personally learn and how I’ve learned the most over the years of just being, once you kind of get those ideas of things that you would like to learn about, then start building things on your own. That’s why I say, the best way to learn is to do while you’re learning. So do troubleshooting, trial and error going on you know, stack overflow, the powershell.org forums asking on Twitter.
The PowerShell community is very welcoming and there are lots of different people out there that can help you with just about every question that you may have. And then once you start really learning new, start building your own projects, building your own scripts and learning how to do different things, then take that knowledge and then blog about it. Then get on Twitter and help people and become part of the community and then share all that knowledge. That’s one of the things that I’m really passionate about is learning what you think is just really cool. This script really helped me do this really cool thing. And instead of just kinda keeping that in the back of your mind and using it to yourself instead, blog about it, train, do a conference, talk about it, get involved with the community. And once you do that, you’ll get to learn. You get to meet lots of new people and go to conferences and really collaborate more on things. And eventually, you’ll find that once you kind of gets involved and that will only spur your interest in the topic because you have all these other people kind of on your side helping you with it. But also it will open up new opportunities for you and really help you excel in your career.
Mary Jo Foley: 20:09 Good advice. I also wanted to ask you about tech writing in general. This is not a PowerShell question, but I’m always intrigued how people got into tech writing and how you would tell somebody. If you’re interested in this as a potential path, you should look at getting involved as well. So how, how would you say somebody who has not got experience currently in tech writing could get into the field? What would you suggest?
Adam Bertram: 20:36 First off, try. If you want to get into tech writing write for yourself for a while, right? Start your own blog and really hone your skills. And what I mean hone your skills is write as much as you can just as you normally think you’re going to write and then perhaps get feedback from others in the industry that may have experience. There are lots of different ways. Another way is I don’t want to kind of do some shameless self-promotion here, but this is one of the big things that I’m really passionate about is helping people with tech writing. So I have my adamtheautomator.com blog and for years it was just kind of my place to put information and articles and things I learned on the job. And you know, as of six months or so ago, you know, I decided like, okay, I love writing so much. I’ve been writing for so long, I’ve been writing, you know, for Petri and lots of other publications and I’ve really learned a lot over the years. And I decided to kind of open it up to people in the PowerShell community and the Dev Ops community. Anybody, any CIS admin really that they can come in and they can then pitch some ideas, we’ll go through it. And then I go through a fairly lengthy editing process, giving lots of different comments and things of how they can improve their writing.
They can promote themselves, promote their blog. And really, I’m really wanted to build it up as a platform to help others in the community you know, kind of take the same path that I have of, you know, don’t just sit in your 9 to 5 and learn what you got, get involved and be a part of the community. So there’s that. There’s the adamtheautomator and friends program to where I’ve kind of mentor and, do lots of commenting, editing and you know, learn iteratively like that. There’s, you know, lots of different books. You know, there’s at the end of the day it’s just getting out there and just doing it. So many people just don’t, they don’t want to start because they think like, well, I’m not good enough. Or you know, they may have imposter syndrome. I’m just, Oh, somebody has already written about that thing. It drives me nuts because people don’t realize that, you know, it’s your own way you package it, your own personal story and feel that you kind of put behind your content that really makes a difference.
Mary Jo Foley: 23:04 Wow. Very good. Very admirable. You’re doing the mentoring stuff. That’s awesome and really big for the community. So thank you for doing that and thank you for doing this chat both. It was great to get up to speed on what you’re doing and what’s going on with PowerShell, so thanks.
Adam Bertram: 23:20 Yup, no problem. Thank you.
Mary Jo Foley: 23:22 And for everyone else who’s listening to this right now, all you MJF chat readers and listeners, I’ll soon be posting information on Petri so you can see who my next guest is going to be. Once you see that, you can start submitting questions on Twitter and other social media channels and then the guests and I will be watching that and monitoring the feed so that we can add those questions to the next chat. In the meantime, if you or anyone else you know might make a good guest for this kind of chat, please do not hesitate to drop me a note. All my contact information is available on petri.com thanks again.