Uncategorized

hello in this video I’m going over how to create and run run books integer automation so in this video I’m gonna go over how to create edit and start run books energy automation I’m gonna go over how to do it through the portal and then I’m gonna show you how to do it with the is see there’s your automation add-on so with that let’s get started so let’s get started by going into our automation test account that I have setup so I’m gonna go down to run books and in the run books you’re gonna see a few default run books that Microsoft has available at this time of creating the is your automation accountant I’m gonna ignore those for now and I’m gonna add another run book or add a run book to create one so I create a run book I’m first gonna give it a name let’s call it a a test and it’s gonna be a run book type here you’ve got the option as a powershell python to powershell graphical and then a couple other powershell workflow or graphical powershell workflow i’m gonna select powershell and create you can also see over here there was an option to import a run book after you create the run book have to scroll over to the right here i’ve got a couple options first I’ve got commandlets these are commandlets that I can insert into is your automation so if I go to let’s say is your RM resource or aster RM storage I could add all the code needed to connect to an azure storage account by inserting it from this command line option you can also call other run books but again I don’t want to call another run book in this and then the final option is assets and down here you can see I’ve got a connection asset that I could add in if I wanted to again we’re just going to create a simple run book that is going to just write output okay so after you edit your run book you have to save it and notice the save and the publish I’m not gonna publish it right now because before I publish it I want to test it so we’re going to go over to the test pane and to test it I’m gonna click start and we’ll wait a couple seconds that we should see the output there it is hello world so that completed successfully let’s go back into edit and I’m gonna try to go back here in the test pane again there’s an option to view the last test results now it’s been a little kludgy it’s been writing output twice yeah there we go that must be some sort of bug but you can see you can view the last the output from the last test without running it again that’s helpful if you’re trying to troubleshoot a bug or something and want to see what the output was like without actually running that again so now I’m gonna go back into edit and I’ve saved it a test good so now I’m gonna publish it so I don’t have any other version so I’m okay to proceed now that it’s published I can start it starting is different from test you can see the recent job output there’s no jobs phone now I did run this in a test and it did complete but it’s not showing up here because it’s not actually that wasn’t actually a job that was just a test so now that I have this published I can hit start and that’s going to take me to a different screen this is the actual job Status page and here you can see it’s queued now it’s starting and it’s complete so I can go to output and we can see the output from that job we can see all logs so if there’s additional logs I would be able to see them in there there’s also errors and warnings so if there were errors or warnings from this job you would see them in here I’m going to go back to that test run book and it says it’s queued but if we do a refresh it’s complete so now I have completed job showing the date shown when it’s uploaded now what if we wanted to make a change to that we could come in here and I could do another write output let’s do test2 and notice I’m not doing a right host right host does not work there’s no host and as your automation because is all running integer so you have to do write output for this kind of

simple test I’m gonna save it we’re gonna test it we’ll hit start give it a second okay so there it completed I’ve got hello world test two everything looks good now we’re gonna go back to the run book and I’m gonna start this again you can see it’s queued okay so now the jobs completed let’s check out the output well wait it didn’t complete whereas test two well I did that on purpose because what we failed to do was publish it so I made a change in test and if we go back to all of the run books we can see it’s in edit mode right now it’s not published what that means is any edits I’ve made since the last publish will not be included when the job started so in order to get those updates into the system and have those run when the job starts we have to publish it so I’m going to go back in and edit and here you can see I can either publish or revert to publish so if I made a mistake I didn’t like this I could revert to the last published version I’m not going to do that I’m going to publish and it says it’s gonna overwrite any previously published versions yes that’s okay now if I click start let’s see what happens and it’s queued and complete now if we go to output there it is both both lines of output are included okay but what if there’s a problem so let’s go back into our test and we’re going to edit and we’re just going to put in the line here two divided by zero let’s save that and we’ll publish it without even testing it because what could possibly go wrong so let’s start no no it’s queued up and we’ll give it a second run okay so you can see here I’ve got my output just like before that work but you’ll notice down here I have an error and that error says yeah you can’t divide by zero so that was a problem now one of the things in my other videos I mentioned is it’s there’s a lot of advantage to linking these your automation account to log analytics this is a case where that would be helpful you could create a lerton log analytics so if the job failed you’d be notified that’s how linking is your automation with log analytics can be beneficial ok so now I’m going to go back to your automation my account and I’m just going to create a schedule so let’s add a schedule and this is one of the shared resources that you can make available to anything within as your automation I’m just going to create this your name this daily and we’ll see it starts today at 2:00 p.m. and set to my time zone now you notice one thing I did fail to do was set this as a reoccurring so it’s only going to want to run once which is fine so I’m going to go back to my run books and go into a test and schedule now here I’m just gonna link this job to a schedule that I already created and if I have any type of input I would change it here but I don’t so I’m just gonna click OK and now in about an hour that’s going to run so that is how you create a run book editor run book and schedule it through the usurer automation portal next I’m going to go over the is your automation ISE add-on so to do that first I’m going to go into PowerShell ISE as an admin there’s a couple steps I need to take to get this installed I’m gonna first install the module as your automation authoring tool kit with the scope as current user

and I’m going to click yes to all on the untrusted repository once that’s done installing I’m going to import the module now you can see this has opened up the is your automation ISE add-on and the first thing we can do is sign into our automation account so once I’m logged in I’m going to select my subscription so this is telling me that it’s having a problem with the run as account and that’s to be expected because of some encrypted values that I couldn’t pull down I’m just going to click OK on that so now we have the path where the workspace is going to go we have our automation account list I’m going to leave it at this one that we’ve been working on and some other information here the certificate thumb prints and then status if we go over to run books you can see we have a test that we’ve been working on and a couple of the other ones so if we look at this we can create a new one but I’m gonna select the AAA test and it gives me the option to download so I’m going to download that and I’m going to open it so there it is this is the run book that I created in the previous steps now it’s on my local machine I can test that in Azure and one of the things you’ll notice right away is it opened up the output this is actually the output from the last command kind of like as we went into the test the run book we could view the last status that’s what it’s showing here and I want to see a run I have to click start new job then it’s going to ask me where I want this to run I’ll leave it editor and start so this is the same as what we were doing in the portal it’s just can more conveniently located within the ISE interface and that’s telling me the same output as before and that I can’t divide divide by 0 so if I want to comment this out I can do that and then save it and I’m going to upload that draft now if we go back into here we can view this run book but you can see it doesn’t have that comment because it hasn’t been published but if we go into edit there it is it’s been commented commented out and that’s the difference between an edited and a published version so now let’s go back and let’s publish that through the add-on all I have to do is publish the draft now I can go back in here and view and it should come up as commented out so all these features are very similar or the same as what we could do through the portal it just gives us a integrated interface in order to do that here we have DSC if you’re doing desired state configurations you can also work on them here we have some of the shared assets that you can also look at and crate and then modules if you uploaded any modules you can also upload them here so for run books you know we could create a new one we’ll just do a second one and it’s going to ask us if it’s a script or a workflow we’re going to go script and then write output now I can save that upload the draft

once it’s uploaded we can test the draft and there it is so now I can publish it and we should be able to go back in the portal do a refresh I guess we have to go back to the automation account do a refresh and there it is it’s published and ready to go that’s pretty simple that’s the way these your automation ISE add-on works I hope you found this video informative if you did please like and subscribe that lets me know people are watching it and I’ll continue making these thanks for watching

You Want To Have Your Favorite Car?

We have a big list of modern & classic cars in both used and new categories.