{"id":5281,"date":"2019-10-07T17:00:33","date_gmt":"2019-10-07T15:00:33","guid":{"rendered":"https:\/\/www.razumny.no\/?p=5281"},"modified":"2019-09-25T15:13:31","modified_gmt":"2019-09-25T13:13:31","slug":"ad-change-upn","status":"publish","type":"post","link":"https:\/\/www.razumny.no\/?p=5281","title":{"rendered":"AD: Change UPN"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Depending on how things are being run, you may need to change the UPN (User Principal Name) of individual users in your Active Directory. One reason for doing so is to use a hybrid local\/Azure AD setup, where users use their email address for logging on to Azure, but their ordinary username to log on to the local domain. At any rate, here&#8217;s how to change the UPN of an individual user in Microsoft Active Directory:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Search for the user in AD<\/li><li>Right click and choose &#8220;Rename&#8221;<\/li><li>Change &#8220;User logon name&#8221; to the desired logon name<\/li><li>Click OK<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">That should see you sorted. Please note that changing User logon name will also change user logon name (pre-Windows 2000). If you need this to remain the same (e.g. because the user needs to be able to log in using their user name as well as the set UPN, you need to correct this.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Depending on how things are being run, you may need to change the UPN (User Principal Name) of individual users in your Active Directory. One reason for doing so is to use a hybrid local\/Azure AD setup, where users use their email address for logging on to Azure, but their ordinary username to log on [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-5281","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p2ukSU-1nb","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":5404,"url":"https:\/\/www.razumny.no\/?p=5404","url_meta":{"origin":5281,"position":0},"title":"PowerShell: Find all users in a specific OU","author":"Aleksander Nordgarden-R\u00f8dner","date":"24\/02\/2020","format":false,"excerpt":"One of my customers asked for an overview of the UPNs of all users in a specific OU. Having become fairly familiar with the Get-ADUser command, I decided to see if I couldn't make it do this, too. I knew that I would need to filter the results of the\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/www.razumny.no\/?cat=820"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4012,"url":"https:\/\/www.razumny.no\/?p=4012","url_meta":{"origin":5281,"position":1},"title":"Limit login to specific computers","author":"Aleksander Nordgarden-R\u00f8dner","date":"20\/03\/2017","format":false,"excerpt":"As much as we might want to prevent them by policies,\u00a0odds are that a shared user account will be created at some point. In order to mitigate the potential issues with such\u00a0accounts (lack of accountability, lack of control, account available to just about anyone to mention a few), there are\u2026","rel":"","context":"In &quot;How To&quot;","block_context":{"text":"How To","link":"https:\/\/www.razumny.no\/?cat=615"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.razumny.no\/wp-content\/uploads\/Logon-Workstations.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":5297,"url":"https:\/\/www.razumny.no\/?p=5297","url_meta":{"origin":5281,"position":2},"title":"Quickly check user logon time","author":"Aleksander Nordgarden-R\u00f8dner","date":"21\/10\/2019","format":false,"excerpt":"With surprising regularity, I need to check when a user last logged in. I recently found a command that returns this information; quser. Using it is simple enough; open a command prompt, enter the command, and hit return: Screenshot of a command line showing the results of the \"quser\" command\u2026","rel":"","context":"In &quot;How To&quot;","block_context":{"text":"How To","link":"https:\/\/www.razumny.no\/?cat=615"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.razumny.no\/wp-content\/uploads\/image-5.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.razumny.no\/wp-content\/uploads\/image-5.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.razumny.no\/wp-content\/uploads\/image-5.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":5459,"url":"https:\/\/www.razumny.no\/?p=5459","url_meta":{"origin":5281,"position":3},"title":"PowerShell: Check computer last logon date","author":"Aleksander Nordgarden-R\u00f8dner","date":"18\/05\/2020","format":false,"excerpt":"In a recently closed ticket, I had specified that the solution would be automatically applied upon reboot of a computer. As so often happens one of the twenty or so users affected by the solution emailed to say that it didn't work. Having dealt with said user before, I had\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/www.razumny.no\/?cat=820"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5442,"url":"https:\/\/www.razumny.no\/?p=5442","url_meta":{"origin":5281,"position":4},"title":"Look up AD User Password expiration date","author":"Aleksander Nordgarden-R\u00f8dner","date":"13\/04\/2020","format":false,"excerpt":"A little while ago, I had a user call in and ask when their password would expire. Luckily, this information is readily accessible if you know where - and how - to look. Here's how: Open a command promptEnter the command net user %USERNAME% \/domainRead the information from the results:\u2026","rel":"","context":"In &quot;How To&quot;","block_context":{"text":"How To","link":"https:\/\/www.razumny.no\/?cat=615"},"img":{"alt_text":"Screenshot of the result of the command net use %USERNAME% \/domain","src":"https:\/\/i0.wp.com\/www.razumny.no\/wp-content\/uploads\/image-14.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":5446,"url":"https:\/\/www.razumny.no\/?p=5446","url_meta":{"origin":5281,"position":5},"title":"Powershell: Retrieving all properties for a given user object","author":"Aleksander Nordgarden-R\u00f8dner","date":"20\/04\/2020","format":false,"excerpt":"I was asked to provide an overview of all available properties in an Active Directory user object for an upcoming project. As it turns out, that is very easily accomplished. Unsurprisingly, PowerShell has an applet for this. We use the Get-ADUser applet, with the parameters Identity to identify the user\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/www.razumny.no\/?cat=820"},"img":{"alt_text":"Output of get-aduser command, filtering on identity and specific proeprties","src":"https:\/\/i0.wp.com\/www.razumny.no\/wp-content\/uploads\/image-13.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.razumny.no\/wp-content\/uploads\/image-13.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.razumny.no\/wp-content\/uploads\/image-13.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.razumny.no\/wp-content\/uploads\/image-13.png?resize=700%2C400&ssl=1 2x"},"classes":[]}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.razumny.no\/index.php?rest_route=\/wp\/v2\/posts\/5281","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.razumny.no\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.razumny.no\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.razumny.no\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.razumny.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5281"}],"version-history":[{"count":3,"href":"https:\/\/www.razumny.no\/index.php?rest_route=\/wp\/v2\/posts\/5281\/revisions"}],"predecessor-version":[{"id":5285,"href":"https:\/\/www.razumny.no\/index.php?rest_route=\/wp\/v2\/posts\/5281\/revisions\/5285"}],"wp:attachment":[{"href":"https:\/\/www.razumny.no\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.razumny.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5281"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.razumny.no\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}