{"id":1605,"date":"2010-06-21T18:18:29","date_gmt":"2010-06-21T16:18:29","guid":{"rendered":"http:\/\/contoso.se\/blog\/?p=1605"},"modified":"2010-06-21T20:50:52","modified_gmt":"2010-06-21T18:50:52","slug":"reset-password-with-in-service-manager","status":"publish","type":"post","link":"http:\/\/contoso.se\/blog\/?p=1605","title":{"rendered":"Reset Password with Service Manager"},"content":{"rendered":"<p>A common task for service desk is to reset an end-user password. A common scenario is that the operator has to fill in an incident form, start Active Directory Users and Computers console, find the user, reset the password, notify the password over the phone or send it in a e-mail to the end-user. There are a lot of steps; the operator sees the password and it is not good practise to give out passwords over the phone. In this post I will show you one solution to this issue. I will use a vbscript, a powershell script and the updated version of <a href=\"http:\/\/www.litware.se\/\">Patrik\u00e2\u20ac\u2122s<\/a> cmdlets for Service Manager.<\/p>\n<p>The first script, resetpassword.vbs1, will ask the operator for a username and an e-mail address. The username is the user that needs a new password. The e-mail address is the mailbox that will receive the new e-mail. This could be a colleague e-mail address or a private e-mail address of the affected user.<\/p>\n<p>The second script, password.ps1, is a powershell script that will create a closed incident for this task. This script is started by the vbscript resetpassword.vbs. For many service desks it is important to track all calls, and with this powershell script a new incident will be created and closed in the background.<\/p>\n<p>You need to create a task in the console. This task will be used to trigger resetpassword.vbs. Create the task with the following settings:<\/p>\n<ul>\n<li>Task Name: Contoso &#8211; Reset Password<\/li>\n<li>Description: A task to quick reset a password<\/li>\n<li>Target class: Incident<\/li>\n<li>Management Pack: for example Service Manager Incident Management Configuration Library<\/li>\n<li>Categories: Incident Support Groups Folder Tasks<\/li>\n<li>Command Line &#8211; path: C:\\windows\\system32\\cscript.exe<\/li>\n<li>Command Line &#8211; parameters: C:\\scripts\\resetpassword.vbs<\/li>\n<li>Command Line &#8211; Working directory: %windir%\\system32<\/li>\n<li>uncheck, log in action log when this task is run<\/li>\n<li>check, show output when this task is run<\/li>\n<\/ul>\n<p>This task will trigger the vbscript and will then show the operator two dialog boxes, one for an e-mail and one for a username.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/06\/password01.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-1609  aligncenter\" title=\"password01\" src=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/06\/password01-300x125.jpg\" alt=\"\" width=\"300\" height=\"125\" srcset=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/06\/password01-300x125.jpg 300w, http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/06\/password01.jpg 361w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>the next dialogue box will ask for an e-mail.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/06\/password02.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-1610  aligncenter\" title=\"password02\" src=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/06\/password02-300x122.jpg\" alt=\"\" width=\"300\" height=\"122\" srcset=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/06\/password02-300x122.jpg 300w, http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/06\/password02.jpg 359w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>the task will run and after a minute you get<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/06\/password03.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-1613  aligncenter\" title=\"password03\" src=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/06\/password03-300x148.jpg\" alt=\"\" width=\"300\" height=\"148\" srcset=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/06\/password03-300x148.jpg 300w, http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/06\/password03.jpg 516w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>in the console you will see an incident which is closed with some default information<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/06\/password04.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-1614  aligncenter\" title=\"password04\" src=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/06\/password04-300x245.jpg\" alt=\"\" width=\"300\" height=\"245\" srcset=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/06\/password04-300x245.jpg 300w, http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/06\/password04.jpg 606w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>the e-mail with the new password is delivered to the e-mail address<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/06\/password05.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-1617  aligncenter\" title=\"password05\" src=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/06\/password05-300x170.jpg\" alt=\"\" width=\"300\" height=\"170\" srcset=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/06\/password05-300x170.jpg 300w, http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/06\/password05.jpg 614w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>You create a task, the task triggers the vbscript resetpassword.vbs. The vb script asks for a username and an e-mail address. The script will then generate a complex password (thanks to <a href=\"http:\/\/www.haverhoek.nl\/\">Martijn Haverhoek<\/a>). The new password will be sent in an e-mail to the specified e-mail address.<\/p>\n<p>You can download my scripts <a href=\"http:\/\/contoso.se\/blog\/wp-content\/uploads\/2010\/06\/password.zip\">here<\/a>.<\/p>\n<p>To get this to work in your environment you need to customize the scripts a bit. You first need to download the Service Manager cmdlets from <a href=\"http:\/\/smlets.codeplex.com\/\">Codeplex<\/a> and install them. In the resetpassword.vbs script you will need to change the domain LDAP path (around line 20), e-mail settings (around line 62), domain name (around line 82) and script paths (around line 90).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A common task for service desk is to reset an end-user password. A common scenario is that the operator has to fill in an incident form, start Active Directory Users and Computers console, find the user, reset the password, notify the password over the phone or send it in a e-mail to the end-user. There &hellip; <a href=\"http:\/\/contoso.se\/blog\/?p=1605\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[25],"tags":[],"_links":{"self":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1605"}],"collection":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1605"}],"version-history":[{"count":15,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1605\/revisions"}],"predecessor-version":[{"id":1625,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1605\/revisions\/1625"}],"wp:attachment":[{"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1605"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/contoso.se\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}