How To - Use the ServiceNow Agent to Automate Software Distribution
welcome this is cody wolf and volker unch and today we're going to look at how you can automate the software request process using service portal sam pro active directory and acc dash v we have two use cases we're going to go through how to deploy and request 7-zip and then we'll take a look at office 2019 pro first up is 7-zip bulker thank you cody okay so let's start with a service catalog as you can see here if i'm going to the category software i have three different catalog items here first one non-licensable software 7-zip 19 and then for the second use case that we'll see later office 2019 professional that is a licensable software so these are the published catalog items that the user has available here directly connected and linked to these catalog items we have a specific workflow in the background which we see here in flow designer this is a workflow that we have created it's custom workflow nothing that's available out of the box and this workflow distinguishes between a software request that is for a licensable and for not or for non-licensable software and based on that um difference it will decide which approvals are required for a non-licensable software only the manager needs to be needs to approve the request so as you can see we have this ask for manager approval here and then for a licensable software we look up the type of software here the sam team also needs to approve and we also have a license validation here so we check if licenses are available so this is a multi-level approval and for the non-licensable software we just have the manager approved and then if we're going down the workflow not a licensable software we're just checking if a computer is in the specific active directory group and then if it's not part of that hd group we're adding it here and we're updating the record later next thing is then to have microsoft active directory has the third component here as we see here we have different groups in microsoft active directory one of them 7zip and then the other one that we'll see later office 2019 professional plus um naming convention here is to have the product and the version and optional the edition if available as part of the name so it's 7zip 19 and it's office 2019 professional plus and each computer that gets added to one of these groups will automatically process a group policy in active directory that will deploy the relevant software so for 7-zip 19 it will be the relevant 7-zip installation and for office 2019 it would then be the office 2019 installation that would happen automatically via group policy so we have service catalog we have flow designer with that specific flow and the approvals and the checks of license availability and then as the third component we have active directory with the relevant groups and group policies for each of the installations for each of the catalog items we have one specific groups group and to each of the groups we have one dedicated group policy created and assigned to that group okay so let's go back to the service portal and start with 7-zip as the first use case the non-licensable software open this one and as you can see here in this request template that we have here in this catalog item i can select or i need to select the computer this software shall be installed on this list automatically filters the computers that are assigned to the user requesting that software so in this case it's casey kuhn i'll just select the first one in the list and then i'll click order now and then i can also select which user to request this for it's myself in this case and i can also add some optional additional delivery information additional special instructions if required as you can see these are optional i can now check out and wait what happens next i'll get redirected to my request summary and if we're waiting a little bit here or just doing a refresh here as you can see i see my requested item and the next step is that i'm waiting for manager approval and up here i have my email open and as you can see the manager which for the ease of use in this case is also casey kuhn has got an email this is an approval request for 7-zip 19 please check the requested item so i can just as a manager open the requested item in a separate app using this link and then i can see what has been requested here for which computer it has been requested and i can also see that i'm the approver here and the approval state is requested close this back and then i can now decide from the email either to approve or reject this i'll approve it just say ok for me send this email out send an answer and at this point in time we can go back to the request and it now will take maybe two or three minutes until this request gets updated until the email the approval email gets processed by the servicenow instance and the workflow that is linked to this specific requested item here okay vocalist pause and let us finish approving so as you can see i've updated the request status here and it has progressed has gone to the next steps the request has been approved it's now in the fulfillment phase or the fulfillment phase has been completed it's now in the delivery phase which has also been defined in the relevant workflow so we can just update here again still in the delivery phase and this is where the group membership in active directory is being checked and then if the computer is not a member of that active directory group it gets added automatically to that specific ad group still in delivery phase so yeah can maybe take one to two minutes too in here now do we want to take a look at the the computer yes of course we can take a look at the computer again and in the computer we'll also see if we go to the software installations here agent client collector is installed accv in this case and we do not have 7-zip installed on this computer yet yeah so this is the status before we get the software installed so to move this forward do we log in or can we log into the vm and force the policy to to get 7-zip installed yeah i just uh need to wait first before yeah so there we see it's been completed and what i now do is i just open a command shell on this computer and i'll just type gp update slash force which will force the group policy update for this computer which anyway happens in the background on a scheduled basis automatically but since we want to see a result here we're just speeding this up by doing this gp update slash force command okay now good so let's in parallel check the group membership here as you can see the computer that has been selected this computer we're currently logged into has been added to this group so let's do another gp update slash force to speed things up a little bit okay let's pause a little bit cody okay okay so we've now waited another two minutes and we're doing an update again to force the policy to get updated and as you can see here i'm now getting a message that this policy cannot be processed without a reboot yeah so the computer needs a reboot to install 7zip so i can now confirm this with yes and if i do as soon as i do that i'm getting a message that the computer will be restarted so i can just speed this up by closing this message and while we not want to wait for the restart just to the restart here okay which would happen automatically anyway so let's just give it maybe 20 30 seconds until we can reconnect okay so we'll pause and give it time to reboot yeah okay good so here we are again let me just authenticate and reconnect to that remote computer there i'm logging in again just open the browser again to get access to the instance and now the group policy is applying and 7-zip is being installed yes so i'm just logging in before i'll take a look at my start menu and as you can see here 7-zip file manager has been installed and the next thing that will happen now in the background is that the aged client collector will scan the computer again and will update inventory so you see if i go to my computers i have the last inventory from 453 so that's three four minutes ago so we can just wait for this to update again and then we can take a look at the software installations on that computer okay so let's give it a few minutes for accv to rescan the vm collect the software inventory and populate servicenow yes okay okay so as you can see the inventory has up has been updated to 1657 it was 1653 before so let's open this computer go down to the software installations and we'll see 7-zip 19 showing up here in the list which means that we have a fully automated process from the request of a software through the approval through the um processing via active directory the relevant groups the group policies that will deploy the software and then agent client collector as the agent that tells us which changes happen on a computer in this case the installation of a software that will automatically be reported after the computer has been rescanned okay perfect this looks good and to close this one off we can go back in the service portal in case you can see her request and it should be complete absolutely so let's go back to service catalog let's take a look at the requests as you can see i do not have any open requests so i can just switch to the closed ones and i can see this is my 7-zip has been completed and the nice thing here is that we also add information about what has been done in the background so my computer has been added to the ad group that's also been document documented in here and of course i can see the whole stay at the different stages that have been processed during this workflow that we have seen goods now let's take a look at a licensable piece of software microsoft office 2019 pro so show us how that works volker yes let me just log in to my email again because we want to see some emails going back and forth and we'll also probably see some new emails here now i know casey has has an external email address so she won't see anything here so this is the old approval request let's get rid of this to really have a clean status here and then let's go back to the service portal we're going back to home request something select the software category again and we see microsoft office 2019 professional plus here which also has a price assigned here because it's a licensable software now again what's connected to this catalog item in the background first thing is flow designer so if we go back into the relevant software request via service portal flow we'll see that we have a lookup if a software is licensable or not if it is licensable which would be the case for office 2019 we also do a license check and then we have a second approval after the manager approval we'll also ask the sam team for approval because the sam team needs to check if a licensable software should really be assigned to that user and then if that happens disapproval again we have the group check for that computer yeah and we're also assigning a license to that computer if licenses are available so that's all part of this workflow for this licensable software okay so a few things here volcker so this is where sam pro starts to enter the picture and we're taking a look at the entitlements and making sure we have enough rights yes and then we give the sam team a chance to say yes or no approve the request and then if they approve we're actually taking that computer and creating a device allocation on the entitlement absolutely you see i have for my office 2019 the related entitlement it's a device based license entitlement i have a hundred purchased rights from which all of the rights are still available all the allocations are available i do not have any locations down here as you can see okay so this is the the same piece that's of course of course in this context becomes relevant now and then as for 7-zip we have in the active directory the relevant office 2019 group 2019 professional plus no members in here at the moment and then linked to that group will have again the group policy which would then install the software automatically if the request gets approved and license is available uh that will happen automatically okay so let's go back to the service portal and let's see how this works and request office 2019 professional again i've been asked to select the computer that this software should be installed on so the two computers that are assigned to me to my user and i can then also see the price for this specific catalog item for this specific software and i can now click order now select who i want to request this for the optional delivery and special instructions information that i can provide and just check out and then i'm getting redirected to my request summary let's update here as you can see waiting for approval first step first stage here and now at this point in time we're waiting again for the repo approval email to come in and this is the manager approved this is the manager approval the first approval so the same level that also 7zip got an approval for i'm getting told this is for office 2019 professional plus again i can take a look at the requested item i can get some more information here if available and i'm the approver as you can see so i can just close this tab again i decide to approve this just type approved send it over and at this point in time the flow moves further and we now wait for the requested item to update let's give it a minute or two for this to approve yes okay okay so let's take a look at the stages the first request has been approved we're in the fulfillment phase now but since this is a licensable software you see that the information about the license availability has been added to the requested item so in this case licenses are available we have 100 licenses 100 allocations available as we've seen before in the license entitlement even if there were no licenses available we would also see that here and the sam team can still approve so going back to my email inbox this is the second email that goes out to the sam team yeah with the same text again and the sam team can now take a look at the requested item and they will see in this case that the licenses are available but even if the licenses were not available they could still decide to approve this request yeah so we don't force them to to reject this but they can still approve so and i guess volcker reason to do that would be if you needed to go ahead and push this through to give the person the software and then they could go purchase it afterwards basically right right just not to stop the process at this specific point in time and really serve the end user who's the customer for the sam team also yeah right so deliver a perfect service here so let's say approved here again because we want to approve it send it and now we'll wait again until the approval status updates and then we'll move to the next level after the fulfillment we're going again into the delivery but we need to wait for the email to be processed by the servicenow instance in the background okay so let's wait for this to get approved yeah okay okay so after the email um the approval email from the sam manager has been processed by the instance you see that the stage has been updated here the whole request has been updated we're now in the completed status here or face and i can also see down here additional messages being added to the summary of the requested item license has been allocated to the specific computer and the computer has been added to the id group this is what has been documented here and then if we go back to the license entitlement i can just update the entitlement we've seen before there were no allocations assigned here so let's just update this here and as you can see here the license has been allocated to the computer that has that was selected by the user when opening the request so that's what happened here automatically and then of course going into active directory let's take a look at the office 2019 professional plus group members the computer has been added to this group also and to this group we have linked the group policy that when i update the group policy will automatically install the software on this computer after a reboot so that would be the end of the whole workflow then and we'll have an end-to-end workflow and if we then update the inventory like we did for 7-zip via agent client collector we would see office 2019 in the inventory data in the install software of that specific computer that has been processed here by this workflow perfect so that's the end-to-end process and that will conclude this session so we looked at two use cases how to request a piece of software that does not require a license 7-0 go through the approvals it's installed via active directory accv scans it update servicenow we also looked at requesting office 2019 pro a licensable piece of software we had an extra step where the sam team approves it checks the licenses we then assign a device allocation to the entitlement and then it goes through that same flow where active directory installs the software thank you volcker good job and this concludes our call thank you thank you cody thank you everyone
https://www.youtube.com/watch?v=J2hhnkbNCZw