{"id":242,"date":"2020-10-22T22:17:57","date_gmt":"2020-10-22T21:17:57","guid":{"rendered":"http:\/\/localhost\/blog\/?p=242"},"modified":"2022-03-01T22:18:13","modified_gmt":"2022-03-01T22:18:13","slug":"add-upn-suffix-using-powershell","status":"publish","type":"post","link":"https:\/\/www.davidirwin.co.uk\/index.php\/2020\/10\/22\/add-upn-suffix-using-powershell\/","title":{"rendered":"Add UPN Suffix using Powershell"},"content":{"rendered":"<h2>Add UPN in Active Directory with PowerShell<\/h2>\n<p>The following steps will add an alternative UPN suffix in AD with PowerShell.<\/p>\n<p>Run PowerShell as administrator. Get a list of the UPN suffixes.<\/p>\n<p>It\u2019s not showing any UPN suffixes, this means that it\u2019s empty. We are going to use the\u00a0<strong>Set-ADforest cmdlet<\/strong>\u00a0to add the UPN suffix. Let\u2019s add the UPN suffix\u00a0<strong>osdoors.com<\/strong>.<span id=\"ezoic-pub-ad-placeholder-111\" class=\"ezoic-adpicker-ad\"><\/span><\/p>\n<div id=\"urvanov-syntax-highlighter-5f90caa791802276103989\" class=\"urvanov-syntax-highlighter-syntax crayon-theme-powershell-custom urvanov-syntax-highlighter-font-consolas urvanov-syntax-highlighter-os-pc print-yes notranslate\" data-settings=\" touchscreen minimize scroll-mouseover\">\n<div class=\"crayon-toolbar\" data-settings=\" show\">\n<div class=\"crayon-tools\">\n<div class=\"crayon-button urvanov-syntax-highlighter-nums-button\" title=\"Toggle Line Numbers\"><\/div>\n<\/div>\n<\/div>\n<div class=\"urvanov-syntax-highlighter-plain-wrap\"><\/div>\n<div class=\"urvanov-syntax-highlighter-main\">\n<table class=\"crayon-table\">\n<tbody>\n<tr class=\"urvanov-syntax-highlighter-row\">\n<td class=\"crayon-nums \" data-settings=\"hide\">\n<div class=\"urvanov-syntax-highlighter-nums-content\">\n<div class=\"crayon-num\" data-line=\"urvanov-syntax-highlighter-5f90caa791802276103989-1\"><\/div>\n<\/div>\n<\/td>\n<td class=\"urvanov-syntax-highlighter-code\">\n<div class=\"crayon-pre\">\n<div id=\"urvanov-syntax-highlighter-5f90caa791802276103989-1\" class=\"crayon-line\"><span class=\"crayon-sy\">[<\/span><span class=\"crayon-v\">PS<\/span><span class=\"crayon-sy\">]<\/span> <span class=\"crayon-v\">C<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-sy\">\\<\/span><span class=\"crayon-o\">&gt;<\/span><span class=\"crayon-v\">Get<\/span><span class=\"crayon-o\">&#8211;<\/span><span class=\"crayon-v\">ADForest<\/span> <span class=\"crayon-o\">|<\/span> <span class=\"crayon-e\">Set<\/span><span class=\"crayon-o\">&#8211;<\/span><span class=\"crayon-e\">ADForest<\/span> <span class=\"crayon-o\">&#8211;<\/span><span class=\"crayon-e\">UPNSuffixes<\/span> <span class=\"crayon-sy\">@<\/span><span class=\"crayon-sy\">{<\/span><span class=\"crayon-v\">add<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-s\">&#8220;osdoors.com&#8221;<\/span><span class=\"crayon-sy\">}<\/span><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>Confirm that the UPN suffix is added successfully.<\/p>\n<div id=\"urvanov-syntax-highlighter-5f90caa791805248700137\" class=\"urvanov-syntax-highlighter-syntax crayon-theme-powershell-custom urvanov-syntax-highlighter-font-consolas urvanov-syntax-highlighter-os-pc print-yes notranslate\" data-settings=\" touchscreen minimize scroll-mouseover\">\n<div class=\"crayon-toolbar\" data-settings=\" show\">\n<div class=\"crayon-tools\">\n<div class=\"crayon-button urvanov-syntax-highlighter-nums-button\" title=\"Toggle Line Numbers\"><\/div>\n<\/div>\n<\/div>\n<div class=\"urvanov-syntax-highlighter-plain-wrap\"><\/div>\n<div class=\"urvanov-syntax-highlighter-main\">\n<table class=\"crayon-table\">\n<tbody>\n<tr class=\"urvanov-syntax-highlighter-row\">\n<td class=\"crayon-nums \" data-settings=\"hide\">\n<div class=\"urvanov-syntax-highlighter-nums-content\">\n<div class=\"crayon-num\" data-line=\"urvanov-syntax-highlighter-5f90caa791805248700137-1\"><\/div>\n<div class=\"crayon-num\" data-line=\"urvanov-syntax-highlighter-5f90caa791805248700137-2\"><\/div>\n<div class=\"crayon-num\" data-line=\"urvanov-syntax-highlighter-5f90caa791805248700137-3\"><\/div>\n<\/div>\n<\/td>\n<td class=\"urvanov-syntax-highlighter-code\">\n<div class=\"crayon-pre\">\n<div id=\"urvanov-syntax-highlighter-5f90caa791805248700137-1\" class=\"crayon-line\"><span class=\"crayon-sy\">[<\/span><span class=\"crayon-v\">PS<\/span><span class=\"crayon-sy\">]<\/span> <span class=\"crayon-v\">C<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-sy\">\\<\/span><span class=\"crayon-o\">&gt;<\/span><span class=\"crayon-v\">Get<\/span><span class=\"crayon-o\">&#8211;<\/span><span class=\"crayon-v\">ADForest<\/span> <span class=\"crayon-o\">|<\/span> <span class=\"crayon-v\">Format<\/span><span class=\"crayon-o\">&#8211;<\/span><span class=\"crayon-e\">List <\/span><span class=\"crayon-e\">UPNSuffixes<\/span><\/div>\n<div id=\"urvanov-syntax-highlighter-5f90caa791805248700137-2\" class=\"crayon-line\"><\/div>\n<div id=\"urvanov-syntax-highlighter-5f90caa791805248700137-3\" class=\"crayon-line\"><span class=\"crayon-v\">UPNSuffixes<\/span> <span class=\"crayon-o\">:<\/span> <span class=\"crayon-sy\">{<\/span><span class=\"crayon-v\">osdoors<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-v\">com<\/span><span class=\"crayon-sy\">}<\/span><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Add UPN in Active Directory with PowerShell The following steps will add an alternative UPN suffix in AD with PowerShell. Run PowerShell as administrator. Get a list of the UPN suffixes. It\u2019s not showing any UPN suffixes, this means that it\u2019s empty. We are going to use the\u00a0Set-ADforest cmdlet\u00a0to add the UPN suffix. Let\u2019s add [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-242","post","type-post","status-publish","format-standard","hentry","category-windows-server"],"_links":{"self":[{"href":"https:\/\/www.davidirwin.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/242","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.davidirwin.co.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.davidirwin.co.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.davidirwin.co.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.davidirwin.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=242"}],"version-history":[{"count":1,"href":"https:\/\/www.davidirwin.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/242\/revisions"}],"predecessor-version":[{"id":243,"href":"https:\/\/www.davidirwin.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/242\/revisions\/243"}],"wp:attachment":[{"href":"https:\/\/www.davidirwin.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.davidirwin.co.uk\/index.php\/wp-json\/wp\/v2\/categories?post=242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.davidirwin.co.uk\/index.php\/wp-json\/wp\/v2\/tags?post=242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}