Yeah, welcome everyone to another episode of the MC65FFM podcast.
My today's guest comes with the phrase, "Four Shells Fun." Join us.
We talk with Microsoft MVP, HarmBedster,
a PowerShell expert, community contributor and automation,
into this helping IT profession, automatic task across multiple Microsoft technologies.
Yeah, and we have the title today, "PowerShell is Fun," automating everything with PowerShell.
Yeah, let's start with the name, "PowerShell is Fun." Why did you choose that name for your website?
Because it makes sense for me, I guess.
I do actually enjoy and having fun creating scripts, the whole thinking process being creative.
Yeah, yeah, where's both there, a moment where PowerShell stopping being just scripting and became fun for you, what was the special moment?
When you finally understand the how and the why, and once you understand the logic,
it's just a creativity that is the only thing holding you down to do more.
Yeah, I think the most people, yeah, that's not fun, but the first time I've been by the area, PowerShell.
But yeah, what tip can you, or trick, can you give people to fall in love with it?
And when you, we have through a lot of manual tasks or repetitive tasks, which make your job life a bit boring because you have to do them like every day.
Once you realize you can start automating that, and you actually see it working, meaning that you have more time to do more important and more fun stuff.
I think that's the moment that when you start to realize that it actually makes my life better easier and I have more time to actually talk to people in the business with my project team or whatever, instead of just manually doing click ups all day.
Yeah.
Yeah, and can you tell a little bit about, yeah, the story, how, which harm become, yeah, or our start and technology and became a, a partial guy.
Well, this year I've been doing IT for 30 years. I was like 18 when I started working in IT.
First, it like a, how does it serve? That's, you feel that the place that people start their IT career.
And I've just moved on from there from working for internal companies to a consulting firm to be becoming a consultant.
And actually starting doing more in the community because that's the, one of the reasons that I really like being an FB and doing all these kinds of community things.
And you could, you get so much back from it.
I learned so much from people in the community and being in the community and getting back to other people at a specific, yeah.
I think a lot of people say that especially Microsoft community, it's really, yeah, really good to, to have each other.
I see also Microsoft do is a lot for it.
I see the Microsoft learning platform. They have, and the MVP community. So they do a lot.
I think it's, especially Microsoft. It's really cool. What they do.
A lot of think it was a little bit, yeah, the automation mindset.
When you look at IT today, where do you still see, yeah, too many manual processes?
Perhaps in smaller companies, when you only have like two or three people in your IT staff, it probably makes sense if you don't have that many repetitive tasks that you do.
You just do click officer, just clicking in the console or in the browser.
But when you start working at scale, then it makes more sense because you have more customers, more repetitive work.
And the quality of the work needs to be better and consistent. And that's where automation does its best.
When, yeah, when you have a consulting project or something else in the company, what is the, yeah, the first thing you say at the IT admins should automate.
I think the whole user onboarding stuff is usually the one that is the most work creating uses in.
So, for example, many people that they're being sent to enter ID, giving them rights, permissions, and rolling them in different types of software, setting up their clients, their in tune, laptops perhaps.
It's a lot of manual steps in which you can easily see the benefits of automating that because it's repetitive and it's not that fun anymore if you do it like 50 times in a few months.
And how did you identify processes that's worth automating and which pros are not worth to automate.
Yeah, it's what the most scripting guys always always tell you if you have to do it twice, then you must script that out.
Or if you only do it like twice a year or twice every two or three years, then maybe.
But it's more of a quality thing if you script automated, then you're absolutely sure that outcome will be the same every time.
Instead of, oh, yeah, I just got that one step in a very large manual and now it doesn't work and I don't know why I have to like redo the whole process again.
Yeah, I have a little bit of look at your website and I see you work across multiple Microsoft areas, Microsoft 365 exchange, intra teams, iTunes, Azure, and SharePoint.
Where did you see this power shell, yeah, the way to go.
And probably, yeah, and that's for the most powerful shell people also tell you an exchange first started with adding power shell, command, that's two exchange on prem.
You could do a lot of things in the normal exchange management console, but a lot of stuff you could only do on command line.
And that was the first encounter of XV using power shell for a Microsoft product because you had to because certain options were not available in a normal management console.
Then you start realizing, well, if I can do this using power shell, and it's power shell 2.0.
And that's, I don't know how many years ago exactly that was, but then you they see the benefit. Oh, I can also use it for this also uses for that.
And if you could use it for that, I can also use it to automate it.
And they start realizing that you could do a lot more in the past. You probably did that with.
And I also did that a bad scripting, right? You see in the year batch files.
Who do a lot of things in that, but it's not comparable to power shell, power shell, you do a lot more.
And yeah, where did you own on which platform from Microsoft that you see.
Yeah, the best growth in the best chance for automation.
And I don't know is it error or teams or where is the highest in that. It's first started for the biggest automation projects.
And actually because that was the trend back then before Azure AD came also known as enter ID right now.
But I think it's becoming like it is the standard every 365 product, every Azure products, even every Microsoft product has its own power shell modules, commandlets by default.
If if a new product is there, you can probably automate it by using power shells straight away.
So you can use it like for every product, I guess. I don't know if there are any products which don't have a power shell interface because Microsoft graph is everywhere.
And I also see the graph up. I think that's also yet it's really great.
Yeah, some people really really hated it. It has its it has its quirks sometimes the the the enter in a graph modules, but for me they're there is great.
You can do so much of them.
I think really that's one of Microsoft biggest.
I don't know, cool things they have ever built. I see it on I don't know, I work with other enterprise solution like sales force and it's also they have by this and buying this and you have all these different.
So it's so hard to put their process together from their different tools platforms. And so yeah, I think this really great what Microsoft have built here.
And some real world examples where you have work on or was really interesting project you work on power shell automation.
At this moment, I mean a few products projects in which I do a lot of migrations.
So it was a smaller company inside of it, which is moving out of that bigger company. And has to be on its own.
So it is a lot of migration projects scripting that out people moving from a Google platform to a Microsoft platform and converting their calendar permissions or their Google meetings to Microsoft teams meetings.
And it's really the automating that. Yeah, it's just things that make the user happy off the vibration giving me a lot less headache in the process.
So yeah, there are chances everywhere. But that's the thing that I'm in at this moment.
And so the projects will be the whole user proficient in part there like I mentioned, it's one of the most repetitive task for the service that each month people come in people leave the company.
You have to create accounts, update, modify, remove accounts, automating all those parts that I did that a lot and it really helps the people out which have to do those repetitive tasks every time.
Yeah, you see benefits straight away and it makes it a lot nicer instead of doing something which you actually don't see the results of straight away.
Yeah, it was I forgot the name, but I, I think it was an ignite someone says, PowerShell, it's the best governance tool you could have.
When, yeah, have you seen, I don't know, or can you explain a crazy manual manual, preserves, you have automated or you have seen.
So that's so many larger and smaller ones. Integration with services for Unix, that's something that in actually actually have fields for that for for Unix, UIDs and the whole automating of creating and linking extra uses to Unix systems.
And trying to get the latest UID because of UID is unique in Unix also in windows discovering the last giving UID, incrementing that writing that back of us whole back and forth between different platforms.
And that's something that I usually do every day.
And you really have to investigate it. That's that's the part for the investigating being creative coming off its solutions.
And is there, I don't know is there a power shell co pilot available or.
You do have like a get up co pilot in this serial code, so I think that helps a lot people use a lot of clawed coding. I actually don't use AI at all for my scripts.
And myself because I like to challenge myself and sometimes it will take longer, but at least I will understand the script after it's been created instead of having co pilot writes you out or any jetty to whatever writing a script out which fails and you don't know why because you created yourself.
But do you change in automation that comes with AI co pilot and so on.
Is there a change in your work in the AI area.
And I do think so, especially for project plans or certain processes.
You can see which ones were created using AI, but AI really helps you as an assistant for if you have like many project documentation or workflows inside of that.
And then summarize recreate those in a better like project plan.
I see more like an assistant helping you get rid of the boring more intense talks and leaving you more with having to talk to the business itself instead of writing complete project plans.
For me, that's the ideal use case helping me with all the other stuff next to the automation.
I think I don't know about I think sometimes the yeah, a lot of people do automation with the AI and it's caused a lot of tokens.
So I think it's not the future.
I think yeah, power will be, yeah, sometimes that has a better pricing.
It's been in pricing to do this automation with power or.
The whole amount of tokens actually read an article and it was cheaper to hire two new like media or junior developers instead of having to pay your AI bill that much.
People win then yeah, it's the most times it's yeah, reload it's it's on the other side.
When you say there is an automation philosophy.
What's yours?
Yeah, you could like like I have in my personal profile automate everything.
Yes, that could be your end goal, but it does have to make sense.
Like I said, if you have to only do a thing like once or twice every year, you could probably automate that but better to automate the most repetitive talks.
Also, the ones that you absolutely need to be sure that everything is correct after running that because if you do it manually or your your colleague does it on a Monday and you do it on a Friday and outcome is different.
It has to be consistent that that's what I like about all my automation things are consistent. You're sure that things are like this or that and not perhaps.
You have talked about yeah, starter or people they hired you hired what is a good yeah project to start learning power shell from your perspective.
Or you to learn power shell for example, if you have like something that you need to do and you have like a real business case for it then it's easier to learn and start working on that instead of that for most people do they try to learn power shell by doing simple examples the same as I have with trying to learn Python.
I try to learn Python many times, but I don't have a use case for it straight away. So then you start learning generic Python things in how you can count numbers, see processes, copy or renamed files or whatever.
And if it's okay, but I don't have something that I need to use it straight away. And that makes that makes learning more difficult. So if you have like a repetitive task that you want to automate because you're tired of doing it manually, they have like a really good case to start learning power shell.
And you can put that task away and do more interesting stuff instead.
And how hard or how important is understanding the power shell logic before yeah starting script writing or can I start and.
Yeah, it's an object based scripting language and if you don't understand objects and properties and values.
Because that was when I first started writing about first portal script, I didn't understand the whole object thing yet.
I'm not a programmer. I'm just a scripter who did like batch scripting before that.
Once you understand the whole object thing that object has properties and properties and values and you have like methods in which you can change the values or query those values.
And once that hits you, then it's so much easier to write scripts.
But that's just an understanding of how things work and then you need to know how you can get more and more for change those things.
And then when we are how do you stay I don't know that's not so many change about how do you still learning new power shell tricks on how do you develop your skills in the power shell.
So for me it's easier because I have to do it for my job, obviously, but also I write new block articles every week and sometimes I'd learn it on the spot while writing something.
If I write something about how shell classes for example it's not something that I often use, but when you write a block post about it, I want it to be complete.
Then I need to understand the whole logic behind it myself too. So when I start writing, I actually start learning stuff at that moment and writing an article about it as if I was using it for years, which I don't, I just learned it at that moment.
That's how I learn things. I just choose a topic which I'm not sure about how it actually works. And then I just write an article about it and while writing I learned the subject.
And how important is the part of documentation in power shell.
The documentation is always the thing that you do last or not good enough, but documentation is really important because it's not important that you know how it works.
Your new you or your your colleague also needs to know that it shouldn't be like, oh this is something that harm created.
But I be because I don't understand how it works. The documentation should be good enough. So that your colleague can understand and run it. And if he has some questions offered or some edge case, which you didn't take into account or then the documentation should be enough.
Just run it. If you have questions, sure.
The documentation should be good enough for everybody to understand it. And I really just like writing documentation.
It's becoming like a standard because you have to protect yourself. If you only write things that nobody understands, they will keep on coming back to you and ask you.
And how the system is like that documentation helps. Yeah, a lot. Yeah, I know a lot of people they say the code is a documentation.
Yeah, if you understand code, yes. But if you do something like really special, which is only applicable to that one customer.
And just looking at the code to probably be like, I don't know, December's coming out here. I should write. I should ask the guy who created the script because I don't understand.
And what role does GitHub play in your workflows?
Well, a lot to get a piece is the place in which you store your scripts, but you also have your revision history in it.
And sometimes it's like really handy because you keep on updating scripts and anything.
It doesn't work anymore now. What did I change and get helps you in that you can see what the changes were for each time that you actually commit your code to get up.
Or get lab. There are multiple Git products. Get it being the more popular one.
It's good for documenting your code sharing your code, having a efficiency on it. It's like a central repository. I think you had like.
There was a foundation server thing also for programs in the past. There was like an on prem products, but it has it had the same technique checking in and out code, making revisions, doing pull requests, letting other people check your code before actually committing your code.
Yeah, it's a great work process as well.
And do you in version control all your scripts?
For the ones that are published on my website, no, I just commit to main and the first thing that is there that that's always version 1.0 because there are like example scripts scripts that I used in my blocks to show certain techniques.
But within our companies, it's much more strict and that.
And also the partials vary and graph up. We are very mating. And there, yeah, I think with big.
Mate comes big. I don't know what Uncle Ben has said for a Spiderman something like this.
How do you approach security.
Financial management for power show.
The initials in scripts is a really bad idea. There were a few bigger hacks because of the github repository, which were accessible on the internet, which actually had to your text.
And then you should always store them in things like Azure Keyfold, for example, or use certificates.
You skipped so that your script does have the tenant ID, for example, application ID of your administration, but you authenticate towards that using a certificate, which is in your local keychain or a certificate store, your clients.
You should never store credentials in the scripts. And I did that in the past. I mean, first start out scripting. I think, well, my script is a summer on a management server in a closed down scripts folder.
But no, you shouldn't do that. You also have them to local.
The management feature in that that you actually have like a local people like thing, the secret management module takes care of that.
It's just general best back sender so many examples, which we should show you should do that.
And then you also have to work with tools like, I don't know, Keyfold or logic apps to.
But you think it's when you are, is the best practice for security.
I think Microsoft for for the fabric or stuff for data stuff, they have a lot of these gold standard things.
So, are there anything else for partial?
It probably depends on which platform you're connecting because powerful doesn't limits itself to only Microsoft products.
It could be Google or AWS or any other platform.
I think the concepts are the same role based access control using a keyfold like system using certificates, no clear text credentials in in scripts itself.
Conditional access things making sure that your client is actually compliant or of certain location or that you're not like a risky user before you actually start script or having access to your.
365 tenant security best practices, I guess.
It's really awesome. I think what you say that you and then it's nothing I know before you can really work with other not Microsoft tools with power.
Sometimes vendors actually create partial modules for their products even though it's not a Microsoft product.
Usually the module has a lot of command that we do is make it easier to do API calls towards that product.
It's just like rappers or command that using API calls to manage their products returning objects to you making it easy to do reports on them or whatever.
I think a lot of products use how shell modules to manage it.
It's becoming more of a standard. Yeah, that and probably iPhone modules as well too.
That's something that I use myself but yeah.
And how does it I don't know when the product update and so on comes.
How can you monitor or track these these changes that you have to I don't know to change anything on on script is there something like alerts or so.
Sometimes you get like information from from Microsoft itself like the Amazon line or Azure AD and Azure DP few modules.
They will start communicating like two years ago that that will be deprecated then will then they will put out a date like in August of 2025.
This product will no longer can no longer be used to manage this aspect of 365.
And then that probably will postpone that for a few months again because not everywhere is ready for it.
But there's a lot of communication about the bigger things.
But sometimes you have like breaking changes when you update to a newer partial version or Microsoft updates their back end platform to something.
Then you just find out that your script doesn't work anymore. And then you probably need to update your partial modules itself.
And then you can update for that as well.
Sometimes your modules just don't work anymore because they have become because they're using all technology.
So it's for me is easier because I read a lot of partial community stuff and my whole LinkedIn page is probably full of articles of people.
And the verification system I guess but Microsoft really gets you a long period before they retire modules that could use to work but are now deprecated.
Just reading the news I guess and information emails that you get from Microsoft as a technical contact for your tent, for example.
It's also in the in the message center.
They will post regular updates on that if you follow the message center in your tent, you should already notice.
But there's no monitoring tool or something you can.
You have good scripts and pipelines.
They will report it to you or do like a best test on them to see if the functionality still works and if your script breaks and if it does then you know that there's something wrong.
You probably need to find out from somebody update something has something changed.
But yeah, you should have some monitoring in your pipelines or in your scripts when building newer versions or testing them.
And also important is that needs to stop if something doesn't work.
If something in your script doesn't work but you skipped keeps on running and probably destroying stuff afterwards.
But you should always be aware that some steps in your script might fail and you need to stop and notify them straight away instead of trying to run the remaining part of scripts and then we destroy things.
And how it's the yeah, the fine ops part in a power shell.
It's paid by I don't know computing or how does that.
Yeah, the payment works.
Well, running running it on your local workstation.
OK, you already paid for your workstation, but there are like.
Pipelines there like runners like little instances that get started during the process and they run your scripts.
For get to actions, you have a certain amount of.
Usage, I guess and also in Azure, but if you have to like the really longer running scripts, it will probably cost you some compute and it depends.
You can scale that to larger units, posting you more, but then your script is done in like a few seconds or you have to like the budget version and your script just takes longer, but it's cheaper.
But there is automation at scale.
There is some cost in running those, but usually it's not that much, I guess.
But like everything in it, it depends.
Yeah, it's really true.
Yeah, but I think it's not the most expensive tool Microsoft about.
Oh, no, there are much more expensive ones.
Yeah, when when we think I think back, yeah, when you start a project, you also need, I think.
And the stakeholder and the sponsors, the management, how did you sell or.
Take the management in the automation process.
Well, I work at a pretty large Microsoft partner in the Netherlands in Spark and probably see the logo in my wallpaper against the wall.
This is our absolute office. It's probably an older picture, but it always looks like I'm at the office, but I'm at home right now.
For us, it's normal.
You should always automate things because it just makes sense.
If you do projects for or work in a smaller company, then you have to convince your management.
And you can really do that, I guess. If you have certain things that would normally take up a lot of time like weekend hours, for example, for doing certain things.
And you can show or prove them that automating that eliminates working in the weekend or working in the evening or spending a lot of more time on normal day to day operations.
It will sell itself because it will make your work a lot more efficient.
But if you have to spend weeks in creating scripts for doing stuff that you only do a few times each year, for example, then it's hard to sell.
Let's talk about the Microsoft Graph. What's your favorite graph use case?
If graph use case other than user creating updating, I actually use it for a lot more things now.
Like I said, a project for automatically, consulting Google meetings to Microsoft Teams meetings.
That's a really nice.
And you can use graph use case in which you can completely automate that using all the 365 services that it connects almost every part of the 365 services and the entry portal.
You can automate that using graph.
There are actually tools for that from metal for not metal for not know you probably heard of him.
Microsoft tools like graph X-ray, like that's like a plug in in your browser, which you can use in a developer mode to see what graph commands were actually being used when you click around in your admin portal.
And then you know what graph API endpoints it hits and then you can automate that.
It makes stuff so much easier. They did a change on that beginning of April. So you don't see which partial modules you should use to do the same action.
Same code for the graph explorer. It also had that feature, but it does show you which.
In folk MG graph request it does which API endpoints hits.
So using those tools you can actually see while clicking around in your management portal doing click offs instead of automation.
What you should do to automate that.
The integration is really there. So that's off to a metal because he makes my life a lot easier.
And see you.
Graph it's upcoming knowledge for for modern idea. That's all that's.
It's it's it's it's completely bound to all the Microsoft online services, but the way of working if you can do that.
And you know how those things work.
You can probably automate a lot of other things.
Using partial different platforms. It's usually the same technique. Effort platform has its own things.
And if you understand the technique, you can do every platform.
What's your opinion on.
We first administration.
It gets the job done. I guess it will only take you longer.
But if you do it using the GUI because that's the only thing that you have.
Then it will always.
Exactly do what you want because a lot of the fields that you have to fill in using the GUI.
Don't use a special character here. This has to be this many characters or the GUI really helps you understand the things that you have to fill in.
And if there are certain conditions while filling that in.
And then you can automate that because you already have that knowledge and then you know what fields you should do.
At least use which are the required fields etc.
I only use GUI to.
Clicky see things but if you really want to see things and you have to use.
When you have to rank power show comments.
What's your all time favorite.
The one that I use most is.
Most power show people will tell you is get help get help forgetting the help things of certain commanded.
Get method show all the methods that are certain commanded has.
Those are things that I use most frequently I guess because that's what I always do.
I try to discover what capabilities of source module are.
What methods does it have and what can I use to automate things.
And those are always there because that's the fundamental thing of power shield.
Those things are always there.
And what is the I say the most order. Yeah most used keyboard shortcut every power show expert is using.
I think my tab key is the most worn out key on my keyboard because.
I did Cisco switch programming.
I'm a CCMP as well.
The lot of Cisco.
When you're in Cisco command line you just type a few characters and you hit tap and it order.
Complete to your command.
That's also available in power show.
So the most he that I use in a power show is probably tap tap completion.
It's great. I see sometimes I see people typing out a complete command that you can use just use tap or shift tap when you want to go back.
One one position if you over tapped and you can use shift that to go back.
So.
That I use is probably tap.
I have a little bit. Yeah into the power show about ox and so on and I have taken three quotes and yeah I read the quote and you tell me what this means to you.
Okay. So the first quote is automation applied to an efficient operation will make me.
Magnificee the efficiency.
Oh god damn.
Again I did.
Applied to an efficient operation will magnify the efficiency.
Yeah it will definitely magnify the efficiency of your environment.
A lot.
That's the thing about power show.
And it's really important to think a lot more efficient, repeatable, scalable.
With trustworthy output because you you're sure that output that you're getting is real.
And it's been tested and it's it will always give you the same output.
And the best script are the no ones notice because everything just works.
And you use invisible automation means successful automation.
Yeah. Yeah.
And that's that's also the danger of automation.
I guess if everything in the background is good or sufficiently automated and things just work automatically and people will start forgetting that didn't.
It was not always that that that case. Sometimes people don't know how certain things are suddenly there because we're background.
Power show keeps keeps on creating adjusting, making sure that things work.
If that automation stops.
People will have a hard time discovering why things are not there automatically anymore.
And if you skip just work fine then you can't explain to your manager that you really need to do more power show skips before because it really think it already works.
You don't have to do anything yet because you already already already.
We got on the line.
If you you can order major self out of it, you are. And I don't really mind doing that because then you would have done the good things and you can do that another company as well.
Community is very knowledge becomes impact. Why is community so important from the power show world.
Not only for the power show world communities is always great. Even when you're not in IT having like minded people around you.
It just elevates everyone sharing knowledge who increase the global knowledge of everyone in your team.
And because people really enjoy certain products, no matter what it is, it could be powerful, could be exchange, could be teams or whatever.
Having enthusiastic people around you sharing ideas is just great.
Setting the best friends for them in IT.
Now we come to my favorite part of the episode. It's the rapid fire around. It's only the fast answers.
You say the first thing that can be in your mind. And I asked some short questions. So that's the rule.
That would all light mode on.
Most underrated Microsoft product.
Oh man.
I use them all to the.
Pretty large extent.
No, no, no, no. No, no. No, no, no, no.
Yeah.
And it's a powerful module. It's a favorite, powerful module.
It's it's peace. Realtime and it's something that is almost all a melody in power show nowadays.
But it makes it has like when you when you type a few characters, it will auto complete from your history.
And you will be run certain quanta. A lot. You just type a few characters and your previous history will always be there.
So peace read line makes navigating through your power show commands that you used in a lot easier.
It has so much great functionalities. We have peace read line.
Yeah. So we have become to the hands and yeah, my final question is when.
Listeners remember only thing from this episode. What should it be?
Learn Power show.
Just just do it. If if if if if you keep on backing off on that and then possibly don't do it.
It will make your life easier.
Yeah. Then. Yeah. I will say thank you for joining the session.
Thank you.
And your power sales fund.com as think the people show you visit us and we do put it in the show notes.
So the people can see all the information in the show notes and yeah, so this was really, really interesting.
And I hope or I think it's a lot of people will now try out power show and look look what it is and would.
Yeah. Bring so thank you for staying here. Yeah. Thank you for having me.
Yeah.