2020 Q3 - Chicago PowerShell Conference - Jeffrey Snover - Keynote + Q&A

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] [Music] hello this is jeffrey snover uh today i'm talking to the chicago users group uh and first we're gonna talk about the state of the shell but first let me tell you a little bit about what's going on here so this is the first time i've ever given a talk this way and i'm sort of doing my own production what's that mean well typically you know you go to a conference and i just show up with my content and somebody puts everything together this time i'm doing it myself so i've got a very complex setup here i've got obs i've got ndi i got cameras i got lights i got a stream deck here and honestly i've got no idea what the heck i'm doing so i'm gonna mess up uh quite a bit and i apologize you were my uh you are i'm dog fooding this on you uh but i'm gonna have some fun with it and we'll see i've got some great content because obviously powershell is great um [Music] the state of the shell and uh and see how we how we do okay so first uh covet 19. you know obviously the big the big uh thing to talk about wow wow wow wow what strange times huh um it's kind of turned the head upside you know turn the world on its head things are very very strange obviously what i'd prefer to be doing is to give this talk to you in person uh to meet you to hear from you get your stories uh that's a key way we listen you know know whether we're on track or off track and so that's a little bit more difficult now obviously if we're in chicago we'd be having some great food we'd take that architectural boat tour that i've been dying to do for years and years and years so things are different but i'm going to talk about how powershell plays a role in that right [Music] now here's the thing the world always has been the world is and the world always will be a messy place okay and so in this time what's really kind of highlighting what was always true but is even more true now is that what really matters is adaptability resilience robustness and automation okay these things have always been important they have never been more important than they are right now okay um and really i want you to think of this as that f5 moment you know f5 refresh that refresh moment and you want to stop and figure out what serves you and what does not and you want to invest in what serves you and drop what does not and so you know basically what the key insight i've had here is that this environment uh points out change is required change is required and in order to change you know it's not just about adding more to your plate you have to throw some things aside you have to figure out what's important and you throw things aside to make room for investing in the things that are important that's why i dropped some meetings spend some time actually that's not entirely true i just spend more time i get up earlier and invest in trying to learn some of these tools and honestly it's been been it takes a while but anyway you want to invest in yourself at this time and that's why taking time for conferences like this is so important okay um and i'm just thankful you know thankful this is a great time to step back yes there's a lot of difficult times but be thankful for what you have and be thankful for the opportunity to like this to learn so one talk about teams uh you know my new role i'm the technical fellow of uh the and cto of the modern workforce transformation effort what's that mean well it's basically m365 office and uh teams during this time of covid has had incredible uh uh growth in adoption i mean just crazy so what do we say here teams usage is up by 12 million in the past week let me let me say that again 12 million in the past week i think we recently said hitting 44 million daily active users so guess what that was a while ago i think we just announced that it's like 75 million daily active users so i mean teams had been doing awesome and then when this hit just ka boom now what's the point what am i why am i talking about that and what i'm mean to say is that in this time uh whereas teams was just rapidly accelerating they tapped me on the shoulder and said hey jeffrey it's all hands on deck and we need you to help out and to be the executive incident manager as we're scaling up uh europe right so basically european demand was huge and uh and so uh middle of the night i got up and was incident uh um manager which meant kind of track things he make sure everything's going well as things get a little bit wobbly go get the teams the assistance that they need now why do i bring that up and it's this oh my heavens powershell was everywhere everywhere it's unbelievable how much powershell was used uh just absolutely everything right for diagnostics as things got a little bit wobbly operations as we're standing things up repairing things provisioning things powershell powershell powershell the number of times i saw a powershell script posted into a team's channel oh we're going to run powershell to do this oh we need to write a powershell script to do that and and the interesting thing was things just worked i mean we went through this incredible uh surge in adoption and the wheels stayed on the bus and i'll tell you that uh you know in during it was a stressful period and the qualities of powershell uh you know its verbosity and its clarity were really a gift i don't know if i've ever told you the story but basically sort of the core design of powershell was influenced by a a pretty traumatic business trip i had long ago where i spent you know basically nine days at the elvis presley memorial trauma center sleeping on the data center floor getting woken up by a hospital administrator saying jeffrey you gotta you know patience can't be admitted in the hospital because of your software like my software oh good lord and so then i'm wake up three in the morning and i'm stitching together these database records as early beta software um and stitching together these database records and i was not at my best and i thought to myself boy i can't believe the the tools i have to deal with this situation when it's tense like this when it's tough like this you want to have nice verbose tools uh when you open up a script that didn't go right you want to know what it did i was thinking myself boy you know in that environment you had something you ran a script and it didn't go right and you had to figure out why and it's a perl script i mean that's it you know that just be the worst thing in the world but you bring up a powershell script you can read it you know exactly what went on uh and we and the interesting thing about this was as we're surging up we also where'd that capacity come from yes we're buying as many uh computers as the supply chain would allow but the demand far outstripped the capacity to buy those and bring them those online so as we were bringing things up we also had to bring other things down to say hey let's reduce some of the inefficiency let's you know introduce a little bit more risk and whether it was scaling up or scaling down powershell was there and powershell was your friend and it was a wild success you know so you know happy days okay so you know klaus feds the famous uh theoretician once said to secure peace is to prepare for war well i have a variation on that right to secure calm is to prepare for drama okay so you gotta prepare for drama and that's what powershell is all about preparing for drama you learn your tools you learn the skills you learn the patterns and then when the mess comes because the mess will come you can be calm you can look at the script know what the script did you can investigate something you got to do something you can guess about what you want to type you type it and you get it not quite exactly what you want you can investigate iterate you have the skills because you prepared okay attending this conference is a step in preparing this user group step in preparing so the real point i want to make here is powershell has been a 20 partial 7 is the 20 year story of preparing you for drama powershell is all about you powershell is all about you it's about your success it's about making you be the hero of your organization uh in fact so much so that we let me go back to that so much so that we even have what we call the sacred vow right the sacred vow how many products and technologies have you worked with that made you a sacred vow and yet we have that and our sacred vow is you invest in learning powershell and we vow to you to make it one of the best investments you've ever made i continue to invest in this technology so that you become more valuable over time and so you're going to see how seven partial seven [Music] continues and fulfills that sacred vow to you again 20-year journey if you want to hear more about the details don jones has recently published a book about that uh don reached out to me and i connected him up with a lot of the early you know powershell in fact monad people the program managers etc and he reached out to them got their stories and put it into this book the shell of an idea uh here's a url i think it's pretty great book you know and i think it provides the full story of powershell you know i think there's this false narrative of you know powershell equals jeffrey you know that's not at all true yes i was i came up with a lot of the original ideas the core architecture uh the monad manifesto that was mine but the reality is the thing i'm proudest of is the fact that you know the monad manifesto and the architecture that i put in place allowed these awesome engineers to come in and contribute and add their awesomeness in a way that produced a coherent experience right bill gates gates used to always say you know we're really good at finding and hiring the world's best people we just suck at getting their iqs to add up and indeed that's a very hard job you know you got a great idea here and you got a great idea there it doesn't necessarily mean that those two together are gonna be a great idea okay and so the great thing about powershell is that we were able to do it in a way that the iqs added up uh that you know um lee holmes and his awesome work in security i was able to add his thoughts uh bruce payet with his incredible knowledge along with jim truer produced this fantastic language ken hansen with his great uh ideas around namespace and modules all these ideas were able to be added in a way that didn't conflict anyway the nice thing about this book is it tells those stories and it tells the drama you know a lot of these stories have never been told before a little bit of behind the scenes i think you know some of that you know obviously i was demoted to go work on powershell that was very painful i kind of tell the rest of that story uh in this you know it's one of those like it was a very just painful period um so all those great stories are in this book i encourage you to read it happy days fun stuff so again i mentioned to you our sacred vow our sacred vow is this you learn powershell and your value will continue to appreciate over time again whenever you think powershell you think this the powershell team is investing in me right that's the thing we are investing in you it's all about you it's not about me it's not about the powershell team it's not about the technology it's about you and your success that's our mindset that's what we come up today every day we show up to work with that as our mindset by the way that's why it's so important for you to engage with us right you need to tell us where it's working you need to tell us more importantly where it's not working so that we can invest in you and you'll see also how we've made it uh made it open source so that the community can invest you can invest in it as well to help yourself and your fellow uh people so now i'm going to talk a little bit about the evolution of powershell as i say it's a 20-year journey now interesting point 20-year journey what does that mean well you know a lot of times microsoft gets all hot and excited about something then we get distracted and move on that's not been the case with powershell right at some point i i talked to an executive of a of a company who had just made a huge bet on powershell right product bet on powershell and i said that's it's great you know why why did you do that and he said you know uh indeed he pointed out microsoft runs hot and cold on technologies he says but powershell is a is a story of continued and enduring investment he says that's something i can bank on and indeed uh we continue to invest in powershell so powershell version one through zero two this is back to that comment i made the world always has been the world is and the world always will be a messy place right and you had com you had the registry you had win32 apis you had files you had.net you had wmi you had sim big mess and so what powershell version one and two was all about trying to provide a way a glue so that you could combine all these tools into a coherent way and right so that you could access and manage all the things you needed to access and to put it in a high level task-oriented abstraction right with strong verb noun guidelines so that you could think about what you want type it and get it okay so it's really you know beginning was all about gluing together the messy world then from three to five right we started to add remoting and we shifted more to management of domains right management of the networking of the security by the way in the first version i think what do we have like a hundred and some odd commandlets 100 200 small number of commandlets i remember at some point you know once we got wmi uh command leds this number i think that was in three we went from a couple hundred to like over twelve hundred commandments this is when now you can manage everything right you can manage hyper-v you can manage storage identity security and you can manage it here or you could reach out and manage remote machines and large quantities of remote machines that's one of the things i think people don't give powershell credit enough for and that is our focus in on scalability when we did numbers where you say hey i want to run this script block on on thousands of machines in fact it was tens of thousands of machines and it ran just fine right so that's what we had in in mind this very massive scalability um with powershell six it was all about ubiquity again what'd i say a continued investment so hey we got all this great coverage we got re remoting but we kept going forward powershell six and by the way this powershell six core now notice that core core basically meant in order to get ubiquity right so what is ubiquity it runs in azure it runs on arm and azure's arm it runs in aws it runs in gpc it runs in vmware right runs in linux runs in mac os linux mac os microsoft linux mac os what yeah and so basically here we had to shift gears from dot net to net core dot net core is a small subset version one was a small subset of dot net but it was portable and the team did an incredible amount of work in order to refactor and get on.net core it is hard to overstate the amount of work and grunt work that the team invested in for you okay because honestly you know we had people like why are we doing this you know the full powershell you know full powershell uh on or sorry powershell on the full.net framework is rich there's this backlog of things people are telling us you need and yet we're not doing that for well over years like a year and a half to go invest and do all this hard grunt work only to end up with something that is portable but has less functionality and the answer is yeah and the reason why is it then allows we're investing in the future of you right that this is now a tool that you can use as your company says hey we're not just a window shop or a heterogeneous shop hey we're not just an azure shop we might use aws or we might use uh google we use windows and we use vmware we wanted this to be the tool to manage everything and so that's what we did and i'll tell you that you know honestly we lost some of the team members some people just said that's not the way i want to spend the next year of my life and we said no sorry to sorry to see you go but it's not about you it's about our customers and this is what our customers are going to need now notices in this square here circle um it's not fully covered okay so in fact that was one of the challenges we had with with net powershell core was it was awesome but it didn't meet the full uh coverage there were some things that you could do in windows powershell that you couldn't do in powershell core if you could do it in powershell core awesome it was much much faster by the way but you couldn't do everything i also want to talk here about the distributions is part about ubiquity is just to there were different ways to get the software and we spent vested a lot of time in making it so you could get it no matter what mechanism you used right so there's snap and there's docker made it easy to work with ci cd pipelines uh it's in the dotnet global tool uh you can x copy deploy it you just sort of can't you know swing a cat without hitting a way to get powershell on your system we also then updated it right so in this modern world right what did i say the world always has been is and always will be a messy world why is that well it always was a messy always has been an essay world because there's such variation at various times we say hey no this is the right way to do it like oh we're going to have cecs get everybody to do things the one way get on you know this technology of that technology but then guess what there's innovation and innovation then says oh well that's different than the way it is today so you always have to be innovating and that's why the glue why powershell is a glue makes so much sense so there was a new way of doing apis rest with json documents and so we invested heavily in those to make that a full first class citizen and we also switched from an exclusively winter ram focused on remoting to nrm or and ssh okay so ssh is the normal uh traditional way of doing remoting in linux so now you can do both environments the point here is core uh sex was focused in on ubiquity and that's what he's saying here outside the shell there was some con temporarily some compatibility on windows that we lost now powershell 70. see that that circle slide in now powershell 7 is the full thing okay so uh net core has continued to do refactoring uh they continued to invest and do a great job and so now more and more of the windows apis are available um and all these commandlets uh that in the past weren't there are now there so powershell 7 and notice we dropped the word core right so in the sixth time frame there was windows powershell and there was powershell core windows powershell ran on you guessed it um windows powershell core ran everywhere but core oh powershell core it's a qualified powershell right qualified because it didn't do everything that windows powershell did now the name is powershell 7. it is ubiquitous and it is full this is the version you want to get on because it does everything you need and runs everywhere you want it to go by the way one thing i want to point out i'm just so proud that when we launched powershell core and six oh time frame um we had our our launch partners were vmware aws and google cloud how crazy is that and again i you know again microsoft your launch partners are vmware aws and google cloud those are not traditional microsoft launch partners right and the reason why they were our launch partners is because this isn't about microsoft this isn't about powershell this is about you it's about your success and these are environments tools that you use and so of course we had to get them on board and yeah when we called them up and said hey we'd like to work with you there was a but what um but the reality is is that time has shown you know us to be true we are all about you and so there's a natural fit with these partners and that's been going very well so the gestalt of seven again kind of said that uh windows powershell was all about simple automation management of windows servers our shellcore was universal across operating systems and clouds a powershell seven the one the ring to rule them all the version to rule them all is about automation management deployment of cloud on premises and hybrid resources at scale and arbitrary complexity great also powershell 7 added some great stuff great set of features we added parallel for each uh people have seen huge improvements in this i'll show you example of this in a second but basically some you know write some code add one switch and uh people see improvements of two to two 200 or sorry 100x speed improvements we had one guy say oh you know this script used to take a couple hours and now it takes a couple minutes now this is not you know a magic pixie dust right it's not something you can put on everything and and uh everything gets faster in fact sometimes if you use it inappropriately it will go slower okay so you got to understand what it does so let's give you a an example of it okay switch to demos it's working okay so let's do this 1.10 pipe to 4h minus process and we'll just give the name and then let's say let's do this start sleep one second okay and what do you get one sleep a second next next ex okay slow right but it gets the job done so now where you could say process by the way that was always optional but then if you want parallel it's not not optional then i'll say parallel oh because i'm in the wrong version there you go remember i said i was going to make a lot of mistakes okay so let's do this again here we go seven now say parallel what the hell am i doing can't be resolved that uh might probably i can't spell that's what it is parallel oh i'm such a dope by the way it's one of the things i love to do so here let's get this in focus right i invented powershell i've been working on it for about 20 years i am a microsoft technical fellow microsoft technical is the highest individual contributor microsoft has i've been in the business 40 years and i make mistakes all the time and i go to my way to not edit these things out i don't let them out because i want you to see that that mistakes are normal mistakes happen all the time so then when you make mistakes don't beat yourself up right i don't know there's this mlb mean little in your head that says oh you shouldn't make mistakes you know oh you're you're not worthy you're uh just whenever you see that stuff just think about hey that guy made all those mistakes i'm doing great give yourself a break okay so let's try this again spilling parallel correctly boom do you see that oh wait notice the behavior it's a little bit odd behavior so one to five and then six to ten really quickly so what's up with that and there's this thing called throttle limit throttle limit and the throttle limit is five so let's show you what throttle limit one does and that's that controls throttling okay throttles and it controls how many things happen at once if you set the throttle limit to one it's the same as not being parallel okay and if you want to you can set the throttle limit to let's say a hundred boom they happen all at once okay so you can control that now why five and this is interesting because uh it highlighted the two use cases for parallelism i saw this and i said guys you got the number wrong what the hell are you doing that number should be like you know 64 or 160 you know some very large number why'd you set it to five and uh they said well because that's how many you know because basically there's two scenarios for parallel one is hey how can we consume all the compute resources on a machine which is to say hey i've got a four or five you know n number of cores and instead of just consuming one core we want to be able to use all of them bring all those resources to bear to solve a problem it's like oh yeah that's a great that's a great uh use of parallel but i use parallel in a completely different model right for me it's to manage latency right and an idleness which is to say imagine i'm going to do some remoting and i want to do something and something takes time okay if it takes time then i'm not consuming the cpu i'm just waiting for something and while i'm waiting i can do something else even with just one core and so that's where they have the two use cases that's why i added the sleep now notice here right when you do this imagine it was you saw the behavior when it was one right but imagine this was five right and and two right so this is gonna take forever this is gonna be just horrible right but you say hundred boom what the heck oh right because it's it's sleeping at the end here yeah there you go so you get the idea so for each pretty freaking awesome oh by the way let me go back to that so i don't know if you saw this so what do i got here right dollar ps version remember i told you i've made a mistake version table so this is 7.1 preview running on windows okay by the way i'm using the amazing new uh terminal window okay oh let me start something here here okay so now i got 5.1 running the desktop so the new windows terminal if you haven't used it it's tabbed it's wonderful here i've got the local version oh there's it does work just such a dope this is ubuntu and if i spilled it right wrong walk happy days so ps version table this is linux it's in fact ubuntu running in wsl on the same machine okay and so this is seven this was 7.1 and then in azure i've got seven running on linux okay so basically remember i said you know we want to make it easy for you to run powershell wherever and by the way it's okay let's have some fun here so what did i say i said okay so this is um i wish i had older versions okay so get command to measure so this is powershell 71. okay nine hundred and thirty seven commandments twelve thousand nine hundred and thirty seven commandments twelve thousand nine remember i said version one had like a hundred and some odd and we had this big breakthrough we had like uh got wmi coverage we got like over a thousand so this is powershell seven twelve thousand buh-buh-buh-buh just craziness right okay now okay that's windows here we are on linux i don't know what the number's gonna be get command to measure okay 10 0.73 so anyway you have great and full coverage it's fantastic all right let's go back that was fun huh all right we've also made it easier to diagnose errors okay so we have a new error view and a new command like get getair best way to talk about that show it back to my demo by the way okay so let's go here 7 cls let's do this stop process nice id 13. okay oh that's interesting nice pithy error message really well yeah what's the difference well in the past dollar sign error error view is called concise view what does this be okay oh wait that's the way you do i couldn't remember the name remember a bad memory so what you can do is just type it to something and it tells you what the error is see here's what the values are so now i'll say normal view i'll do this again this is the way it used to be okay so lots of red lots of complex stuff and so now with concise view how you spell concise no concise view nice concise error message okay additionally let's see dot slash test one uh i've got a file here let's let's cap that see there you go i spelled parallel again wrong okay so let's say i'm gonna run this thing and now look at this right so notice the use of color okay we show the line it's line number three uh highlight where it went wrong and you get the error message so these error messages are really very good okay but now imagine you say okay but but i lost something the other one provided me a little bit more information sure and if you want that you can have it you say get error and now you get that and a lot of information so remember in the past you'd like oh dollar sign error pipe to format list oh but no then you got to do minus force i don't know if you ever did that but you know and then it was just a pain in the butt that you had to make navigate things um because anyway so now all the information you want if you have to debug something is available here okay look at this this is so so if you have some some support issue you do this it gives you all the information kind of walks things down gives you the stack trace etc so a lot more richer view of errors and backward compatibility so with backward compatibility now you know basically went through and and made sure that a bunch of those you know well one.net expanded to support more commandlets more apis so more commandlets worked next is we went and said hey uh for these uh uh command modules we'll want go and declare them to be have them the teams declare them to be whether they work in core or working desktop and then some you'll see they say desktop but they work in core that's because we did the work and found it out and weren't able to get the team to update that but things that we know work we'll update that and then we added this compatibility layer windows compatibility and if you want here this aka dot ms slash ps module compat that link right here uh that gives you lots of details and and documentation about the compatibility of seven but basically you know powershell seven fulfills the sacred vow by investing in continuing to invest in it and making you more valuable now let's go talk about this compatibility because it is crazy cool and by the way now i'm going to go down a rabbit hole but it's just so much fun um and and and what i want to do is to say powershell is fun you should go down the rabbit hole you should have some fun with it and explore okay because there's some crazy cool stuff here now back to my demo again ps version okay so this is 7.0 but it would work well here no let's just get let's get that's preview let's get partial seven do i have powershell seven don't i didn't this is it okay this is powershell seven okay so this is seven now here's the gotcha right so i say get module last list all right this is going to take a while because there's so many what'd they say 1300 commandlets just crazy crazy first time this does this it it produces a cache then after that it's a lot quicker but what you're going to see is there's okay there you go so now what you're seeing is notice here it says core and desktop okay and look most of them there some are only desktop in fact these aren't they we've uh determined that they work and so we'll automatically load them you'll be able to automatically use this and here's the problem i wanted to show you something we call the ps module compatibility and unfortunately um it's hard right in the past used to be you could find a module that didn't work and uh and run it now there's so many work i i don't know if the top of my head have one but i'm gonna show you how it would work anyway here's the conceptual model you have to have in place okay here's the conceptual model you have to place what is a commandlet a command letter is a high-level task-oriented abstraction that you interact with and get your job done now how is a commandlet implemented who cares right the answer is it just gets the job done so in fact a lot of the early commandlets were run as.net code in your process but remember i talked about how version three we went from a couple hundred commandlets to over a thousand the reason why is that we were able to run commandlets backed by wmi and in fact we just had so much wmi coverage this worked out really well so what happened with those commandlets and the answer is you have the same high level task oriented abstraction but what in fact happens is we use a wmi protocol to talk to a remote pro to a process okay and that process is the wmi agent and then that agent typically talked to another process which was the code running the stuff ran executed produced the wmi object so it goes from process to process back to me and then you get the result and yet to you you just type high level task granted abstraction you get your job done and you don't really kind of see the the behind the scenes so here's the thing we can do the same thing with powershell version 5. so imagine that there's some api i said that net had done a great job bringing most of the wmi and most of the windows apis uh and refactoring them not all so imagine there's some commandlet out there that uses something that's not available in that core but you need that commandlet what do you do and the answer is you can run you know have a commandlet here that then talks to a process what's that process process is w powershell version five it then runs the commandlet there and returns the object back here if only we had a remoting protocol oh we do it's called powershell remoting okay so let's see how that works i'm going to use the trusted module platform here okay so just to get that in focus right get tpm boom we get that now imagine okay so again it works so there's a problem imagine it didn't work right and that i want to run get tpm but it doesn't work because it only runs in powershell version 5. what can i do and the answer is this first i'll show you something get ps session notice i got no powershell sessions no remoting sessions now what i'm going to do is i'm going to say import module this thing and i'm going to say use windows powershell okay use windows powershell that's saying use the powershell remoting so it's basically going to say hey use powershell version 5. import it there and make some proxies here and then i'll say mine's verbose oh sorry so at this point it's going to create the same commandlets as the ones i already have and that's an error so what i'm going to do is i'm going to say prefix prefix then with let's just say windows w yeah windows and verbose okay so what happened was fire process import that module there create proxies here and the proxies now have the name w so if i say get command command g dpm ppm notice i have get tpm that's the one that worked screwing up my demo and here's this get wpm now notice this is a function okay so now when i say get wtpm boom just happen so what really happened well it was a commandlet that went across powershell remoting to a powershell version five commandlet ran there returned the results here so now remember i ran get powershell session look there that's the session that i'm using now let's have some fun get module okay so now i got both these things this is the script one so that's the one that got created okay sign m equals get module question uh geez i'm not sure which one that's going to give me let's see gives me two okay so here's the nice trick so there's the one i want and the one i don't want okay so i want the second one so i'll say dollar sign x and dollar sign m so what that does is because there's two the first one gets assigned to the first variable the second one gets assigned to the second variable i'm just going to ignore the first one and this is the one i want how fun is that okay now here's where it gets crazy so i don't know if you know this but you can actually execute code and modules remember i talked to you about kenneth hansen kenneth hanson did a great job along with bruce payet in designing these modules and designing them in a way that you basically they are the separate isolated environment where as you go they may have a whole bunch of work that needs to get done in order to meet the contract that you want right so the contract is get vtpm but in order to do that it has a whole bunch of helper routines instead of bringing those into your environment and screwing up your environment and potentially stepping on stuff that you already have it keeps it in a separate environment right so a module is a scope nice thing about that is you can then run code there ampersand dollar sign ampersand's the invoke command dollar sign module and then you can run something here right so print working directory can run any code you want okay you can say dur function and notice here here are the functions get tpm their tpm and then all this get implicit stuff anyway so there's a ton of great stuff there those the mechanics that allow me to export this get vtpm again let's see let's see how that works get tpm that's local in process pretty quick get vtpm what did i do i messed that up anyway uh it happens very very quickly okay so that's that i might mention i was going to screw a bunch of stuff up you couldn't see any of that could you i have no idea where i screwed up let's just keep going okay here's some telemetry powershell is doing awesome the numbers have just skyrocketed now going forward powershell version 7. powershell version seven there's a wave of investments here right uh now here what i want to talk to you about is the powershell 7.1 wave of microsoft investments why do i tee it up that way i teed up that way because one uh powershell seven is a community effort right and there are things we're gonna do but there's things the community's gonna do i don't know what the community is gonna do so i'm gonna talk to you about what things we're investing in and here are the things we're investing in one is the ability to innovate outside of the engine two to improve the tooling around powershell three to improve our rfc process and then lastly to really focus in on the shell the interactive experience the next generation shell experience for our shell first innovating outside the engine you know the key thing we want to do here is to say hey we want to go we want to have the maxim maximize innovation and stability maximize innovation and stability how do you do that well one way to do that is the things that can affect stability you want to innovate at a different rate than the things that don't affect stability right so the core engine boy you want to be very careful about that but stuff that's not commandlets etc you can go pretty quickly on okay so how do we do that modules modules modules modules so in fact what you're going to see is a lot of innovation being done in the module being being delivered in the module space and one of the nice things about that is we can also some of these things we can make available to existing environments but then fold them into 7.1 which is to say hey like we're going to talk about secrets secrets work on powershell version 5. it's delivered as module works on powershell version 5 and then it'll ship in 7.1 secrets management we're going to focus in on secrets management um and this is a universal module for storing and retrieving secrets and the idea here is it's a provider model right there's lots of different companies and isvs for that have a business around storing and retrieving secrets uh think azure key vault aws has one third parties will have others and we're going to do is we're going to provide a generic way for you to say hey here's who i'm using as a key provider uh like i'd like to use them um in fact i think i'm going to talk about this a little bit more why don't i talk about it now and if i do i'll just skip over it later um sorry i forgot my slides um so what you do is we we're super hardcore about not keeping secrets in code not keeping secrets in code right because the code gets out your secret gets out no bueno and that's why we have ps credential happy days but it turns out turns out that there are more secrets than just credentials right api keys are secrets as well and what some people who didn't realize that did and then put those you know sample code on somewhere that was publicly available somebody grabs their api keys and then they get uh bills for tens of thousands of dollars as someone grabbed that and then used it for bitcoin mining or some nefarious means so what we want to do is we want to say all of your secrets you you never keep any of them in your code and so you want to store your secret somewhere then get the secret and use them and then the challenge of that is well there are different secret providers and so the idea is like hey you can write your code once and then the individual customer can say hey i want to run this script but i want to use my secret provider okay so that's the the model here and then jupiter notebooks uh jupiter notebooks are amazing we're investing heavily in those right now they're available and the azure data studio jupiter notebooks but then we're also working to make them available everywhere so jupiter has this idea of a kernel and a kernel is uh where you run the code where you run run code and net a an interactive jupiter kernel which basically says a lot of different languages can run so what's this all mean jupiter notebooks are a combination of markup and code maybe it's best if i just show you one okay so this is azure uh data studio okay it is a jupyter notebook now notice it's kernel you have different kernels you have sql spark python powershell and then you can attach it to various places okay local host or remote machines etc and what you have here is you have documentation right so this is markup code talk about the help system demonstrates this etc and then it's here and notice this arrow so now you can run this code so get help get star and you run this code notice the circle here and then it runs in process okay runs in line and you see the results okay so if you want to you can go down run the next one okay that was pretty cool it's a problem with help that's a problem with coverage it's so uh so large so let's do this i'll then make the point in line here so the point is imagine i just said a get help a so you can now edit and run things in line a something that then starts with a and ends with t so the point is uh jupyter notebooks have documentation hey here's this has an example you can run the example and then you can modify and start to explore things and notice here it said now am i limited to get help no you can change this entire line right notice it said check out get verb oh what does that mean let's copy this can i run get verb here yeah you run get verb you run get your run i don't know what this is version and dsps version table you run any code you want okay oh so this is 5.1 the desktop but again the point here is that this is gives you documentation and then code that you can then run okay that's interesting get help on.net core fun stuff anyway so i expect these to be used uh quite extensively and really to transform training right you have the documentation you have the sample and right so often you're in some you need some talk and and then you're like oh that's very cool i want to try that and then you look at the slide and you got to type things down and blah blah blah or you're in one window and you go to another one don't no no here here are your lab materials here's the documentation uh go run this command oh that's cool modify it run it again so you can iterate and experiment pretty great stuff and more and more modules be coming from the powershell team itself i mentioned improved tooling two primary investment areas here powershell version uh powershell get version three uh this really is a an f5 moment a hit refresh whole new implementation uh focused in on performance stability and simplicity we've got a much simpler interface it's much more intuitive the real focus here was to better integrate in with ci cd pipelines and serverless environments so it's very very fast very lightweight very intuitive the other major investment in tooling is around visual studio code extensions uh here we've got performance stability if you've tried this in the past and said ah kind of dodgy didn't quite work for me uh works fine now very very fast the debugging works great um we're making improvements to our rfc process uh the rfc process if you've tried it in the past is basically here's the challenge we have to innovate and we have to innovate in a way that the iqs come together and preserve stability remember i've mentioned innovation and stability so we have so many people saying hey what about x what about y what about z uh we've got the team must stop coding and go evaluate those things and honestly uh you know we're new to this uh we're getting better and this process is the next iteration i don't think we've been as good as we wanted to be at this we haven't evaluated as many as we would like to we haven't been as fast and responsive as we'd like to so this is we're going to revamp that process to be able to maximize throughput while maintaining coherence of the environment this is the draft rfc process don't try and read it lots of details there oh by the way i want to go back here a second so there's a misconception i want to make sure it's really super clear some people felt like oh if i write it up on rfc uh and it gets approved the powershell team's going to go implement it no you know we're going to be really clear about the things we're going to invest in happy days rfcs you know we may choose to implement an rfc that's how we're we're telling you about what we're investing in but if you want to make an investment in powershell and you write an rfc and we say yeah that's good you need to go implement it or get a cohort to go implement it it doesn't mean you get to draw upon the resources of the powershell team that's not to say that we don't want to hear about what you do about what you want but it's not an automatic thing okay sometimes we're gonna hear about what's needed and if it's broad enough um we will go invest in that but if something sounds cool but it's narrow you know requires a lot of work and we think yep it's coherent fits in with powershell but it's not where that's gonna not the investment of our resources that's gonna benefit the most people at the most time we're gonna approve it but then we're not gonna implement it you'd have to implement that um so basically the idea here is to is to leverage experts more uh and leverage powershell modules more so basically the idea is hey does this thing really this idea does it need to be in powershell or can it be in a module if it's in a module like go with god next is hey a lot of times we found ourselves spinning in conversations where some simple uh code could have uh highlighted the issues more quickly we're going to try and uh encourage people to do more of that uh more experimentation and then to set up these experts where the experts uh uh can take the bulk of the conversation to a certain degree we don't need the full committee involved and then the experts can kind of shepherd it you know to a different path yeah that's good do it by yourself or yeah let's bring it into the main committee now in terms of this next generation shell the experience here a lot of things basically going back to trying to be a better interactive shell a lot of work on tab completion looking to leverage some artificial intelligence understanding of past behaviors behaviors of other people to be better at predicting things uh suggesting things a much richer help experience we're also improving the way uh uh you know basically we're making it better for scripting better interactive shell and better programmatic shell okay and the programmatic shell we're looking a lot at error handling uh there's some things that bash does that are we find are are better in particular the way they handle errors that occur in native commandlets so we're exploring that and then we're working through the backlog of contributions the community's told us about a bunch of things and we're working through those i want to take a moment and pause and thank all the amazing community contributors if you were one of those thank you very much really powershell has has grown in in um in scope and in relevance and in quality due to the community you know actually i forgot to mention one of my favorite my by far my favorite powershell version 7 feature and that is the hundreds and hundreds of small little editions that were made things that aren't top level features but it just really if you use powershell 7 what you'll find is it just has this fit and finish things just work better the the commandlets have all the the options that you wish that they did and largely that is because of the community right the community goes and says hey you know why doesn't it do this and what they look and they say is hey i can control that i can do that the powershell's not team's not going to get to it i'll go code that and we've welcomed those people with open arms and they've done a lot of great work and you benefit from it so hats off to you we also as i mentioned i mentioned powershell what we're investing in powershell is no longer microsoft's right powershell is the communities um powershell is not the gatekeeper to everything that goes sorry microsoft is not the gatekeeper for everything that goes in powershell some of the gatekeepers are in the community right so ilya has been doing great he's one of the maintainers uh ilya can go and decide hey we ought to add these things and uh and put them in there he's been gotten great help with from stefan and joel on triaging things and the editor services and visual studio keith and patrick have been doing fantastic stuff so if you like visual studio code say thank you to these folks and then christopher has been just doing awesome on powershell script analyzer so in summary in summary powershell 7 continues to make you more productive at scale and hybrid efforts right again powershell 7's all about you it has been a 20 year journey to make powershell uh seven and really we're just at the beginning there's miles to go before we sleep and really you wanna we're investing in you you should invest in you attending these sessions is a great first start but continue to do it you know i find that it's far better to spend you know half an hour every day than to take a week and try and do do something it's better to learn it's better to have a continuous habit etc but certainly taking time to invest in user groups invest in the community are a great start so thank you very much for your time sorry about that mess up earlier uh have a great conference our next sessions i did see here in chat is a microsoft powershell certification being considered you know we've talked about that since the early early days and uh you know the early days it was no you don't want to do that because you know if it was a business and being a business meant that if you had a certification and they didn't earn a ton of money then they were going to drop it like a hot potato and then then they'd never pick it up again and then there would be this perception that microsoft was dropping it and blah blah blah so you didn't want to do it until you did it until you knew you were going to make a ton of money on this certification as crazy as that seems and then later we looked at and said well you know getting certified in powershell is like sort of getting certified in the mouse and the keyboard like yeah i mean it's just a basic skill why would you be certified in that so certified in like the the domain certified in exchange certified in windows server management that made sense but powershell you know it sort of never made sense good point i saw another good question here that came up um i think you know this is a pretty common question it comes up a lot but as an absolute beginner maybe we given that we're at the top of the charts on twitch and science and technology right now we may have some people coming to the channel that have never used powershell maybe they're just getting started um and they just want to know how do i start um so i think jeffrey your perspective on that would be really interesting to hear actually yeah so always it's best to just start you know just explore right i will tell you that microsoft has spent the last what 30 or 40 years convincing you like concerted effort to convince you that it's a waste of time to ever look at the help but i will tell you that the powershell help is actually pretty good and you know we always recommend don jones's book you know powershell it is a month of lunches most people find that you know coming to powershell as a great first book but i will tell you that the the uh the documentation and the help is is actually pretty great start as well so those are two great things and then just explore just have a sense of curiosity have a sense of like hey what's going on here and what you'll find is there's a certain set of things you have to learn right get help get command get member and kind of drop your preconceived notion if you come to this like hey it's bash or hey it's like command.exe and then it's not you can get frustrated so just kind of put that stuff aside say hey it's a new thing and i have to learn the new thing and then what you'll find is there's like i don't know you know a couple you know maybe a dozen things you really want to learn and then all of a sudden you're able to predict and predict and predict and then be right right right so again if you don't bring your preconceived notion to it you just learn the core concepts you'll find that boom you have this huge advance if however you say oh it's not bash it's not shell you'll just struggle struggle struggle struggle and you say oh i don't know if i like this thing awesome great stuff i have uh it looks like it's been uh plused about uh 50 times or so uh this is going to be an interesting question i think uh a lot of people are interested about the future of dse if you have any statements or thoughts on uh what may be happening with dsc in the future yeah so you know i just talked with michael green this week about that very topic and uh you know we continue to uh invest in that area some of those investments you know we had been wanting to open source the dsc agent for quite some time and uh you know obviously some of the our our intentions there got subverted by you know events uh in particular uh you know azure has had these huge uh um contracts that we got and that kind of stalled everything as we went to support those contracts but we continue to invest in dsc largely in the context of like making it great for azure policy by the way just to be clear dse is used inside microsoft everywhere like everywhere it's everywhere in azure um and so it's you know definitely a technology that's widely used uh will be continued to invest in and obviously we just have not been you know we've done a poor job of uh setting and meeting expectations so we sort of uh kind of feel bad about that and we're more on the page of like uh shut up until we until we're sure something is gonna happen we don't wanna keep saying things and then not have them be the case that's particularly around open sourcing of of dsc okay great and i'm also hearing in chat too um i appreciate the community bringing some of the some extra answers of their own here um there was a um i'd almost got like a sister conference here just another one of these online powershell conferences that have happened recently uh the powershell europe conference recently had a very specific session on the future of dsc so i think that's probably a 45 minute one-hour deep dive on that if uh for all the people plus wanting questions about dsc i would suggest you go check that out oh as well that would probably be a really good resource for you great suggestion someone's asking can anyone give a real world account provisioning scenario where powershell where using a powershell class would be beneficial i guess we're using powershell classes well we did uh powershell classes for um for dsc right so the idea here was you know you write a dsc provider right so here's the thought of dsc right you write a script well you know you write a script it can be do anything and so what you know we observed was if you think through make by the way there's all sorts of stuff around oh you know chef puppet blah blah look it's all just variations on make right unix make what unix makes says hey the world ought to look this way here's a test make sure it looks this way and if it doesn't look this way here's the thing to the rule to make it look that way and then here are the dependencies so check them as well right and so that pattern is basically desired state configuration it's also chef it's also pop etc and then what we did was we said hey let's write if you write scripts that way get uh the world set the world test the world right and you're clear about the schema then all of a sudden we can build you know we're clear about the error handling and the returns and that contract with that pattern we can change the world great the challenge was that if you then went and said hey the thing that i'm get setting and testing i want to add a property or change a property the fact that each one of those uh script methods you had to go in and change and you had to get it exactly right etc was just a pain in the ass right and so he did was he said hey you know what classes uh let's go do a class and then it's very simple the class has properties and those are the properties and then it has methods set get test and then if you want to add a property you just do it once and everything inherits it so that's where we use classes a lot now i will say it has been my desire that we go farther farther farther with classes by the way classes also clean up the kind of traditional some of the the messiness of the shell right we tried to bridge two worlds interactive and programmatic and there i think we largely did a good job but there are some things i think we did an exceptionally bad job on right so so the uh in particular the fact that um you know uh you can your script can emit output and then if you say return you get both the return object and the output i mean that was always kind of janky and horrible and and in a class that cleans that up the only thing that gets returned is the thing you return anything that gets emitted to the output stream gets thrown away that's very nice it's also much faster it can be much faster because we don't do dynamic uh variable lookup dynamic variable lookup is when you use a variable we'll first look in this scope and if we don't see its value we look in the parent and the parent and the parent and then those look ups can be pretty expensive and in classes we don't do that we use the traditional kind of programming language scoping rules and that allows us to be a lot faster awesome uh by the way i'm i'm kind of again blown away by the amount of resources that people are posting here just in the chat on twitch about how to learn more about classes so um thank you everyone for doing that i have another question here that i'd like to get your take on too um it's a pretty good one so they're asking about i've actually lost the question but i think i have the gist of it it's how do we think powershell itself will kind of help to drive the future of windows server so obviously we see all the advances that i see in windows server we also see all these advances in powershell supporting all that new functionality and in many cases even enabling that could you maybe talk a little bit about what you see happening around that yeah so you know i'll say it's a mixed story so at some level um you know we at that in the past we had the cec and the cec was this point of convergence where we said hey everybody must and then we were getting full powershell coverage because it was a must so certainly we had a backlog of stuff that wasn't getting done but anything new it did that and then when sacha came to town he basically said hey everybody stop talking to one another stop bickering with one another get out and go talk to customers and figure out what customers need and and give it to them and um and you know and that really transformed the company i think it has made us a much better company a much more responsive company and just goodness in almost all ways almost always that first part stop talking to one another what that meant was hey these arbitrary taxes like the cec put those things aside if your customers aren't asking you for something why are you doing it oh okay so now all of a sudden what that means is now some people get it some people like hey whether my customers get it or not i know that they need command line interfaces i'm gonna go do one again some people said well okay i'm gonna do powershell other people like well produce my own and then others they go and they talk to customers and those customers don't say hey and i need xyz and don't forget i need powershell and so they're kind of not doing it right so this is where powershell is a glue language book let me just be clear it would be a much better world if we still had the cecs demanding everybody go do this right but there is a point to be made that said well hey if the customers aren't telling a feature team that they should do it why is the feature team doing it okay so next time a feature team asks you what should you do about their area don't forget to mention powershell um but this is where powershell is a glue language comes to bear right remember i said the world always has been is and always will be messy so there's this innovation and unfortunately a bunch of that innovation isn't the way we'd like it to be well the fact that powershell can call a command and parse the output the fact that we can call a rest api and get the json and parse it happy days would have been better if that rest api also included a powershell commandlet absolutely yes but the fact that they didn't well hey we're about trying to take that messy world and help you manage it uh turn it into high level task oriented abstractions so sometimes it's a native win sometimes it's a win with a little bit of work so messy it is if you stopped innovating we could we could do it or we stopped listening to customers it's really ironic you know if you have this like love it hated thing about that um what sach has done but i think that and all in all i think everyone would have to agree it's a much better company because of it and then we got this downside every plus comes with a minus awesome so yeah i have another interesting question going on on chat um i think the powershell team has talked about this topic before but i um the question is when will powershell 7 get baked into windows if ever yeah so let me say there's two thoughts here one is that we believe that the world is going to and is a better place when you say um uh i will dynamically compose the world from diff different places right my joke was that we were doing nano server i said that the ultimate operating system is an operating system that has exactly one function install optional module and if you want to remove a module you first have to load that module you have to load the remove module module right and that everything should be dynamically composed and why is that because when we bake it into windows it's baked into windows right which is to say you know that version as of that point of time and now because it's in windows it went to a billion people so when it's at a billion people there's a group of people that say wait a second you're going to change something this is going to a billion people like i'm in charge and i'm going to decide what you get to change and what you don't get to change and the default answer is f and no right what and so we're like no no it's really safe yeah yeah but fu no i and they're just doing their job right they're trying to protect the world against the bell curve of of developers who think they know what they're doing but maybe you haven't thought things through and then they make a change and that screws up a billion people so they're just doing their job but we sort of know what we're doing we sort of know what's safe and the degree to which we say hey instead of it being baked in if you just say download this and install it that means we can move fast we can listen to you get your bug fixes in get your feature requests in improve it better and better and better so we think that's the better world right now that said we know that there's a bunch of scenarios for why you bake it in so we continue to look at it there's no clear answer here and the reason why there's no clear answer is because the.net team gets a say in this as well we are based upon.net so we cannot provide a support contract that isn't backed by net and the.net people everything that i just said they look at that and they say times 10 like yes that's the right thing to do and so they're very reticent to take something that's working very well for them having gone cross-platform moving very quickly gone open source getting customer feedback moving fast as the wind and then say and then we're gonna have a version that's you know ossified in the operating system etc so if they don't do it we can't do it so that's what that's the state of that conversation and we continue to have the conversation so it's not a fixed deal but currently we don't have a booked plan for getting it baked into the os and i i'll jump in here with the last question for you and i'll throw you a softball here so uh what is your favorite ise or develop development environment oh clearly a visual studio code i mean that thing's rocking i gotta say in my career and i've been known as a long time few times have i ever seen anything that is the rocket that is visual studio code i mean these guys have just you know they got the development model right their code quality is great they're moving fast that is just a rock star product i mean just hats off hats off hats off i mean that's a sort of code project it's like you know what you should take some of my bonus this year and give it to those guys i mean they're just doing such an awesome job really i just think they're wonderful and again if you you know i know that our powershell support for visual studio code had a bit of a rocky start honestly we underfunded it and it was it was a problematic right we underfunded it but we gave it to a guy who was doing a rock star job so he's doing great so we thought we were great but in reality we should have been giving him more support better support for testing better support for performance etc um and then we got tyler in there and and again great work from the community having open source we now got the right set of resources who've really transformed that so again what i'm saying is if you've ever tried visual studio code with powershell and then you didn't like it it wasn't fast enough it was buggy et cetera please try it again i think you're going to love it and if you look and you say oh but it's not ise you can now there's this i forget the command because i can't remember anything but there's a way you say like powershell ise mode and it looks like ise it's crazy cool pull yourself with it it's awesome awesome well thank you again for that wonderful keynote jeffrey i really i don't think i've ever seen such a down-to-earth keynote in my entire career so oh thank you you're screwed up so much well you know what i i think it's perfect because during a time like this with all the stuff going on in the world i feel like we all need to show a little more humanity so thanks for being human and thanks for taking the time out of your day i know you have a busy day ahead of you and i really really appreciate you joining us today oh thank you for inviting me thank you so much and you all have a great conference and i really invest in yourself you're attending this session these conferences that's fantastic you're doing exactly the right thing awesome yeah absolutely [Music] you
Info
Channel: Chicago PowerShell Users Group
Views: 1,507
Rating: 5 out of 5
Keywords:
Id: l_cQrLtt8yw
Channel Id: undefined
Length: 81min 47sec (4907 seconds)
Published: Mon Aug 03 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.