{"id":1421,"date":"2018-07-16T09:05:55","date_gmt":"2018-07-16T07:05:55","guid":{"rendered":"https:\/\/msb365.abstergo.ch\/?p=1421"},"modified":"2018-12-17T12:18:06","modified_gmt":"2018-12-17T10:18:06","slug":"automated-adfs-setup-with-wap-roles-for-exchange-and-skype","status":"publish","type":"post","link":"https:\/\/www.msb365.blog\/?p=1421","title":{"rendered":"Automated ADFS setup &#8211; with WAP roles for Exchange and Skype"},"content":{"rendered":"<p>It is already some time ago that I have posted a PowerShell script to the community. So I thought why not share one of the latest ones I have written.<\/p>\n<p>&nbsp;<\/p>\n<p>This time it is about installing ADFS. In the past I have written some articles about ADFS like: <a href=\"https:\/\/msb365.abstergo.ch\/?p=1289\" target=\"_blank\" rel=\"noopener\">MFA with MS Auth. App for OWA<\/a> and <a href=\"https:\/\/msb365.abstergo.ch\/?p=1260\" target=\"_blank\" rel=\"noopener\">Configuring ADFS for O365<\/a>. This Time I uploaded a script to the <a href=\"https:\/\/gallery.technet.microsoft.com\/Automated-ADFS-setup-with-595c04e2\" target=\"_blank\" rel=\"noopener\">Technet Gallery<\/a> with which we can install&nbsp;ADFS and the WAP, fast and easily .<\/p>\n<p>Here\u00b4s the way how to use the script:<\/p>\n<p>After you have downloaded and unpacked the script bundle from the Technet, you see 6 .ps1 files.<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-1422\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/1.png\" alt=\"\" width=\"462\" height=\"228\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/1.png 462w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/1-300x148.png 300w\" sizes=\"(max-width: 462px) 100vw, 462px\" \/><\/p>\n<p>The first one (00_) is just the function. This one you don\u2019t need to touch or run. It is just important, that all this six files are located in the same folder!<\/p>\n<p>In the next steps I will show you, how to use it.<\/p>\n<p>We start our setup with the 01_ file.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-1423\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/2.png\" alt=\"\" width=\"250\" height=\"92\"><\/p>\n<p>As you can see in the naming convention of the files, you know which script has to be run on which server and in which sequence.<\/p>\n<p>So let\u2019s start with the 01_ one\u2026<\/p>\n<p>After we have started our PowerShell command prompt on our ADFS server as administrator,<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-1424\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/3.png\" alt=\"\" width=\"704\" height=\"383\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/3.png 704w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/3-300x163.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/3-600x326.png 600w\" sizes=\"(max-width: 704px) 100vw, 704px\" \/><\/p>\n<p>We will be asked to enter a Bulk of variables.<\/p>\n<p>I know this is not the coolest part of this installation, but it has to be done \u2013 at least once\u2026<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1425\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/4.png\" alt=\"\" width=\"1325\" height=\"641\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/4.png 1325w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/4-300x145.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/4-768x372.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/4-1024x495.png 1024w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/4-600x290.png 600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/4-780x377.png 780w\" sizes=\"(max-width: 1325px) 100vw, 1325px\" \/><\/p>\n<p>Now we have done the longest part and as you see in the end, this server will reboot now\u2026<\/p>\n<p>Don\u2019t worry about the variables you have entred before the reboot. All this entries where saved in the root directory of the script we are running right now.&nbsp; Later, when we continue our setup on the WAP server we simply need to copy the whole folder to the target server, and all variables will be on the right place to.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1426\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/5.png\" alt=\"\" width=\"413\" height=\"132\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/5.png 413w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/5-300x96.png 300w\" sizes=\"(max-width: 413px) 100vw, 413px\" \/><\/p>\n<p>When the server has made the reboot, we go back to our script directory and we continue with the 02_ one.<\/p>\n<p><strong>NOTE<\/strong>: Be sure that you have installed the certificate on the ADFS server from which you have entered the Thumbprint in the variables before you continue with the setup!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1427\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/6.png\" alt=\"\" width=\"738\" height=\"408\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/6.png 738w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/6-300x166.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/6-600x332.png 600w\" sizes=\"(max-width: 738px) 100vw, 738px\" \/><\/p>\n<p>This part of the script installs and configures the ADFS service on the server:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1428\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/7.png\" alt=\"\" width=\"1042\" height=\"121\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/7.png 1042w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/7-300x35.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/7-768x89.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/7-1024x119.png 1024w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/7-600x70.png 600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/7-780x91.png 780w\" sizes=\"(max-width: 1042px) 100vw, 1042px\" \/><\/p>\n<p>When this is done, you can see, that the ADFS is installed suchessfully:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1429\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/8.png\" alt=\"\" width=\"394\" height=\"390\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/8.png 394w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/8-300x297.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/8-100x100.png 100w\" sizes=\"(max-width: 394px) 100vw, 394px\" \/><\/p>\n<p>Now we need to login to our WAP server. That we are able to install the right role and to connect to the ADFS you have to make some prequels. The post important thing is, to make sure, that the ADFS and WAP server can communicate with each other over the port 443. If this is not guaranteed, our setup will not be successful!<\/p>\n<p>It is also important that you have installed the certificates on the WAP server from which you have entered the Thumbprints in the variables!<\/p>\n<p>On the WAP server we copy the folder with the scripts, which we had downloaded on our ADFS server. Important is that you also copy the PersistentValues.cfg file!<\/p>\n<p>Now we are ready to run the next part of our scripts, the 03_ one.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1430\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/9.png\" alt=\"\" width=\"1095\" height=\"509\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/9.png 1095w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/9-300x139.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/9-768x357.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/9-1024x476.png 1024w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/9-600x279.png 600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/9-780x363.png 780w\" sizes=\"(max-width: 1095px) 100vw, 1095px\" \/><\/p>\n<p>This script starts with the setup of the WAP role.<\/p>\n<p>During the setup we will be asked to enter the password of our service user we have definated in our variables.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1431\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/10.png\" alt=\"\" width=\"1086\" height=\"712\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/10.png 1086w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/10-300x197.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/10-768x504.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/10-1024x671.png 1024w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/10-600x393.png 600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/10-780x511.png 780w\" sizes=\"(max-width: 1086px) 100vw, 1086px\" \/><\/p>\n<p>After the setup is done, this part of the script also generates a directory on the WAP server, where you can find the certificates.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1432\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/11.png\" alt=\"\" width=\"798\" height=\"153\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/11.png 798w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/11-300x58.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/11-768x147.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/11-600x115.png 600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/11-780x150.png 780w\" sizes=\"(max-width: 798px) 100vw, 798px\" \/><\/p>\n<p>To prove that all installed successfully, you can start the server manager on the WAP server and check if the role is installed:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1433\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/12.png\" alt=\"\" width=\"739\" height=\"531\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/12.png 739w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/12-300x216.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/12-600x431.png 600w\" sizes=\"(max-width: 739px) 100vw, 739px\" \/><\/p>\n<p>Now we need to go back to our ADFS server and start the next part of our scripts. The 04_ one is responsible to set the Exchange authentication relaying trust.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1434\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/13.png\" alt=\"\" width=\"873\" height=\"406\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/13.png 873w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/13-300x140.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/13-768x357.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/13-600x279.png 600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/13-780x363.png 780w\" sizes=\"(max-width: 873px) 100vw, 873px\" \/><\/p>\n<p>When this script is finished, we have installed our ADFS server.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1435\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/14.png\" alt=\"\" width=\"873\" height=\"281\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/14.png 873w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/14-300x97.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/14-768x247.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/14-600x193.png 600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/14-780x251.png 780w\" sizes=\"(max-width: 873px) 100vw, 873px\" \/><\/p>\n<p>As last task we need to go one more time back to our WAP server, here we run the 05_ part of our scripts. This one creates and sets the WAP rules for Exchange and Skype.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1436\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/15.png\" alt=\"\" width=\"1102\" height=\"120\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/15.png 1102w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/15-300x33.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/15-768x84.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/15-1024x112.png 1024w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/15-600x65.png 600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/15-780x85.png 780w\" sizes=\"(max-width: 1102px) 100vw, 1102px\" \/><\/p>\n<p>Now all our tasks are done and the environment is ready to use\u2026<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1437\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/16.png\" alt=\"\" width=\"1106\" height=\"270\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/16.png 1106w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/16-300x73.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/16-768x187.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/16-1024x250.png 1024w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/16-600x146.png 600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/16-780x190.png 780w\" sizes=\"(max-width: 1106px) 100vw, 1106px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>Download the Script <a href=\"https:\/\/gallery.technet.microsoft.com\/Automated-ADFS-setup-with-595c04e2\" target=\"_blank\" rel=\"noopener\">HERE<\/a> from the Microsoft Technet.<\/h2>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It is already some time ago that I have posted a PowerShell script to the community. So I thought why not share one of the latest ones I have written. &nbsp; This time it is about installing ADFS. In the past I have written some articles about ADFS like: MFA with MS Auth. App for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1438,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[4,2,3],"tags":[],"class_list":["post-1421","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-adfs","category-exchange","category-powershell"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/1421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1421"}],"version-history":[{"count":9,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/1421\/revisions"}],"predecessor-version":[{"id":2314,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/1421\/revisions\/2314"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/media\/1438"}],"wp:attachment":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}