PowerShell 2018: State of the Art by Jeffrey Snover

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Wow ladies and gentlemen Jefferson over yeah I'm glad you applauded before my talk I'm not sure it'll go after at the end well how do you have Geoffrey Stover we're gonna talk about power shall and and this year oh you know what I should have made the wrong dang thing oh hell done well give me one minute it's almost right you know have you ever heard the story that power shells so awesome because I'm such a flawed person that's not actually a joke that's a true thing and I was looking for a clicker here no I think it's on my floor at home okay well there you go not gonna go very far hey yeah so it's it's true power shell such a great product because I'm such a flawed person in fact first thing that's more sitting right down here getting ready clean things up and I deleted most of my demos so no I I did so there might be a few rough spots let's see okay so it's 2018 and power shells never been more important that's really the end of my talk you know I mean they got some details but this is it right yeah you know is power shell done no it's not done is it important Oh My heavens it's never been more important so why is it that power shell is so important and you know we used to say oh well you know this is inflection point that cloud and the cloud changes everything but that's not really yet right what's really yet there is an inflection point but the cloud is a technology the inflection point is digital transformation digital transformation is in the grand arc of computing this huge inflection point that's going to affect everyone in this room everyone in our industry and why this is so important is that automation is the thing that enables digital transformation and that's why PowerShell is so critical more critical now than it's ever been in the past digital transformation does not work without automation okay so you might have heard of this thing called Moore's Law right doubling of transistors every year it sort of been that kind of foundation of our industry for the last what 30 40 years right I heard all about that well I'm here to tell you that this is less important in the future and that what's more important than the next 20 years of computing is what I call the other Moore's Law and this other Moore's Law is Jeffrey Moore okay now this has a link here seven-minute video that explains this in great detail I encourage you to watch that but Jeffrey Moore basically drew this distinction every company participates in two activities something he called core and something called context core are those things that advance your mission that differentiate you from your competitors and allow you to charge money okay context is everything else so let me give you an example Microsoft our core is software so we go out of our way to find the world's best software people hire them treat them well develop software but nor do for that to work we have to have things like receptionists shuttles cafeterias right these are not core to our business if Microsoft was awesome at our cafeterias knowing buy more of our software okay so these are the everything else they're important but we just want to write a check for them right we so to be concrete we have no technical fellow of the cafeterias right no distinguished engineers of the shuttle's now we pay a lot of money we want great service but Saatchi never like gets his leadership team together and like okay let's go over the menus for next week's lunch right that's just not something where you put your energy on right you put your energy and your best people on the things that differentiate you but you have to do this other stuff now then he drove this other access and that's mission critical here's the definition of mission critical screw up your EFT okay trying to clean up my act okay so screw up in your aft and and then everything else right so the interesting part about this is that of course this is where you make all your money but this is where your risk is so you might say well hey how can something be mission-critical and still be context and the answer is that when you have something that is core and mission critical that's where you're making all your money over time the market will respond it will respond with an alternative with a substitute or with something that becomes a you know different and so you're no longer able to charge a premium for this okay but it's still mission critical which is to say if you screw it up you're aft so this is what happened this is where you get risk right this is where Geoffrey Moore says is he called it the killing field of once-great of companies okay and so what you want to do is you want to focus all of your energy on the things that differentiate you the things that you and only you can do and then D risk everything else so how do you do that and the answer is you've got to reduce the risk here by the way one of the reason why it's the killing field is often because it's mission critical and often because to become successful you had to incur a lot of technical debt you know often these things are a mess and so you got to go invest try and people will increase their investment at a time when they can no longer charge a premium and that's where they end up dying so what you have to do is you have to reduce the risk of these things by reducing the complexity and the way you reduced complexity is you standardized put it all underneath one person standardized things you automate automate automate and then you take the components and you either offshore them your outsource them or automate them okay so that's the heart of this and what this does then allows you to take resources out of what is mission-critical and focus in on mission-critical core the thing differentiate you so the heart of this digital transformation and by the way this is digital transformation 101 we're going really quick through it but at the end it's not that complicated okay at the end it's not that complicated what you want to do is you want to build the things that advance your mission that differentiate you that you're able to charge a premium for and you want to buy everything else right just wait a check okay it's that simple really now sounds great how do you do that right just go to your boss and say hey give me some more people went to this talk Jeffrey's no overall negai digital transformation I'm totally in this is what we must do I just need a 40 50 100 200 more heads right anybody gonna be successful with that conversation no exactly smart crowd no you know right that's not gonna work so but in order to pursue digital transformation right because guess what the folks who get this right are gonna win and the folks that don't are gonna lose how do you do that and the answer is the only people that are going to be successful with digital transformation are the people that do these two things number one is you got to create bandwidth you got a crepe bandwidth out of the stuff you're doing right now and then with that bandwidth you invest that in innovation and then you do it again and again and again okay so how do you create bandwidth right the answer is it's pretty simple first is software as a service right if there's a software of a service out there for something that you're doing by yourself you should just bite the bullet and take advantage of that software as a service let me give you an example there is no airline that can put more people in planes because they can run exchange better than their competition right nobody is gonna be able to sell more sneakers or shoes than their competition because they can ryan team service you know team's visual studio team services right these are important things right email mission crit call but it doesn't differentiate you so in reality you should just write a check we run those things really well there's lots of Sasa's out there when if you have a choice you should just use a sass now number two is lift and shift right lift and shift is the term where where you take existing virtual machines and/or physical machines and run them in the cloud and you'll see that just running them in the cloud actually generates bandwidth and the reason who generates bandwidth is because running the cloud the cloud vendors provide so much functionality for you okay I'll give you some examples of that but then it's automate automate automate alright how much of this stuff do you do today is just click Next click Next click Next good lord instead you automate that stuff when you automate it you free up resources what do you do with those resources you invest in automation ok so this is where you want to invest right this is where you take those people and you're going to invest in you know new architectures alright these new architectures should take advantage of cloud services like pass that allows you to focus most of your energy right here's the heart of it you want to be really good at like listening to customers figuring out what they're really saying and then delivering that as a set of features very quickly and then doing it again ok so listen react deliver listen fast fast fast past services allow you to to do that right to spend more of your energy doing that than oh hey there's a new patch of the operating system bla bla bla bla bla don't do any of that we do that for you the next is to embrace DevOps now anybody been to a DevOps conference before yeah yeah ok great DevOps fantastic stuff if you go to a DevOps conference what you will find is they spend an inordinate amount of time talking about what DevOps is and isn't and no one ever agrees ever so here's here's the primer I can save you all like lots of time money devops is really only two things one it's to go faster by doing smaller batches more frequent smaller batches and number two is stop being an to your fellow team members that's it no seriously it is it really is where the other team members you know the developers are jerks to the operators the operators and jerks to the know you're all part of one team focused in on advancing the the the customer value proposition it reminds me of this funny story ever ever heard of this guy Curtis LeMay you know the curse LeMay was this Air Force general his Air Force guy and a cold warrior right and at some point one of his lieutenants is they're talking about you know the you know talk about the Russian so the enemy this and the enemy that and Curtis LeMay said young man just stop that right now he says I want you to stop referring to the Russians as the enemy they are adversary the enemy is the Navy okay so okay anyway so you want to embrace Ted laughs okay and then what do you do in innovation is you automate you automate you automate now why is it important here as well and the answer is in the first case you automate to create bandwidth but here you're automating to be to increase quality and speed okay so you want to get to a world where when you make a change you quickly build that you automatically build that change automatically test that change and if the tests succeed you publish it right Michael Green's here hopefully he's gonna give a talk on that where's Michael somewhere perfect so Michael Greene's gonna talk about that you but you wanted to automate automate automate to increase the quality of your operations so the heart of this is that those people that get digital transformation right are gonna have a just a huge business advantage a huge business business advantage they are gonna flourish and the people that don't not so much so excellence at digital transformation means winning excellent at automation means winning I truly believe that the people who are great at automating are gonna deliver their company such huge advantages that their careers are going to prosper their company's gonna prosper it all starts from the customer right you can't have a failing business and you succeeding with your career doesn't work that way right so the customer has to be successful your company has to be doing great with the customers from there the customer customer prospers and if you've been part of that chain you will prosper as well so giving excellent that automation is is all about winning great digital transformation so it's just Windows PowerShell right yeah the answer's no no Windows PowerShell is all about Windows right or as one Microsoft executive told me Geoffrey exactly what part of Windows is confusing you just trying to introduce the CLI is like Windows Geoffrey Windows anyway there's a painful period okay the the reality is is the world is heterogeneous right the world is a lot of Windows but there's also a lot of open source Linux and that services services are just as important as machines and in case in a lot of cases they're more important than the machines and guess what when you're managing services it really doesn't matter what how that service is implemented Windows or Linux you still have to manage the service but you're not like logging into the machine that runs the service you're here and you're managing that remote service okay so that is is perhaps more important than managing individual machines and in reality the cloud really does need much better programming in the large support than PowerShell has right now it's gotten better but there's much more to do here and that services require the control and bug fix timing open source provides so I don't know how many people how many people are using wmf 5.1 okay okay if you know did did you notice that wmf 5.1 had some cool new debugging features like you could debug desired state configuration resources for the first time you know feasibly for the first time ever like yay and did you notice that you can do step into you know you can step into a function well with 5.1 you can step into a function on a remote machine and deep have a remote debugging session there okay now why did those those were in how part of the plan i've no sir not part of the plan but we've been focused i've been focused in on Azure stack and at some point we were just dying we're dying because we didn't have these debugging capabilities and i went to the team and i said you you got it you got to stop you got to deliver these things and they're like well jeffrey we got the schedule we got this priorities and you know it just doesn't fit it's like i'm sorry if that sounded like a request you got a stop I mean we're dying here I need this solved like right freaking now and it's not a negotiation it is not an option right we've got to solve this problem and the point is that that when you're a service you know you need solutions and if they if you will bring up your compiler and you bring up your editor you'll solve your own problems if I could have done that we would have just done that but at the time we couldn't cuz we're using Windows PowerShell so open source means that you are empowered to solve your own stuff now you don't want to create your own fork your own branch well actually you do for very short periods of time and then you want to do a PR and have them fix it and then get back on the main line but when you're delivering something in production you need the timing and the bug fix you know the the control and bug fix timing that open source provides so the conclusion when we thought about this was we actually needed a new tool right that Windows PowerShell was not going to do it for us okay however there was a thing we called the sacred bow okay the sacred vow was we as individual members of the PowerShell team stood out and said we make a commitment to you we know you're very busy your hair's on fire and the last thing in the world you want to do is to stop and learn a new language learn a new tool PowerShell but we asked you to make that change we asked you to stop doing what you're doing and learn PowerShell and in exchange we would do everything in our power to make sure it was the best investment you ever made okay so we're gonna make it as powerful as we can when a new problem came up we're gonna reuse PowerShell I mean how many times is a customer of Microsoft Microsoft would get on some technology and I go tell my bosses hey we got to do this this is super important and for a you know year and a half two years I'd seem like a smart guy and then Microsoft would want to solve a new problem and they abandon that technology and pick up a new one and I look like a jerk to my boss right and we said we're not going to do that when we have a new problem we're gonna how to take the tool that we have and extend it to meet that new problem that is our sacred vow to you so yes it's just PowerShell and here the key is we're dropping the windows portion of that okay Oh Dave what okay so this really was kind of a hit refresh that's our new bosses a great phrase hit refresh moment where when you hit refresh you keep the things that are great and bring you and give deliver you a path to the next 15-20 years and then the stuff that don't you leave behind okay so that's what we do we have a new mission then the new mission for PowerShell is to enable and empower this digital transformation right so we want to be able to manage from any client be able to manage any server or service running on any cloud AWS Google Azure or on-premises running any hypervisor VMware hyper-v whatever any storage stack any networking this is the tool that you can now finally bring your teams together converge on a common tool set and manage everything in your estate right I've been in this business a long time and I can't tell you how many times people have asked for this tool and this is really for the first time the time when we've been able to actually deliver that so great sounds great but a lot of people it's like yeah but right now I'm using Windows PowerShell what's that mean for it and the answer is Windows PowerShell is complete hey we're complete it's gonna be fully supported probably forever right command XE still supported it was deprecated I think in 2008 a long long time ago command X he was deprecated still fully supported if it's used it's supported that's sort of the model but we'll have no new feature development on Windows PowerShell we'll do security fixes and blocking customer blocking bug fixes only and that all of our investment was gonna go into this new PowerShell and because this new PowerShell had a number of you know needed to achieve this new mission there were quite a few small breaking changes and so we decided that if we just kept the name PowerShell that XE that there would be enough little hiccups that that would be jarring to people so we gave it a new executable name PW SH so here's a question every ass so what's that mean am i screwed made me feel screwed yet not yet okay so the answer's no you're not screwed right as I said command not XE we've had no changes in command XE in over 20 years right and it's still used right I mean we deprecated it a long time ago and we don't use it because we don't deprecated we don't remove it because so many people use it powershell version 1 was at least 20 times more powerful than command XE it really was and since then we've had five releases 5.1 releases you know just think about the difference in language between what you're able to do in powershell versus command XE right and the coverage both first party and third party the consistency the fact that we have universal remoting the ability to manage heterogeneous jobs and background activities we have an inventing model we have incredible security like the best security out there we've got desired state configuration the ability to share information with the galleries we have authoring and debugging tools we have classes we have a script analyzer and fantastic extensibility okay so in reality I mean I called this last year and boy I think I was absolutely right last year I stood up here and I said hey in reality the bulk of the innovation in PowerShell and the PowerShell ecosystem has shifted from the powershell team to the community and it's absolutely true just go up to the gallery you'll see that when you talk in the hallways you find people and talk to somebody last night wrote PS graph right it's doesn't design domain-specific language that you can type and get graphical displays using PowerShell fantastic stuff so the community is really where this innovation is happening and we've given we've given the community the right extension points that they can continue with this 5.1 for a very long period of time but well hear people say hey that's great like I'm in it sounds good fun sounds like I'm covered on this Windows Server Windows PowerShell front but this PowerShell version six front man you know that's it's not there right cuz it's a bunch of stuff that's not in PowerShell version six and the answer is that's right you know it's really it's kind of PWS hv1 we chose PowerShell version six so part of this is stuff that will never come in right that's our hit refresh moment so things like workflow you know we went and talked to people and we said hey are you using workflow and the strong answer for the community was no so that's not something we we went forward with if we're wrong on that we're community driven you'll tell us and we'll change that but we've been asking quite a bit now and nobody's been saying yeah that was a critical thing same thing with snap-ins right good lord we've tried to make it written happens for instance version one actually before version one we always hated that thing and WMI right we're trying to shift everybody to sim so this stuff that we don't think is ever coming back but then we're built upon dotnet core right and dotnet core is smaller than dotnet desktop well when we first released core PowerShell we did it on dotnet core version 1 and they heard it was actually quite a big lift for us that commute that team heard that they had overly been overly aggressive in refactoring the frameworks so in dotnet core version 2 they doubled the number of api's and now with the windows compatibility pack they have doubled that again so you know we are kind of following the lead of the dotnet community they are doing all their new stuff on core they're investing heavily and at the Gantt at the beginning when you make these kind of big shifts sometimes there's a take back but when you're on the right technology and the right guy textual thing you pretty quickly make that up and then are able to accelerate even faster and that's what we anticipate will happen with the dotnet community of course you have PowerShell remoting and PowerShell remoting works between these two environments from PowerShell version 6 you can call PowerShell version 5 from PowerShell version 5 you can call powershell version 6 in fact that's true all the way back down to two point you know powershell version two and will be true up to powershell version you know a billion right that's a contract that we make so you have interoperability which is to say if you're running a powershell version six environment and there's something that is not there you can remote to a machine and call it in powershell version five I'll show you a little bit of a demo there and if there's stuff that we're missing please tell us about that we prioritize we are here to serve you so and also if you you know you go and say hey this this product doesn't have PowerShell version six support don't tell the PowerShell team about that go to that individual team and said hey bucko maybe you're not up on current events but the future here is is PowerShell not windows powershell we need you to get powershell version six support for your platform under sanchez model right such a basically said hey get out of your office go talk to customers give them what they want stop talking to guys like me and russinovich you're saying hey the right thing to do is this yeah still happens but in reality your voices are far stronger than our voices so tell teams what you want all right let's talk about powershell coverage okay okay so we have this model for how you get Commandments right so it's basically you get modules commandlets urns are available in module that's how you ship and share them you can import them and then run the command let's write so we'll get here all the modules notice I got Sim commandlets here so let's import those I'll import those modules that module and now those commandlets are available to me so I can say get sim class win32 bios happy days and we added auto auto module Auto logging but in fact that just simplifies this basic mechanics commandlets are in modules you list the modules you import a module and then you run the command line so now I'm gonna try and run and get app Locker policy and it fails it fails because that command late-- is not yet available on powershell version 6 so here I'm showing you a proof of concept prototype we haven't figured out exactly how we'll ship this yet but that's of this new module called our module ok so i'll import our module I'll get the commands from it and I've got copy our module get our module import our module get our module that's sort of like get module right so our maybe you remote so get our module list available computer name huh I'll just local machine and so now what it's doing is it's behind the scenes creating a connection talking to that and I'm getting the remote modules that are available you know remote modules yeah so now we've now uniform made uniform this idea between local and remote modules so now I'll say okay well is that true let me import one of those things I'll import our module AppLocker right I tried that that didn't work and I'll do a localhost and so what's this actually doing and the answer is it's using implicit remoting right if you're not familiar with implicit remoting it's this wonderful feature that allows us to connect via remote connection go to that remote machine harvest a set of command let's bring them over here and create local proxies for those commandlets here and then when you invoke those local proxies you have you have command completion you have error checking parameter checking intellisense etc and when you execute it it then runs sends that to the remote run space executes there and gets the results back here okay so remember imported AppLocker and now I've got all my AppLocker commands in this environment and so when I run get that blocker policy a lot it works ok so cool so let me go over that again so I'm in PowerShell version sex and boy some stuff works that's great but some stuffs not there because they haven't ported it from Windows PowerShell to PowerShell so now what I do is I use implicit remoting to make it show up in the PowerShell version 6 environment and when it runs it runs uses remoting to do that oh yeah that's great so now getting that adapter oh that that doesn't work ok well it turns out that there's a whole set of things if you recall we really kind of broke the back of coverage with sim commandlets right once we allowed the windows team to write commandlets in native code using sim then we got fantastic coverage well guess what the sim command let's work just fine PowerShell version 6 we got to get those teams to do their full test coverage and it acknowledged that but they do so here I'm gonna find out right PowerShell version 6 I got 367 commandlets and that's not so good but now what I'm going to do is I'm going to copy our module and I'm gonna say copy the compatible modules to this directory v6 compat ok so what it's doing is it's running canmake's a remote connection it remotes connection it then looks for these sim modules knows that they're compatible and makes a copy of them and also has a whitelist of an additional modules that are that are compatible and copies them and I went from 367 to 1853 okay so now right getting that adapter didn't work but now when I run it just works happy days okay so that's pretty good now I'll do get module lists available shows you all they the modules that I have right these were all the things that came over as part of that sim module compatible sim module now what I did was I went and just yesterday I got a new set of command 'lets from Azure that's a pot support dotnet core I had the things I deleted I her brought it back this brought back my buddies from VMware I got their commandlets I got the Google commandlets and I got the things in the gallery that things in the gallery that's explicitly say that they support dotnet core and now when I say get command that count it's gonna take a while because there's a large number 9400 commandlets okay so 9400 commandlets that are now work in powershell version sex so pretty good days so the point there was yep with PowerShell version 6 the initial set of command let's is smaller than you get with Windows PowerShell but through you know third-party support and through well remote coverage I didn't count many of those that number is gonna grow rapidly so a lot of people ask okay great I got Windows PowerShell do I have to convert the PowerShell version 6 you know when do I convert and the answer is you know for you you know if your user do so when it makes sense for you right these things work side by side so you can have them on all your machines to get there certainly if you're gonna be doing things from Linux or Mac OS you're gonna want to do that from PowerShell version 6 cuz that's your only choice but some people might never never switch you might just say hey Windows PowerShell is it for me that's fine now if you are a command let provider however that's a different story if you're commandant provider what we want you to do is we want you to compile your commandlets against the dotnet standard and the powershell standard library and what that does is that then allows your commandlets to work in both Windows PowerShell and PowerShell version 6 ok one set of command let's work in both environments and work in in Linux and for people writing scripts and modules things that you write and share with others put up in the gallery we encourage you to support both but whatever you do we want you to declare which versions you support right and that's what the tag PS edition underscore core right now great happy days now people want to know great what's in PowerShell version V next the answer is I don't know seriously I I don't know and the reason why is that with PowerShell v6 over 50% of our PRS our pull requests came from the community ok so when you ask me what's in PowerShell version 6 I only know what things we're gonna invest in I have no idea what the communities can invest in so here's where we are we're doing all of our planning out in the open we're being very explicit about that you can follow this link to find all the projects we'll hear let's listen let's show you this is that a good idea yeah so here all the telemetry is all available so here's where it showed you the pull request created Microsoft had fifty point two nine and the community had 49 point seven one percent of the pull requests here what things we're investing in we have this full list here all the projects that we're working on okay now to do a stack pop globally these are the three things that we're in Microsoft is investing in PowerShell okay number one cloud and service management should be no surprise there number two programming in the large and number three community feedback okay these are the three large buckets and roughly these are the priorities okay so with community feedback guess what community has lots of feedback we're gonna be able to find a portion of that you can fund as much of that as you'd like right you can you say hey those idiots they didn't do this feature just code it baby coded to a PR have a pull request a unit test will accept those and your code will be in PowerShell pi way that's pretty amazing thing right well let's let's let's stop here a second and put this in perspective if you contribute code to the PowerShell project and it gets accepted now all of a sudden it can be your codes gonna be used and installed on not millions not tens of millions but hundreds of millions of machines how cool is that okay now a lot of people will sit there and they say well yeah that's cool but I'm not a c-sharp programmer you know in this delegate that's too complex you do not have to be a hardcore developer to contribute to the project and to show that I'm gonna bring up Joey who's going to demonstrate this to you I'm telling you everybody can participate in this ecosystem and you can do and make prod and then have your impact show the world what we do found a couple error messages that we could buy wait everyone perfect how many people are perfectly happy with the powershell error messages one this guy Wow that's pretty awesome not so much the rest so you don't have to be a c-sharp programmer to help us fix our error messages nobody can hear me I think it speaks to the fact that there's a lot of progress to be made that I came up with what it is we wanted to improve in the last 15 20 minutes so you know there's a ton of stuff out there you really don't have to look that hard to find places where we can improve PowerShell so Bowie so we do all of our development in github yeah we found an error message yeah here we are at the the project here so we're gonna go into the source did you find the error message show the error message that we want to we want to break here okay so so this is a good one this doesn't look elevated can I use this guy yeah so this is gonna complain oh yeah yeah that although we've got a little surprise on the update help front later today Oh stick around for the Lightning demos hey well he's finding the error message how many people huh raise your hand if you've never used yet oh come on somebody's got to never have used get sent true yeah you're too too populist okay you come on come here my friend you were about to make the lives of everyone in this room better yeah okay that's the problem oh the Aramis did you want to fix this the one complaining about elevation oh good dude this one I just opened out on the run yeah right there or what's something else that needs elevation from PowerShell MIDI start service install module there you go that would have worked actually install module okay before it's gonna remember I mentioned I deleted all my demos so it might be a little rough alright okay fine let's do this one so this is an error message that is a block of red text one of the things that I would like to do is separate the error message from the mitigation of the error message so that when you're scanning down the page you can see Oh a I need to run this thing as administrator and not a whole bunch of gobbledygook about why we failed that is irrelevant to you when you're trying to get your job done so what we're gonna do is search for this error message in the repository and I'm actually going to have you take over here so we're gonna search for the command could not update help topics blah blah just cut and paste from here like cut and paste this guy that's good enough copy okay an alt tab over to edge that one there you go and just go ahead and go to the top and just search for that error message right there tonight see here we got help Aerostar is X right so this is the file where the sink stored all we have to do is jump into this file select it wait it's as easy as that find a crappy error message search for in our repository so at this point all we have to do is click the edit button here in the upper right hand corner oh we're not on a branch here so you're a tree this we changed something earlier so this is not gonna happen to you but if you go to master here it's the main branch that we're gonna fork off of so we edit the file and now find that find that string again here in this file control laughs next result okay if we scroll to the bottom here in the the right scroll sorry maybe do the control F from within this thing there we go I think if we just scroll the file we're gonna see it pretty obvious here yeah so so here we've got uh keep going keep going [Music] do access is denied here we go so access is denied the command could not update help topics for the powershell course so let's go to where the mitigation is further to the right so if you just scroll scroll the way to the right here would say to update these help topics it'd be nice if we put a line break there right make it more readable so you're just gonna go to this spot just backspace and add a line break alright and then we actually because of some milwaukee 'no Swee need to make sure to get rid of this white space here that cannot be indented if we want this to render properly but other than that that's it right so now if we scroll down to the bottom here you'll see the only option that we have selected is create a new branch for this commit and start a pull request so you should you know maybe add right here at the top just a nice message that says added a line break to Jeff didn't help Jeffrey made me do this error message there you go yeah it's all good so I'm gonna do is he commits changes and this is gonna start a pull request and then you can summarize your changes here in the pull request this is a pretty pretty lightweight PR and we got time so we're just gonna go ahead and go through but this this PR checklist gives you everything that you need to do in order to make sure that the PR is good to go and then at that point you would hit create pull request and there we go we're making power show better all right give it up for Brad the latest member of the PowerShell community team here Thank You Joey so indeed you know and there's just tons of opportunities like that formatting help messages everybody can contribute to PowerShell all right now in terms of cloud and service management well we're gonna focus in is basically helping people consume the cloud and the services so this gets back to that core mission from any to any environment be able to manage anything swagger bass commandlets swagger is a way you REST API is a very popular and Swagger's a way of annotating your REST API to tell people how to use it and the azure sdk team has picked up support they were doing all the dotnet Go Java Python somebody else 5:05 and then we were doing the PowerShell swagger commandlets they have decided that they are gonna officially support PowerShell so they're gonna generate all of that stuff and this will work for you know Azure command let's it'll work for any REST API that annotates stuff through swagger we think that's gonna be very important production quality gallery right now our gallery is great but we need to make it more production quality very highly available low latency access to everywhere so basically when I go to my friends at VMware and I say hey you should put all your stuff in the gallery I need to be able to look at them with the you know with a head and heart in the right place and say your customers will always be able to get your code when they need to as quickly as possible and so we've got some improvements to make there we are gonna do those and it has anybody seen cloud shell yeah so cloud shell if you haven't seen cloud shell no this quickly this is the azure portal it's nice and zen-like no there it is and notice here right there's our prompt cloud shell you click it and you get a command line interface right here right and this can be bash or powershell and even within bash you can run PowerShell we get the Linux version of PowerShell in there pretty awesome stuff now the other thing we're gonna do in this area is to drive features so a lot of features that are in Azure are based upon PowerShell update management so if you have a VM in Azure will tell you when it needs to be patched will do the patching for you that's all using PowerShell inventory that's all using desired state configuration we can tell you what systems on both Linux and Windows the inventory of things we can tell you when they change with change tracking of course we've got as your automation configuration management which is desired state configuration in the cloud the azure security baselines those are all using desired state configuration in fact for this we generated the new it's using the new desired state configuration LCM so we have a native code version of that that's extremely lightweight and it's used for this and we have what over 2.5 million over 2.5 million instances of this running so this has been incredibly successful and of course things like Azure functions where you can do service computing and it supports PowerShell as well again so these are the two big themes help people consume the cloud help build the cloud and here's if this is a virtual machine in Azure and you see things like you know basically most of the stuff under operations is all PowerShell and desired state configuration right and update management inventory change tracking now where I'm spending a lot of my time these days is Azure stack and with that comes about a new set of challenge is that really kind of highlight that an area of growth needed for PowerShell and that's the area of programming in the large okay now yeah I mean how many people are familiar with Azure stack okay so some not everybody I'll give you a quick tutorial on Azure stack what it is it's this first product and the new category this hybrid cloud platform we basically are taking a sure Azure and running it on servers in your data center Wow okay now it is it delivers an appliance experience okay an appliance experience that gives you self-service Aya's paths and clout and it's it's not a DIY thing right not a bunch of raw hardware and best of luck here's a rabbit's foot you're gonna need it no no you buy this you picked it's very simple you pick a vendor you pick a size this vendor you know four servers that vendor twelve servers this server 16 whatever and then they roll it in and then they install it for you you know 24 hours later you're using it you get a portal just exactly it is the azure portal but it's pointing to your servers not our public cloud okay so it's an appliance experience now it has to be consistent with Azure right that's the whole value proposition so I can allow nothing that interferes with updating that every single month ok and it's fully the business models dependent upon your success how much does Azure stack cost and the answer is zero zero zero it costs you nothing now when you use it then you pay based upon how much you use it's exactly the as your business model how much does has your cost you I don't use it then it cost you nothing I use it a lot cost you a bunch same model with Azure stack you only pay for what you use okay no this is fantastic because that what that means is I am like hyper focused on making you successful right if I give you a crappy error message and you're like oh what do I do with that you're not using my product right so I have a great incentive to make it useful these are the azure stack internals there's going to be a test on that so no now now here's the thing so first off you know I wash like good heavens there's a lot of stuff going on here this is actually a simplified diagram of what's going on in fact there's a lot more going on and and most of these components are continuously available or highly available now what that means is that there are not just one instance but there are at least two and sometimes three and sometimes more than that instances of these components so if something fails things you service keeps going okay so pretty complicated system now here's how this works right we have scale units those skill units can have four to 16 servers you always get three switches in each of these racks there's a basement motherboard controller switch to talk to all the base more the burgh controllers to do like you know ipmi then there's two topper rack switches remember I mentioned redundancy those have to get configured you can have multiple of these skill units that comes later in these years and that's as your stack and then we integrate that into your environment right so there's the physical integration but then it has to be integrated into your identity systems either Active Directory or aad all your data center monitoring and management systems and the board advices all the networking and the BGP controls okay so the point is pretty complicated system now the point I'm really making here is well weight gets better we manage the entire life cycle of this Azure stack I mean the entire life cycle again my number one mission is to reduce the friction and time from when an innovation happens in Azure to the time it's running in your data centers okay so what that means is I control everything and make sure nothing gets in that way okay so we do the deployment we do the provisioning we do all the configuration we validate these systems we do the monitoring we do the Diagnostics if something things will fail we have an automated process or doing the field replacement you recovery of systems we patch and update these every single month we support business continuity backup and restore and we entirely secure this thing if you've haven't seen our security it is phenomenal Lee Holmes and the team just did a fantastic job securing Azure stack now why am I going on and on about Azure stack like who cares Jeffrey you're busy I don't care here's why you care as your stack runs on PowerShell 100% I have over 250 thousand lines of code of PowerShell and desired state configuration running Azure stack it's not the best PowerShell code but I got a lot of it it's not just the creation and the provisioning it's the production system when you create a VMware a VM on Azure stack there were over 400 on an average of 472 powershell commandlets that get called to create a VM in Azure stack Jia was absolutely central to the design of our security subsystem right this is what allows us basically we took a very modern assumed breach mentality so that if you breach one section it gives you nothing right doesn't let you own the rest of the system using Jia gave us this compartmentalization we have logging and transcripts for everything angeas core to support with Azure stack here's a deal I've never given you the admin password full stop don't ask you never get in it I give you the admin password I love you but you're gonna screw it up ok so I can't allow that so you don't get the admin password but there are times when you need to do admin things so guess what we did we used Jia we created Jia endpoint that's say hey here are the things that you can do if ever support needs to do something outside of that then we have something where we can get admin privileges this requires two keys Microsoft has a key you have a key and that will unlock an admin account where everything is logged and transcribed etc anyway this incredible security system only enable because of PowerShell and Gia I saw the some people here are gonna give some gia talks if you go check those out it's an amazing capability well I'll give you step back here and give you a little bit of the history here prior to as your stack there's something cloud called cloud platform solution and this was a purely PowerShell based deployment and when we went to do the next iteration of that design I said hey it was all PowerShell but now we got to use desired state configuration and the team told me I hate PowerShell really okay tell me more what do you mean you hate PowerShell as we drilled in we realized that that where we were and this was with PowerShell version 4 we were not giving these developers the things that they needed to succeed ok because they were doing programming in the large ok so as developers they had a toolset that they were used to visual studio they needed visual studio they were used to defining contracts as I'm gonna produce something I'm gonna consume code from you and from you I want to express that contract in terms of a class we were doing in scripts I scripts signatures there were tools I remember this one at some point the develop manager almost hit me I thought he really was when I was buying coffees like you cost me three days in my schedule it's like me how did I cost you three days your schedule and he said basically somebody had checked in some bad PowerShell and they weren't able to find out about it for three days why isn't there a lint tool like any other proper language like that's a good idea and they didn't have the ability to unit test things okay so these were things that were missing and that why they they did not feel that they could be successful as developers using PowerShell and that whole improving programming a large was one of the big focuses for PowerShell version 5 where we did visual studio and visual studio code support we added classes the new language mode we added script analyzer we embrace the PowerShell they sorry the pester unit test framework and then we improved all these things right the debug ability the authoring of DSC debugging jobs etc went a large way and that's what's really enabled us to use a PowerShell in as your stack I mentioned to you it's pretty complex and here's the point we deliver this with an appliance experience right agreed to which you're messing around what that complexity means you're not using the system so we try and do this like a car right you drive a car everything's fine you're not like looking at all the details a light comes on says put oil in you put oil in you keep driving a light comes on it says put gas in you put gas in you keep going that's the model for as your stack comes in gets deployed you use it some point a light comes on it says replace this dish Drive replace this to strive you keep using it another point light comes on says replace this server you replace that server you keep going point I'm making is that that we're able to deliver that very simple environment because of the hyper complexity of the previous environment ok and the hyper complexity the fact that we have multiple levels of resilience and fault tolerance the fact that we've got all this monitoring et cetera is the things that allow us to give you a very simple experience well guess what guys that's your job as well your job is to help empower other people empower them by giving them very simple abstractions and tools that they can use in order for that to work you need to do the heavy lifting and make a simple world for them now challenges that we've had an azure stack number one error handling error handling is a bit of a mess let me give you a and this I'm gonna propose something that we do right now we don't have a prototype for this but I'm gonna kind of walk you through the problem and what I think the solution is now as you know we've always had this distinction between terminating and non terminating errors ok and it served us very well however not always let's see if I got this right okay so I'm going I have this module called error error has to commandlets test non terminating error and test terminating error that's pretty good so when I test non terminating error you'll see I'm gonna make this smaller you'll see that I get a bunch of errors in fact let me show you what that action looks like just see see the code so basically it's stopped process in Windows if you stop something that's an odd an ID that's odd they don't exist so anyway so I stopped these three things and then a terminating error I do exactly the same thing but I say error action stop okay so I ran that I got three errors okay so now what I want to do is I'll say hey I want to run this again I want the air action to be silently continue and I want to grab everything and put it into a variable failed and this is the kind of code that you write because then what you can do is you can say for each error in failed remember we collected everything we're gonna write host foreground yellow fail and we grab the error the target and so we had three errors and I'm able to do that okay so that is the coding pattern you have for non terminating errors now let's consider the coding pattern for terminating errors because it's different so a terminating error remember does exactly the same thing but when you get an error it stops okay so test terminating error we run that and we just get one error we didn't get three we got one because it's a terminating error so now if you want to do the same thing and say hey fail ID and give the ID number here's the code you have to write so first you got to put it in a try-catch and then error is Dao assigned underbar gives you the error and the rest of it looks the same so now I do this yeah great what they do there tester me here louder what oh there you go yes thank you do there you go it takes a community thank you very much it's so true I told you I'm a deeply flawed person so there you go and so but now I have these two different coding patterns right and now here's the question like okay fine you know that's the deal and reason why we did that now what you can do is you can do things like hey I'm gonna go and I will set you know dollar sign PS default parameter values I'll say I want air action to be stopped for everybody I'll execute that and now if I do this notice of only one error right and now here I could say it's a non terminating error and this code should work let's hope it works and it does okay so by adding that default parameter value that works okay clear that okay but now I'm gonna import another module error too and I have something that's called test error which code should I write I don't know I don't know there's no way it doesn't tell you whether it's terminating or non terminating in fact some commandments can have both terminating errors and non terminating errors right so well let's just run it okay and yeah well it looks like it gave me a bunch of the errors that looks like it's a non terminating error and I've lost my mouse seriously I real okay so so now I'll go and I'll do that trick again okay well say default parameter values stop and run it again and didn't work oh why and the answer is that error that module let's take a look at it PS edit error - error okay test error it calls test non terminating error okay and what happened here's the heart of it is that each module has its own scope and so when I did this code to say DPS default parameter values it did not apply to the scope of that module and if I wanted to apply that scope module and by the way this is PowerShell and this is advanced PowerShell here's how you do that dala sine M equals get module error - and then ampersand now assign em oh my gosh so what this says is run ampersand run dolla sign em in a module a script block so it goes into the scope of that script block and runs arbitrary code and here the code is set the error action and now when I run it it does what I wanted man that's paying the ass like not good so imagine instead we had this imagine if we had something called PS on error with PS on error you call a nonterminating call with a non terminating thing that this script block would run every time you get a terminating or non terminating error so in this case it would run three times when I call a terminating error I have exactly the same code but it will only run once and this you don't have to know what what is it's gonna produce terminating or non terminating you just call it and the right thing happens now with that you ran three errors but what if you didn't want that right well we have a way to deal with that and the answer is you do exactly the same thing but you add a break so if you do that this the first time it gets called writes out the error message and then terminates things this would just do one so you have a uniform way to handle error handling anyway so that's something we're gonna be looking at and it's one of those things like you say uh it's kind of cool but I have other ways to deal with it when yeah I'm over 250 thousand lines of code man you want some of this uniformity by the way the other thing with that is that that ability to have control over the modules you know PS dollar sign error variable being different default parameter value being different for every module is a real problem in programming in the large so we want better control over module and nested modules PS breakpoint PS breakpoint we want to be able to break on an error right so right now there's no way to break on an error and then capture the state so what we're trying to do is to rewrite all of our script blocks associated with remoting so that when I okay so now think about this where you saw that complex hideous diagram and I'm gonna patch that right so I got like a gazillion hosts a gazillion VMs and I'm gonna I'm gonna run script blocks and all about right well what happens when something goes wrong right bring out that rabbit's foot No so we want to do is we want to say hey I want to overwrite invoke command take the script block and basically produce a mini dump anytime there's an error but I can't do that because I cannot catch when you have a failure I can only catch at the top of the stack not at the bottom of the stack so that's a big issue for us classes I cannot tell you how much I love classes they're exactly the right tool the new programming language mode is exactly the right tool for programming large but I can't use them to create my own commandlets and I can't use them to create domain-specific languages which we'd like to be able to do and with Azure stack man I just need to be able to fix whatever I need whenever I need I really need that open-source capability so what about No so that's that's the heart of it this is where we're gonna focus in on programming and large these sort of areas now as we do this a lot of people been asking us about things like hey what about this Windows services subsystem for Linux does that mean PowerShell is dead and here's a real answer the answer is when Sachi came on board he said hey get out of your offices and go talk to customers and given what they want now part of that is we are breaking down a lot of the bureaucracy that we had in the past and teams are becoming more agile part of that bureaucracy in fact bulk of that over by ten or ten more great okay a large portion of that was you know bad stuff is good to get rid of that bureaucracy some of it you could argue was good but it's all kind of gone now we have empowered teams and that joke about there's a fine line between agile and random so every team's out talking to customers figuring out the right thing to do and going and so here's the reality the reality is it's kind of a messy world and but but that's okay you know really it is so yeah this Windows services for subsistence now you have bash on Windows so what's that all about like why do we do that and the answer is because you saw you go down to the valley and you see all these open-source developers people writing code for Linux servers on a Mac now if you check the Mac lately but that is a really expensive really outdated piece of hardware and as and and we have these amazing machines so hey if we could just allow people to write their open-source software on our desktops that would be a compelling value proposition and guess what it is they love it people are like oh man I I can I can spend like half the price get a much better machine you know some of these lenovo's some of yeah lenovo here and 64 gigabytes of ram like oh my gosh anyway so that's what that's all about help open-source developers do their development on Windows that's what that's about and here's the thing that team was closely associated with the team that owned the console the console that had not been invested in in like over 20 years and now the console is reinvigorated right we're getting things like transparency we're getting out if you've seen the latest insider build has tabbed powershell tabbed switches tabs in the console so that's been great this is also bringing us native curl native tar fantastic stuff and just you know just driving Microsoft to a more general command line culture so that's fantastic and then a lot of people have been asking me about these pop you know Python based as your CLI here's a reality there they here's the backstory the backstory was Guthrie would go talk to people and say hey why aren't you using more Azure and they say cuz you're Linux support sucks we had these as your CLI command let's are written in I guess nodejs and they're just not up to the task so Guthrie basically personally PM this thing it was a time well over a year out from when PowerShell would be available on Linux we didn't even know that it would be a year it could have been longer and so we personally PM them now the fact that it's in written in Python means nothing could have been written in go but he needed to get that ASAP and that's what drove that now here's the reality is he did that and did two things at once one was to drive the swagger based SDK approach so now when a team as your team produces a REST API we get dotnet Python Go Java nodejs all first-class citizens and as I mentioned now PowerShell as well so that's a huge benefit and as Guthrie was personally peeing them he went and drove like the abstractions he's like these these abstractions make no sense whatsoever and so then he went and drove a much better set of abstractions and those abstractions are now coming to the PowerShell environment so happy days so as I mentioned this is all kind of a side effect of the common engineering criteria haven't been removed but it's all good so here's the net of s and we started this from the very beginning we always said listen the world is messy the world always has been messy the world is messy the old always will be messy right and PowerShell is the glue that pulls together this messy world why wait why is the world messy unless you give up and walk away from everything that you have you got legacy stuff and unless you say I'm no longer gonna innovate you have people who innovate and innovators kind of break the rules they go their own way they produce messiness right so that's why the world's always messy right and if some part of it becomes less messy doesn't mean the whole becomes less messy right in general it just gets Messier and Messier so that's what we're all about we're all about oh all right before the predictions we're all about trying to help you solve that problem and I'll tell you a story I was a young buck engineer at digital and I was doing this managing product we're on distributed remote user management and working our butts off on this project and at some point I stepped back and I said wait a second the only reason why I'm doing this reason why I have a job is because that team over there screwed up like as soon as they stopped screwing up I mean that's what management is right Mangin is compensating for the screw-ups of other teams as soon as that team stops screwing up I'm gonna be out of a career I am now a technical fellow at Microsoft 30-plus years later turns out there's a growth business in messiness so it's a messy world PowerShell as a firm place so now predictions these are my personal predictions that these come true great if they don't don't hold me to it number one powershell core i predict that we'll be renamed to powershell partial core has this convention is it's like caveat - it sends the wrong message the message is PowerShell is our future and I think we'll change the name to reflect that all right talk to you folks and give us some feedback but I think that's what's going to happen ships ships is you know what the heck's ship stands for simple hierarchies in PowerShell it's very important to pronounce the P ship ships is a way you use it's very important it's a way you can use PowerShell classes to create new hierarchies and that's how what you're getting with the azure drive and we're seeing a bunch of people in the community that are now taking this and generating fantastic new things in fact Ravi / Adel produced one for the PowerShell European conference and so you mount the European conference schedule as a drive and you can see Dee and today one due adder and and so I believe that ships is gonna reinvigorate namespaces your namespaces were always awesome but they were just so hard to develop we have more work to do on ships but I think that that is going to reinvigorate namespaces people are gonna rediscover why namespaces are wonderful I mentioned you these swagger bass commandlets I think I think as the world moves to micro-services as the world moves to services exposed through rest api's what by why is everyone exposing things to rest api's here's a simple question hey is everybody going to programming go no is nobody in a programming go No okay what about Python same answer what about dotnet same answer what about this doing things in rest exposing your api is via rest means it's easier to access the widest range of languages and runtimes and client environments you can invoke a REST API from Python on windows from go on Mac from you know dotnet on Linux so it gives you the maximal addressability then annotating those rest api is with swagger gives you those things and I think this will become emerge as one of the most dominant ways to generate commandlets cloud shell I think I showed you earlier I predict that this will be ship as a Linux only environment so cloud shall you go up to the azure portal you say hey I'd like to manage as your we give you an environment and the past we gave you Windows running PowerShell and Linux running bash and then we went and said well actually PowerShell can be anywhere and I think we bash can be anywhere and what we found was boy we have two different teams producing the windows in the Linux image and then we're telling people trying to coordinate and there's a whole bunch extra work and then the startup times are really not so good but we're sort of fixing a bunch of that stuff but what really kind of looked at and said wait this doesn't make any sense is that there were a whole suite of azor oriented tools that are being generated on Linux like terraform for which their windows support is either not there or lags greatly and so we don't want to do is to have an environment where hey this set of tools is available here and that set of tools is available they're having one image Linux I think unifies that aligns everything and makes it simple now the reason why we think this can be successful is because when you're in this environment you're interacting with PowerShell you're interacting with the azure commandlets you're not managing that machine that machine could be an as/400 it doesn't matter you don't add users to that you don't manage services to that you don't manage processes that that environment has exactly one function run the tools to manage Azure and in that regard we think in the end when we pull in that thread will do Linux only because it gives us you know most efficiency and gives us a common set of tools that can be up-to-date constantly we have this desired state I'm not sure this is a prediction as much as a we're already doing it desired state configuration we have a desired state configuration these local configuration manager and Where's Kenneth I told Kenneth we'd never ever ever have more than one of those things he kept coming back and said we need more than one of me or one I said well you can't have more than one until you prove these design problems and he came back with the team and solve them so now we can have more than one of these and so basically what you're gonna have is you're gonna have multiple LCMS with different implementation technologies have one in native code very very lightweight very fast fantastic used in all their security stuff then at some point you'll be able to say hey I think I'd like to write some of these things these providers in dotnet have a dotnet core and then a full dotnet one having multiple LCMS that can be on different schedules so in fact maybe you'll have one that's in a process that gets updated every couple minutes whereas one for the system updates every half an hour or so so I think that's gonna work out I predict that at some point the Linux distributions will look at the what's going on in PowerShell and decide to include it in their distributions won't that be fun and there's this term in the development world called a full stack developer I believe in the IT world we're gonna have a corresponding thing and that's what I call the cross stack developer across that developer full stack developers are very in in fashion these days they make a lot of money and they're sought-after quite vigorously by companies a lot of competition for these full stack developers I think the exactly the same things gonna happen to IT for cross stack IT cross that ITR those people that are able to manage the entire stacks you got Windows you got Linux you got this service you got AWS you got Google yep Azure doesn't matter I can manage that for you I think that it's gonna be incredible skill how do you do that not by being an expert at all those things you can become an expert and learning you gonna come an expert at learning learning engaging in the community that's how that works so I think that's gonna become very very popular and lastly it is not we do not intend Microsoft is not going to invest in full PowerShell running on our start PowerShell version 6 running on full net but we're open source and so anybody in this room can decide hey I think that's a good idea and I predict somebody here will do that not sure where it'll go but with that here's what I want to say digital transformation is going to change everything and it's automation that enables digital transformation I mention T that it's 2018 power shells never been more important but here's the real story its 2018 and you have never been more important you've been never more important to your customers to your companies to your community so what's in PowerShell version next I don't know 50 percent of its gonna come from people like you in the room ok so you're gonna define the new future so lean in reach out meet people this is the greatest opportunity this conference is to meet the people sitting next to you build stuff and make sure you publish it so other people can can benefit from it and with that I think we have some time for questions no oh don't they go long Geoffrey Snover everybody [Applause] you
Info
Channel: PowerShell.org
Views: 28,498
Rating: 4.8481011 out of 5
Keywords: powershell, windows powershell, techsession, powershell summit
Id: us4HTxtjfa8
Channel Id: undefined
Length: 83min 3sec (4983 seconds)
Published: Wed May 02 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.