PowerShell Made Easy

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
you know what they say have no fear powershell is here it's time to learn [Music] hi everyone andy here welcome back to the channel i really appreciate you stopping by this time around i thought we'd take a look at powershell there's a lot of misconceptions about it some people love it there's a massive powershell community uh people get really excited about it and some people are really scared of it but in this session what i thought i would do is take you from zero to hero in approximately 23 minutes or so so stick with us for the ride i've got a really interesting session for you and of course i love your feedback so any comments questions anything at all get them down below and i will do my best to answer your questions and of course if you're not a subscriber please go ahead click on the subscribe button ring the bell and you won't miss out on any of the good stuff in the future so without any more jibber jabber let's get on with it enjoy so let's get into powershell made easy and it really is easy by the way so in this session we're going to talk about how you can use powershell we'll talk about uh powershell and how it integrates into microsoft 365. also going to talk about how and why you should get involved in this great community because it is amazing and so you know don't sit there scratching your head thinking that there's got to be a solution for this because there is solutions and also i want to take a look at are there any alternatives to powershell which i'm i'm constantly asked as well so who is this talk for well the you already know some powershell you may know the basics but you might think to me andy i don't know anything about powershell well the question is then okay well if you're a bit of an old-timer like me then try this one if you know commands like ping or ipconfig you already know powershell it's that it's that simple okay you know you're a way around the microsoft 365 admin center you're not necessarily your company's devops guru i mean you might be and if that that is that's great for you but you might not be um so in terms of using powershell um key thing you need to know as with all microsoft products there are certain features and functions that can actually only be done in powershell also anything that you need to do more than once okay because when you start repetiting tasks oh it can be really really um annoying and time-consuming so you really want to kind of automate things and definitely have that as one of your life goals um sharing is caring so i said one of the great things about powershell is it's all part of this great community so definitely go to the github powershell command sorry uh website there and get involved okay so you should know there are currently two versions of powershell so on the left hand side the the blue screen but okay it was a good blue screen so don't worry um it was the old and trusted version of powershell and it's been around for a number of years based on the net framework it runs on windows only so typically only windows and you can get access to it by going to powershell.exe and it goes up to version 5.1 the thing is it's still supported so don't worry if you know you're not forced to go to the new version you're still going to be supported and it's absolutely fine on the right hand side we have the new kid on the block we have powershell core this is based on net core technology and it for the first time it's cross-platform so my god does that mean it's open source yes it does okay so you can install this on a mac you can install it on linux you can install it on windows and soon there is also clients for mobile devices as well so again completely cross-platform here pwsh.exe is the command and this is version six and beyond and microsoft have very much said that this is the way forward all right now six was released actually in january 2018 and just to give this some context um a very nice gentleman at microsoft called jeffrey snover google him go and see some of his videos if you get us a chance to attend one of his sessions at the likes of microsoft ignite then go and see him the guy is a genius he invented powershell and apart from that is a very nice person currently powershell core is in version 7.1 and as i said it's cross platform so windows mac os linux and so on so this is what it looks like so you get this black screen again a little bit different and it's and one thing's for sure is you'll notice it's a little bit slicker a bit faster than traditional powershell which as i've said is still supported here as well all right now key thing by the way a common question is can i run them simultaneously can you have both versions absolutely you can so there's no problems with that um the different hosts and editors out there so excuse me we've got powershell console so one of the other so the black or the blue one you've got ise which is the integrated scripting engine so if you just go into windows from the search command just type in ise and you'll see it it pops up i really like this by the way um this was kind of powershell for beginners and so you could literally just click on the powershell commandlets and it would automatically generate the script i really liked it forget me i'm i'm an old-timer when it comes to that visual studio code so if you fancy yourself as a bit of a devops pro uh you don't have to be of course but you've got visual studio code in there as well and i love this by the way if you are a subscriber to all things azure and microsoft 365 if i just flip over here into my browser and let's say i come scroll down and i'll come into the admin center in 365. and look at what we have right here in the corner both in azure and 365 you've now got this cloud shell feature now um again i can go into cloud shell either you can use bash so if you're using linux or you can use powershell so you know that's awesome it's really really cool and by the way the nodes adjust themselves according to the the program or the software that you're in so if you're in shower sharepoint exchange if you're in the admin center users and so on it will adjust itself automatically for you so that's really nice feature by the way um now when it comes to visual studio code for authoring and debugging now i'm i'm not a developer so don't ask me any developer questions over my head but the cool thing about powershell is you don't need to be you don't need to be that developer and you don't need to be a guru but if you kind of want to stab your toe or put your toe in the water i should say um it's extensible it's customizable you can do some cool stuff with it all right it takes a little bit of getting used to but there is tons of learning materials out there so white papers docs.microsoft.com there's stuff on youtube oh my goodness me there's loads of stuff in the community so get out there and have a look at that okay this is it here so you can get it from github um so you can install that and and work with it now okay so andy just take me kind of take me back to the beginning take me to the basics where do we start okay well working with modules one zero one module one um so the key thing about power shell is it's exactly as it says it's power shell so the fact that it's a shell it's a wrapper you can then obviously the thing you need to learn is that powershell is very modular so depending on the piece of software that you're working with exchange for example or sharepoint or teams or whatever each of these things are going to have their own modules all right so the first thing you need to know is where do i get the modules how do i install them powershellgallery.com is your definitive source and if i go ahead and click on that this is your definitive source for all things powershell so again you can literally type anything in here so if you want to know about let's say for example microsoft teams and you know i i want to know if there's any scripts for microsoft teams look you can install the modules the scripts for when it windows linux macs awesome all right so literally there are millions of resources here just for you so this is a fantastic place uh to go and visit for all things powershell don't sit there over the weekend scratching your head trying to work out oh my god how do i do this how do i accomplish this you don't need to somebody's already done it for you trust me on this okay so um working with the modules uh it uses a verb dash noun type interface that's the first thing so what if i wanted to get a module andrew or andy get dash module new dash module get the idea new dash azure ad user yeah new dash spo site sharepoint online site say what you see say what you want okay um but the key thing is obviously where where are these modules and again they're in powershell so you can see here i can type in get dash command and then star so show me all the commandlets that are available for a particular module so yes module now if you ever wanted to type in multiple commands you can see here that we have a little pipe sim symbol you see the little vertical pipe symbol there and that means you can string another command off that how many can you have andy as many as you want okay but to be honest after a while check this after a while it would get ridiculous if you had like 10 or 15 different commandlets like that so if you ever get to that scenario all you do is simply copy that paste it into notepad and save it let's say call it x dot ps1 congratulations you've just created your first powershell script and it's that simple all right so really really easy and you can see here it shows me all the commands find dash module install dash module save dash module get the idea say what you see okay okay so again here we can do it again the same thing again so you can see it shows me um a complete listing of all my different modules okay so where can you get the modules from well as i said powershellgallery.com is awesome and you can also get it from github as well that's microsoft's code repository and that you can either have kind of private corporate um repositories or you can also have public ones uh there as well so really nice okay there's the powershell gallery that's just what i said okay now what about powershell and microsoft 365. how does that work well microsoft 365 as you can imagine has quite a lot of different elements about it so we've got um different modules so azure ad so azure ad is a module you've got exchange you've got teams you've got skype for business you've got sharepoint online and you've got security and the compliance tools all of which have their own uh modules okay so um i love this by the way um automate and power apps so i'm gonna do a session on these in the future but i'm just gonna flip back over to my portal here and some of you may have found this in your subscriptions but you kind of what what do we do with it um so if i scroll into my main microsoft 365 page come down to the bottom here where it says all apps and in the all apps area look at what we've got so in the microsoft apps here you have got power apps and power automate so power automate let's check it out so power automate is a fantastic tool to create automations andy that sounds a bit like powershell doesn't it power automate power shell don't you see the connection here okay so you can see right for example there's some demo once here and there's also oodles and oodles of templates so literally you know um save an outlook.com email attachment to onedrive so anybody sends you an attachment it will send it to your onedrive account and it's just a very very simple automation so look anything from outlook.com you just add in the username boom create the flow and we're done all right so really really easy and as i said there's literally tons and tons of different options there so everything for you know for onedrive and integration remote work um things that might manager manager or need a manager's approval rather if you want to create a button to automate something so send myself a reminder in 10 minutes just click on a button and it will send you a reminder there's some really nice stuff in here now of course um there's also um you can create your own you can create blank ones and really nice if you want to get that kind of really cool and smart you can even build your own ai artificial intelligence engine here and there's loads of tools here and what makes this really nice is there's a whole learning platform here so it takes you right through to microsoft learn and this is the step-by-step guides everything that you need to know i can tell you by the way if you get into this you can make some serious some serious dosh as they say all right so prerequisites first of all for 365 admins you need to be a global admin for this or not so much a global admin but depending on the service that you're using so if you're using sharepoint if you're using teams you need to be one of those role-based admin roles need to use windows 8.1 or higher now the further we're going actually windows 10 is becoming the the tool of choice so if you're still on some of those older products then you really you might find some limitations coming in and also you need to download those necessary modules so installing a module how do i install a module install dash module okay so i want to install azure ad so install dash module azure id ms online by the way is microsoft online and that's the that that was the original name for the microsoft 365 powershell now if you said new dash um ms online use or new dash user ms online it's the same as you can create a an azure ad user or an ms online user of course they're the same because ms online um you know they're backward compatible these uh scripts um you also some of the other ones here look at that uh sharepoint on online sharepoint powershell oh my goodness i love this one though install dash module sharepoint pnp powershell online can you imagine if you had to type in that the great thing is you don't have to there are shortened versions of it plus also a cool tip by the way is when you're typing powershell commandlets you can press the tab key and that will auto-complete many of these commands you can also use the cursor keys so up and down to move and it's a history buffer and you can also go back and forward in those commands hopefully you're not confused okay i i'm often asked andy are there any alternatives to powershell and there are so community is a huge thing in my industry and this is one example so somebody has created a really really simple powershell tool here okay and so press one and it does it press two and it does this yeah so you don't even need to type anything it does it all for you so that's really simple and remember what i said about uh the shortened versions of the commandlets check it out okay so rather than typing sharepoint online or microsoft online sharepoint powershell which is a real mouthful you can just type in spo new dash spo site new dash spo user get the idea simple think easy all right it's that simple so ms all is microsoft online um interestingly enough the skype online connector check it out cs what the heck does cs mean well previously of course skype for business was known as link server before that it was known as communication server so microsoft had been a little bit lazy and they've not updated it over the years so okay team cc is security and compliance and pnp thank goodness for me is sharepoint pnp powershell online thank god i don't have to type that okay on the subject of sharepoint you'll notice that there were two modules for sharepoint so spo or sharepoint online is the admin tasks that's the admin portion new dash spo site whereas patents and practices is that basically anything that goes in the sites okay so you can see here you know i want to add a list item in a library for example or i want to add a list item you are you know something like that in the list now there are over 300 commanders so i'm not saying that you know need to know this of course but if you are a sharepoint specialist you will find this uh increasingly useful so we've got over 300 plus commandlets and they're all in various categories so everything from document sets branding publishing the recycle bin search and so on you'll find there okay um one good tip by the way remember i mentioned that if you want to create a powershell script it's with the ps1 extension no no no don't put your usernames and passwords in there oh my god that is like seriously bad practices guys come on and then what you do you think oh i'll share it so you stick it up on a sharing site oh my goodness me what a nightmare that would turn into okay you can use something called a credential manager so credential manager in microsoft 365 and then azure basically will encrypt and store your your passwords in an encrypted and safe manner so definitely put that in dollar credential get dash stored credential well normally you would type in dollar credential get dash credential and that's where the the microsoft 365 login dialog box would come up but if you've got a stored credential you type in dollar credential equals get stored credential for sps milan so the sharepoint site milan okay and it would auto fill in the password or the credentials for you really useful by the way okay another thing you could do of course is write your own so if you're a bit of a geek you don't have a life now i'm just kidding um you could write write your own i'm a bit mean aren't i so plaster pester or platyps these are all examples of tools and modules on how to write your own scripts there is a mammoth amount of material to get you started and as i've said jeffrey snover has done some fantastic presentations on this so definitely go out and check his site and have a look at those basic uh getting started sessions alternatives to powershell are there some yes well as i mentioned there is the office 365 client you can download it it's free um and you can see look it's a simple menu system so really really simple to use um and yeah definitely have a look at that okay so um hopefully that's not scared the heck out of you hopefully that's just given you a little taster into the basics of powershell so you've got nothing to lose go out there download it try it play with it and see see what you can do with it all right so there we go so that's it for today i really hope you enjoyed it if you did give us a big thumbs up i really appreciate it and if you're not a subscriber go ahead click on the subscribe button and ring the bell so that you don't miss out on the good stuff in the future all right so comments questions down below and until then you stay safe and i'll see you next time thank you very much thanks for dropping by hope you enjoyed the video go ahead and click on the subscribe button and ring that bell and you won't miss a thing see you next time [Music]
Info
Channel: Andy Malone MVP
Views: 1,307
Rating: undefined out of 5
Keywords: PowerShell Made Easy, Microsoft PowerShell Basics, Learn PowerShell, Getting started with PowerShell, Andy Malone, learn powershell, windows powershell, powershell for beginners, powershell tutorial, powershell basics, how to use powershell, powershell tutorials, microsoft powershell, powershell commands, learning powershell
Id: b7SGPchYRn0
Channel Id: undefined
Length: 25min 38sec (1538 seconds)
Published: Fri Sep 10 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.