<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Mike Hendrickson</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/mhendric/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/mhendric/feed.xml</link>
    <description />
    <lastBuildDate>Tue, 16 Apr 2019 06:28:07 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Mike Hendrickson's Scripts and Tools</title>
      <link>https://docs.microsoft.com/archive/blogs/mhendric/mike-hendricksons-scripts-and-tools</link>
      <pubDate>Fri, 03 Mar 2017 16:42:00 GMT</pubDate>
      <dc:creator><![CDATA[Mike Hendrickson [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mhendric/?p=685</guid>
      <description><![CDATA[The following is a list of scripts and tools that Mike Hendrickson has created or collaborated...]]></description>
      <content:encoded><![CDATA[<div>


<p>The following is a list of scripts and tools that Mike Hendrickson has created or collaborated on.</p>
<p><br /></p>

<h2 class="auto-style1">General Windows Server Scripts and Tools</h2>
<h3>Get-FilteredLogContent.ps1</h3>
<p style="margin-left: 30px">
<a target="_blank" href="https://gallery.technet.microsoft.com/Get-FilteredLogContentps1-2513eae4">https://gallery.technet.microsoft.com/Get-FilteredLogContentps1-2513eae4</a><br />
Used to filter out log entries from one or more file paths on one or more target computers.<br /></p>

<h3>Get-PerfmonSummaryStats.ps1</h3>
<p style="margin-left: 30px">
<a target="_blank" href="https://gallery.technet.microsoft.com/Get-PerfmonSummaryStatsps1-73b096e5">https://gallery.technet.microsoft.com/Get-PerfmonSummaryStatsps1-73b096e5</a><br />
Used to gather summary statistics of performance counter data from one or more performance monitor .blg files, on one or more computers.Summary statistics for each counter include: Average, Maximum, Minimum, Sum, and Count. Groups and averages related counters into per file, per computer, and all computer groups.<br /></p>
<p><br /></p>

<h2 class="auto-style1">Exchange Server Specific Scripts and Tools</h2>
<h3>Add-TransportDatabaseMountPoint.ps1</h3>
<p style="margin-left: 30px">
<a target="_blank" href="https://gallery.technet.microsoft.com/Add-TransportDatabaseMountP-f0e559e6">https://gallery.technet.microsoft.com/Add-TransportDatabaseMountP-f0e559e6</a><br />
Creates a mount point for the Exchange Transport database, and assigns appropriate permissions for the Exchange Transport Service.<br /></p>

<h3>Get-ClientsFromRPCClientAccessLogs.ps1</h3>
<p style="margin-left: 30px">
<a target="_blank" href="https://gallery.technet.microsoft.com/Get-ClientsFromRPCClientAcc-a62c845a">https://gallery.technet.microsoft.com/Get-ClientsFromRPCClientAcc-a62c845a</a><br />
Parses the RPC Client Access logs of one or more Exchange 2010+ servers looking for a specific client operation type, and exports the found results to .CSV. Performs the search of each target computer in parallel. The target computers perform their log search locally, and then return the results to the machine Where-Object the script is executed from. This approach conserves memory on the script computer, and significantly speeds up the collection time.<br /></p>

<h3>Get-ExchangeDatabaseUsage.ps1</h3>
<p style="margin-left: 30px">
<a target="_blank" href="https://gallery.technet.microsoft.com/Get-ExchangeDatabaseUsageps-61cec9ad">https://gallery.technet.microsoft.com/Get-ExchangeDatabaseUsageps-61cec9ad</a><br />
Gathers usage and consumption statistics on Exchange Database and Mailbox Usage. Statistics focus on categories like mailbox counts, mailbox quotas, mailbox sizes, and database sizes. Each time the script is run, the following information is written to disk: Per Database statistics. Per Mailbox statistics. A database heat map, showing which databases are over or under provisioned. A mailbox move map, showing the required mailbox moves to reduce database heat.<br /></p>

<h3>Get-MailboxSizeInventory.ps1</h3>
<p style="margin-left: 30px">
<a target="_blank" href="https://gallery.technet.microsoft.com/Get-MailboxSizeInventoryps1-119560bc">https://gallery.technet.microsoft.com/Get-MailboxSizeInventoryps1-119560bc</a><br />
Gets an inventory of the sizes of all mailboxes in an Exchange 2010/2013/2016 environment, and saves the results to .CSV.<br /></p>

<h3>Get-RemoteExchangeSession.ps1</h3>
<p style="margin-left: 30px">
<a target="_blank" href="https://gallery.technet.microsoft.com/Get-RemoteExchangeSessionps-ec575a12">https://gallery.technet.microsoft.com/Get-RemoteExchangeSessionps-ec575a12</a><br />
Used to establish a Remote PowerShell session to Exchange with the same capabilities as Exchange Management Shell. Exchange Management tools must be installed on the machine using this module.<br /></p>

<h3>GetTransactionLogStats.ps1</h3>
<p style="margin-left: 30px">
<a target="_blank" href="https://gallery.technet.microsoft.com/office/GetTransactionLogStatsps1-3b530ac3">https://gallery.technet.microsoft.com/office/GetTransactionLogStatsps1-3b530ac3</a><br />
Used to collect and analyze Exchange transaction log generation statistics. Designed to be run as an hourly scheduled task, on the top of each hour. Can be run against one or more servers and databases.<br /></p>

<h3>HighItemFolders.ps1</h3>
<p style="margin-left: 30px">
<a target="_blank" href="https://gallery.technet.microsoft.com/scriptcenter/42fc40d2-46a8-4e48-b15c-f0ad23357739">https://gallery.technet.microsoft.com/scriptcenter/42fc40d2-46a8-4e48-b15c-f0ad23357739</a><br />
A script that can analyze folders on all versions, and determine if they were over their limit. It can be used against the entire organization, a single server, or a single database.<br /></p>

<h3>xExchange Module for PowerShell Desired State Configuration <span class="auto-style1">(Collaboration)</span></h3>
<p style="margin-left: 30px">
<a target="_blank" href="https://github.com/PowerShell/xExchange">https://github.com/PowerShell/xExchange</a><br />
<a target="_blank" href="https://www.powershellgallery.com/packages/xExchange/">https://www.powershellgallery.com/packages/xExchange/</a><br />
The xExchange module contains many DSC resources for configuring and managing Exchange 2013 and 2016 servers including individual server properties, databases, mount points, and Database Availability Groups.<br /></p>
</div>]]></content:encoded>
    </item>
    <item>
      <title>Quickly Finding Trends in Large Volumes of Performance Monitor Log Files</title>
      <link>https://docs.microsoft.com/archive/blogs/mhendric/quickly-finding-trends-in-large-volumes-of-performance-monitor-log-files</link>
      <pubDate>Thu, 17 Nov 2016 23:05:16 GMT</pubDate>
      <dc:creator><![CDATA[Mike Hendrickson [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mhendric/?p=555</guid>
      <description><![CDATA[I’ve spent a lot of time recently trying to troubleshoot performance problems with the...]]></description>
      <content:encoded><![CDATA[<div>


    <p>I’ve spent a lot of time recently trying to troubleshoot performance problems with the System drives in a 100+ Exchange Server 2013/2016 environment. As a result of a number of different factors, the System drives started failing much earlier than expected; about a year into their service life. This manifested itself in various ways, including very slow OS performance, disk failures for one or both disks in the mirror, and file and file system corruption. Once disks started to fail, some servers would get to a point where they would be unable to boot again after a reboot. Others seemed to operate fine, but would fail with corruption type errors when trying to apply Exchange Cumulative Updates, or other Hotfixes.</p>
<p>As a way to identify which servers were good and which had disks that were bad or failing, one approach I decided to take was using Performance Monitor, and looking at the Average and Maximum values for Disk read latency, write latency, and queuing. Specifically, I wanted to look at the &quot;Avg. Disk Sec/Read&quot;, &quot;Avg. Disk Sec/Write&quot;, and &quot;Avg. Disk Queue Length&quot; counters for LogicalDisk.</p>
<p>The biggest problem with doing this analysis was how to efficiently find problem counters in hundreds of PerfMon logs on hundreds of Exchange Servers, while being cognizant of the time that it took to process all those files, and the system resources (CPU, Memory, Network) used in the process. To solve this, I wrote a new PowerShell script, <a target="_blank" href="https://gallery.technet.microsoft.com/Get-PerfmonSummaryStatsps1-73b096e5">Get-PerfMonSummaryStats.ps1</a>.</p>
<p></p>

<h2>Get-PerfMonSummaryStats.ps1</h2>
<p>Get-PerfMonSummaryStats.ps1 is designed to look at one or more counters in one or more Performance Monitor .blg files spread across one or more computers. With each counter that is found, the range of sample values for that counter will be measured to obtain the Average, Maximum, Minimum, and Sum of values. These values can be used to quickly identify trends in large amounts of Performance Monitor .blg files, and determine which files may warrant further investigation.</p>
<p>The script can be run both locally or remotely, but is designed primarily to be run remotely against many machines at once. When run Remotely, each target machine is responsible for inspecting specified counters in one or more PerfMon files, and summarizing the results. Instead of sending back the raw counter data for all the counters that are found, only summaries are sent back to the machine where the script was executed. This greatly reduces the network requirements for doing a remote PerfMon analysis.</p>
<p>The output of the script is a variable which contains three members: CounterSummaries, ComputerSummaries, and FileSummaries. These variables are used to store groupings of counter measurements at the counter level, computer level, and file level:</p>
<ul>
    <li>
        <p>CounterSummaries: These contain groupings of all discovered measurements for each unique counter path. Each counter will only be listed once in this output.</p>
    </li>
    <li>
        <p>ComputerSummaries: These contain groupings of the counter measurements taken from all files on each computer. For each computer, a counter will only be displayed one time.</p>
    </li>
    <li>
        <p>FileSummaries: These are the counter measurements found in individual files for each computer. Similar counters will be displayed once for each counter in each file they were discovered in. </p>
    </li>
</ul>
<p></p>

<h2>Examples</h2>
<p>The following examples show how to analyze perfmon files, and manipulate the output variable from the script. To start with, I’m going to do a local log analysis against 29 perfmon files located in the D:\PerfLogs directory. These files were originally retrieved from two different Exchange Servers. I’m specifically asking for all LogicalDisk counters for all disks to be analyzed.</p>
<p>PS&gt; $stats = .\Get-PerfmonSummaryStats.ps1 -Path D:\PerfLogs\ -Counter &quot;\\*\LogicalDisk(*)\*&quot; -Verbose </p>
<p style="margin-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/1-StatCollectionPart1.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/2016/11/1-StatCollectionPart1.png" /></a><br /><a href="https://msdnshared.blob.core.windows.net/media/2016/11/1-StatCollectionPart2.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/2016/11/1-StatCollectionPart2.png" /></a></p>
<p>Next I’ll show the contents of the output variable. Note the CounterSummaries, ComputerSummaries, and FileSummaries members.</p>
<p>PS&gt; $stats | fl</p>
<p style="margin-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/2-StatsFL.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/2016/11/2-StatsFL.png" /></a></p>
<p>Here’s what the CounterSummaries member looks like. Note that no computers or files are listed in this output. These are the merged measurements for every counter found in every file on every computer.</p>
<p>PS&gt; $stats.CounterSummaries | ft</p>
<p style="margin-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/3-CounterSummaries.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/2016/11/3-CounterSummaries.png" /></a></p>
<p>Here’s what the ComputerSummaries member looks like. Notice that each counter shows up twice, once for each computer:</p>
<p>PS&gt; $stats.ComputerSummaries | ft</p>
<p style="margin-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/4-ComputerSummaries.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/2016/11/4-ComputerSummaries.png" /></a></p>
<p>Here’s what the FileSummaries look like. Notice that the same counter shows up many times, corresponding to each time they were found in a file.</p>
<p>PS&gt; $stats.FileSummaries | ft</p>
<p style="margin-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/5-FileSummaries.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/2016/11/5-FileSummaries.png" /></a></p>
<p>If I want to get a list of the unique counter paths found in the analysis, I can run:</p>
<p>PS&gt; $stats.CounterSummaries.CounterPath</p>
<p style="margin-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/6-CounterPathOnly.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/2016/11/6-CounterPathOnly.png" /></a></p>
<p>To look at specific counters, I can filter on CounterPath. In this example, I’m going to use wildcards to get Avg. Disk sec/Read and Avg. Disk sec/Write counters for all disks. I’m also sorting by the Maximum value:</p>
<p>PS&gt; $stats.CounterSummaries | Where-Object {$_.CounterPath -like &quot;*avg. disk sec*&quot;} | Sort-Object -Property Maximum -Descending | ft</p>
<p style="margin-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/7-CounterSummariesAvgDiskSec.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/2016/11/7-CounterSummariesAvgDiskSec.png" /></a></p>
<p>Avg. Disk Sec/Read for the C: drive jumps to the top of the list. Let’s get the files that have that counter, and sort by Maximum:</p>
<p>PS&gt; $stats.FileSummaries | Where-Object {$_.CounterPath -like &quot;\logicaldisk(c:)\avg. disk sec/read&quot;} | Sort-Object -Property Maximum -Descending | ft</p>
<p style="margin-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/8-FileSummariesAvgDiskSec.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/2016/11/8-FileSummariesAvgDiskSec.png" /></a></p>
<p>To get just the first file, I can use Select-Object:</p>
<p>PS&gt; $stats.FileSummaries | Where-Object {$_.CounterPath -like &quot;\logicaldisk(c:)\avg. disk sec/read&quot;} | Sort-Object -Property Maximum -Descending | Select-Object -First 1</p>
<p style="margin-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/9-TopFileSummary.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/2016/11/9-TopFileSummary.png" /></a></p>
<p>Alternately, if I just wanted to see which computer had the highest value, I can do the same thing in ComputerSummaries:</p>
<p>PS&gt; $stats.ComputerSummaries | Where-Object {$_.CounterPath -like &quot;\logicaldisk(c:)\avg. disk sec/read&quot;} | Sort-Object -Property Maximum -Descending | Select-Object -First 1</p>
<p style="margin-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/10-TopComputer.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/2016/11/10-TopComputer.png" /></a></p>
<p>Now I’m going to move onto a new analysis on the same files. This time I’m going to look at all Memory and Processor counters.</p>
<p>PS&gt; $stats = .\Get-PerfmonSummaryStats.ps1 -Path D:\PerfLogs\ -Counter &quot;\\*\Memory\*&quot;,&quot;\\*\Processor(*)\*&quot; -Verbose</p>
<p style="margin-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/10.5-GetMemoryAndProc.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/2016/11/10.5-GetMemoryAndProc.png" /></a></p>
<p>Here’s the counter paths discovered in the new analysis.</p>
<p>PS&gt; $stats.CounterSummaries.CounterPath</p>
<p style="margin-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/11-MemAndProcCounterPaths.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/2016/11/11-MemAndProcCounterPaths.png" /></a></p>
<p>Here’s how to get the total processor time spent on all computers, and sort by Maximum.</p>
<p>PS&gt; $stats.ComputerSummaries | Where-Object {$_.CounterPath -like &quot;\processor(_total)\% processor time&quot;} | Sort-Object Maximum -Descending</p>
<p style="margin-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/12-ComputersSortedByProc.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/2016/11/12-ComputersSortedByProc.png" /></a></p>
<p>Now I’ll grab the file that contained the highest value.</p>
<p>PS&gt; $stats.FileSummaries | Where-Object {$_.CounterPath -like &quot;\processor(_total)\% processor time&quot;} | Sort-Object Average -Descending | Select-Object -First 1</p>
<p style="margin-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/11/13-TopProcFile.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/2016/11/13-TopProcFile.png" /></a></p>
<h2>Conclusion</h2>
<p>I’ve found this script to save a lot of time, and make the job a lot easier when working with large amounts of performance monitor files. Hopefully you will find this useful as well.</p>
</div>]]></content:encoded>
    </item>
    <item>
      <title>Moving the Exchange Transport Database to a Mount Point</title>
      <link>https://docs.microsoft.com/archive/blogs/mhendric/moving-the-exchange-transport-database-to-a-mount-point</link>
      <pubDate>Tue, 11 Oct 2016 21:15:03 GMT</pubDate>
      <dc:creator><![CDATA[Mike Hendrickson [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mhendric/?p=215</guid>
      <description><![CDATA[This is my first blog post in quite some time. I have a number of PowerShell scripts and tools...]]></description>
      <content:encoded><![CDATA[<div>


<p>This is my first blog post in quite some time. I have a number of PowerShell scripts and tools that I’ve developed over the past year which I’ve been meaning to share. Starting with this script, I’m going to start posting them on <a href="https://github.com/mhendric/PowerShell">my personal GitHub repository</a>, and blogging about them here on my TechNet blog.</p>
<p></p>

<h2>DISCLAIMER</h2>
<p>The process and script described in this post is not officially supported by Microsoft. I have tested the procedure to work with Exchange 2013 and 2016, and have afterwards tested upgrading to Exchange 2013 CU14 and Exchange 2016 CU3 after applying these changes. While this script should work without issue, I highly recommend testing it yourself before introducing into a production environment.</p>

<h2>Overview</h2>
<p>I recently came across an issue with one of my customers where the Operating System drive on their Exchange 2013 servers had too much load on it, in part because the Exchange Transport Database was located in the default location on the Operating System drive. This issue was identified by consistently high values for both read latency (Avg. Disk sec/read), as well as disk queueing (Avg. Disk Queue Length).</p>
<p>To try to reduce some of the load on the Operating System drive, we decided to move the Transport Database to a new, dedicated disk. After consulting TechNet, we came across the following article on how to accomplish this:</p>
<p style="margin-left: 30px">Change the location of the queue database<br /><a href="https://technet.microsoft.com/en-us/library/bb125177(v=exchg.150).aspx">https://technet.microsoft.com/en-us/library/bb125177(v=exchg.150).aspx</a></p>
<p>While reviewing the instructions, we noticed the following disclaimer:</p>
<p style="margin-left: 30px">Any customized per-server settings you make in Exchange XML application configuration files, for example, web.config files on Client Access servers or the EdgeTransport.exe.config file on Mailbox servers, will be overwritten when you install an Exchange Cumulative Update (CU). Make sure that you save this information so you can easily re-configure your server after the install. You must re-configure these settings after you install an Exchange CU.</p>
<p>Essentially what this says is that any time a Cumulative Update is applied, you would lose the changes made in the Transport config file, and as such, would have to remember to update the Transport config. </p>
<p>As a way to avoid having to change the Transport Database path after each Cumulative Update, we came up with the idea of using a Mount Point, which would be located at the default Transport Database location of ‘C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Queue’. That way we could move the Transport Database to a different disk, but as far as Exchange is concerned, it would still be at the default location. This would prevent us from having to do any changes to the Transport config file.</p>
<p></p>

<h2>Automating Setup of the Transport Database Mount Point</h2>
<p><strong>Script Location: </strong><a target="_blank" href="https://github.com/mhendric/Add-TransportDatabaseMountPoint">Add-TransportDatabaseMountPoint.ps1</a></p>
<p></p>
<p>After reviewing and testing the steps required to setup this Mount Point, I decided to write a PowerShell script to accomplish the task, as the customer in question had over 100 servers that needed to be modified.</p>
<p>The script takes the following actions:</p>
<ul>
    <li>
        <p>Creates a new partition on a specified disk number.</p>
    </li>
    <li>
        <p>Removes permissions that don't need to be on the Mount Point folder, or Mount Point itself.</p>
    </li>
    <li>
        <p>Adds required permissions to the Mount Point folder and Mount Point. Specifically, it gives Full Control permissions to SYSTEM, NETWORK SERVICE, and Local Administrators.</p>
    </li>
    <li>
        <p>Stops the Microsoft Exchange Transport service, and the Microsoft Exchange Health Manager service (to prevent it from starting the Transport service back up).</p>
    </li>
    <li>
        <p>Moves any existing Transport database files to a temporary location.</p>
    </li>
    <li>
        <p>Adds a Mount Point to the new partition.</p>
    </li>
    <li>
        <p>Moves the existing Transport database files to the Mount Point.</p>
    </li>
    <li>
        <p>Starts the Microsoft Exchange Transport service, and the Microsoft Exchange Health Manager service.</p>
    </li>
    <li>
        <p>Pre-creates the ‘System Volume Information’ folder underneath the Mount Point if it doesn’t already exist.</p>
    </li>
    <li>
        <p>Gives SYSTEM, NETWORK SERVICE, and BUILTIN\Administrators permissions to the System Volume Information folder underneath the Mount Point.</p>
    </li>
</ul>
<p>The script will only take action if required. If nothing has been configured for the Mount Point yet, the script output will look as follows:</p>
<p style="margin-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/10/TMP-CommandOutput-FirstRun.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/2016/10/TMP-CommandOutput-FirstRun.png" /></a></p>
<p>If the script has already been successfully run, output will be minimal:</p>
<p style="margin-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/10/TMP-CommandOutput-SecondRun.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/2016/10/TMP-CommandOutput-SecondRun.png" /></a></p>
<p></p>

<h2>Lessons Learned</h2>
<p>I hit a couple issues while trying to figure out how to correctly put the Transport Database within a Mount Point that are worth noting.</p>
<p></p>

<h3>Lesson 1: Set permissions on the folder AND the Mount Point</h3>
<p>The first issue that I encountered while trying to create this script was where to set appropriate permissions. By looking at the existing Queue folder, I knew that SYSTEM, NETWORK SERVICE, and BUILTIN\Administrators were supposed to have Full Control on the folder. In my first attempt, I added these permissions to the new Queue folder after a Mount Point was added. After doing so, the Transport Service failed to start. In research, I found that not only do you have to add permissions to the Mount Point folder, but you also have to add permissions to the volume itself.</p>
<p>Below is what the Security looks like on the properties of the ‘C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Queue’ folder after setting up the Mount Point:</p>
<p style="margin-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/10/TMP-QueuePermissions.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/2016/10/TMP-QueuePermissions.png" /></a></p>
<p>If you go to the General tab, you can click on Properties to get to properties of the Mount Point itself:</p>
<p style="margin-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/10/TMP-QueueProps.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/2016/10/TMP-QueueProps.png" /></a></p>
<p>This will take you to the General properties of the Mount Point:</p>
<p style="margin-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/10/TMP-VolumeProps.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/2016/10/TMP-VolumeProps.png" /></a></p>
<p>If you go to Security here, you can set permissions on the Mount Point itself:</p>
<p style="margin-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/10/TMP-VolumeSecurity.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/2016/10/TMP-VolumeSecurity.png" /></a></p>
<p></p>

<h3>Lesson 2: Cumulative Updates need permissions to the System Volume Information folder</h3>
<p>The other major issue I encountered was in regards to applying Cumulative Updates. When testing in my lab, I used the script to setup the new Mount Point, made sure the services started just fine, and then tried to do a Cumulative Update. I did this with both Exchange 2013 and 2016, and the CU’s for both succeeded. We then used this script to move the Transport database to a new location on an entire DAG in my customer’s environment. A week later, they tried to apply the latest Cumulative Update for Exchange 2016, which failed in the ‘Mailbox Role: Mailbox service’ step with error:</p>
<p style="margin-left: 30px">Microsoft.Exchange.Management.Deployment.ExsetdataException: An error occurred with error code &#039;3221684229&#039; and message &#039;Access is denied.&#039;.</p>
<p>Here&#039;s a screenshot of the error within Setup:</p>
<p style="margin-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/10/TMP-Setup-Error.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/2016/10/TMP-Setup-Error.png" /></a></p>
<p>After doing some research, I found that this could occur if the account running setup does not have permissions to the hidden ‘System Volume Information’ folder within the root of a volume, which only SYSTEM has access to by default. The reason my testing did not catch this is because this folder is not created until after a reboot. The script was adjusted to pre-create the folder, which will cause it to inherit the permissions that were already set on the Mount Point and volume. If the folder already exists, it will check that appropriate permissions are present.</p>
<p>To check if the System Volume Information folder exists or has the right permissions, first go to Folder Options, and verify that &#039;Show hidden files, folders, and drives&#039; is checked, and &#039;Hide protected operating system files&#039; is unchecked.</p>
<p style="margin-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/10/TMP-ShowProtected.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/2016/10/TMP-ShowProtected.png" /></a></p>
<p>After setting these Folder Options, you should see the System Volume Information folder in the Queue, as well as $RECYCLE.BIN.</p>
<p style="margin-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/10/TMP-QueueContentsWithHidden.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/2016/10/TMP-QueueContentsWithHidden.png" /></a></p>
<p>Go to properties of System Volume Information to set the appropriate security.</p>
<p style="margin-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2016/10/TMP-SysVolSecurity.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/2016/10/TMP-SysVolSecurity.png" /></a></p>
</div>]]></content:encoded>
    </item>
    <item>
      <title>Deploying and Configuring Exchange 2013 Using DSC - An End to End Example</title>
      <link>https://docs.microsoft.com/archive/blogs/mhendric/deploying-and-configuring-exchange-2013-using-dsc-an-end-to-end-example</link>
      <pubDate>Wed, 13 May 2015 15:07:00 GMT</pubDate>
      <dc:creator><![CDATA[Mike Hendrickson [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mhendric/2015/05/13/deploying-and-configuring-exchange-2013-using-dsc-an-end-to-end-example/</guid>
      <description><![CDATA[Just last week, I had the privilege of presenting at Microsoft Ignite 2015. The topic of my...]]></description>
      <content:encoded><![CDATA[<div><link href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/Styles2.css" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/Styles2.css" rel="stylesheet" />
<p>Just last week, I had the privilege of presenting at Microsoft Ignite 2015. The topic of my presentation was how to deploy and configure Exchange 2013 using DSC. Specifically, I talked about how to perform the Exchange specific phases of an end to end Exchange deployment, including automating Jetstress, installing Exchange, and performing server, DAG, database, and mount point configuration. I also talked about some lessons learned while using DSC to deploy and configure Exchange in a large scale environment for one of my customers.</p>
<p>If you are interested in checking out this presentation, the recording and slide deck is available here:</p>
<p style="margin-left:30px;">Automating Microsoft Exchange Server 2013 Configuration with PowerShell Desired State Configuration<br /><a href="https://channel9.msdn.com/events/ignite/2015/BRK3150">https://channel9.msdn.com/events/ignite/2015/BRK3150</a></p>
<p>The demo scripts I used are attached to the slide deck, which is available in the above link. You can also download the demo files directly here:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/BRK3150-Demo-Files.zip" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/BRK3150_2D00_Demo_2D00_Files.zip">BRK3150-Demo-Files.zip</a></p>
<p>Hope you find this useful!</p>
</div>]]></content:encoded>
    </item>
    <item>
      <title>Installing Exchange Using DSC - Managing Exchange 2013 With DSC - Part 5</title>
      <link>https://docs.microsoft.com/archive/blogs/mhendric/installing-exchange-using-dsc-managing-exchange-2013-with-dsc-part-5</link>
      <pubDate>Thu, 18 Dec 2014 06:48:00 GMT</pubDate>
      <dc:creator><![CDATA[Mike Hendrickson [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mhendric/2014/12/18/installing-exchange-using-dsc-managing-exchange-2013-with-dsc-part-5/</guid>
      <description><![CDATA[Managing Exchange 2013 With DSC
Part 1 - Introducing xExchange
Part 2 - The QuickStart...]]></description>
      <content:encoded><![CDATA[<div><link href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/Styles2.css" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/Styles2.css" rel="stylesheet" />
<h1><span style="color:#2e74b5;">Managing Exchange 2013 With DSC</span></h1>
<p><a href="/b/mhendric/archive/2014/10/17/managing-exchange-2013-with-dsc-part-1-introducing-xexchange.aspx">Part 1 - Introducing xExchange</a></p>
<p><a href="/b/mhendric/archive/2014/10/17/managing-exchange-2013-with-dsc-part-2-the-quickstart-template.aspx">Part 2 - The QuickStart Template</a></p>
<p><a href="/b/mhendric/archive/2014/10/27/managing-exchange-2013-with-dsc-part-3-automating-mount-point-setup-and-maintenance-for-autoreseed.aspx">Part 3 - Automating Mount Point Setup and Maintenance for AutoReseed</a></p>
<p><a href="/b/mhendric/archive/2014/11/10/managing-exchange-2013-with-dsc-part-4-using-a-dsc-pull-server-to-deploy-the-xexchange-module.aspx">Part 4 - Using a DSC Pull Server to Deploy the xExchange Module</a></p>
<p>Part 5 - Installing Exchange Using DSC</p>
<p>&nbsp;</p>
<h1>Installing Exchange Using DSC</h1>
<p>Hey Everyone. Sorry for the lack of updates in this blog series lately. We&#39;ve been busy working on a major update to the <strong>xExchange</strong> module, which includes the ability to install Exchange, as well as to automate Jetstress (separate blog post coming soon). As a reminder, you can download the latest version of <strong>xExchange</strong> from the PowerShell Gallery <a href="https://www.powershellgallery.com/packages/xExchange/">here</a>.</p>
<p>For this post, I&#39;ll be talking about using Desired State Configuration to automate the installation of Exchange 2013 with the new <strong>xExchInstall</strong> resource. I&#39;ll cover how to use the resource, why the resource does what it does, and how to monitor and troubleshoot the resource.</p>
<p>&nbsp;</p>
<h1>The xExchInstall Resource</h1>
<p>The <strong>xExchInstall</strong> resource is relatively simple to configure, as it only contains three parameters, all of which are required (see <a href="https://technet.microsoft.com/en-us/library/aa997281(v=exchg.150).aspx">this article</a> for help installing Exchange using unattended mode):</p>
<ul>
<li>
<p><strong>Path</strong>: This is the full path to setup.exe in the Exchange 2013 setup directory.</p>
</li>
<li>
<p><strong>Arguments</strong>: These are the command line arguments to pass into setup.exe. They are used the same as if you were calling setup.exe from the Command Prompt.</p>
</li>
<li>
<p><strong>Credential</strong>: These are the credentials used to perform the installation.</p>
</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;Here&#39;s a simple example of how to use the resource:</p>
<pre><span style="color:#000000;">xExchInstall InstallExchange
{
    Path       </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">C:\Binaries\E15CU7\Setup.exe</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
    Arguments  </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">/mode:Install /role:Mailbox,ClientAccess /Iacceptexchangeserverlicenseterms</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
    Credential </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$Creds</span><span style="color:#000000;">
}</span></pre>
<p>&nbsp;</p>
<p>Using the resource like this would be equivalent to going in the Exchange setup directory with Command Prompt, and running:</p>
<p style="margin-left:30px;">setup /mode:Install /role:Mailbox,ClientAccess /Iacceptexchangeserverlicenseterms&quot;</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/InstallExchange-SetupFromCommandLine.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/InstallExchange_2D00_SetupFromCommandLine.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/InstallExchange-SetupFromCommandLine.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/InstallExchange_2D00_SetupFromCommandLine.PNG" /></a></p>
<p>&nbsp;</p>
<h1>Using xExchInstall In A Script</h1>
<p>For this example, I&#39;m using a slightly modified version of the <strong>InstallExchange</strong> example which ships with <strong>xExchange</strong> (as of v1.0.3.6). This is located in the <strong>xExchange</strong> module folder underneath <strong>Examples\InstallExchange</strong>.</p>
<pre><span style="color:#000000;">Configuration InstallExchange
{
    </span><span style="color:#0000ff;">param</span><span style="color:#000000;">
    (
        [</span><span style="color:#008080;">PSCredential</span><span style="color:#000000;">]</span><span style="color:#800080;">$Creds</span><span style="color:#000000;">
    )

    Import-DscResource -Module xExchange
    Import-DscResource -Module xPendingReboot

    Node </span><span style="color:#800080;">$AllNodes</span><span style="color:#000000;">.NodeName
    {
        LocalConfigurationManager
        {
            CertificateId      </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$Node</span><span style="color:#000000;">.Thumbprint
        }

        xPendingReboot BeforeExchangeInstall
        {
            Name      </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">BeforeExchangeInstall</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
        }

        xExchInstall InstallExchange
        {
            Path       </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">C:\Binaries\E15CU7\Setup.exe</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
            Arguments  </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">/mode:Install /role:Mailbox,ClientAccess /Iacceptexchangeserverlicenseterms</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
            Credential </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$Creds</span><span style="color:#000000;">

            DependsOn  </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">[xPendingReboot]BeforeExchangeInstall</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
        }

        xPendingReboot AfterExchangeInstall
        {
            Name      </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">AfterExchangeInstall</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">

            DependsOn </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">[xExchInstall]InstallExchange</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
        }
    }
}</span></pre>
<p>The only thing to really note here is that I chose to use the <strong>xPendingReboot</strong> module/resource (<a href="https://gallery.technet.microsoft.com/scriptcenter/xPendingReboot-PowerShell-b269f154">download here</a>) to see if reboots are pending both before and after the installation of Exchange. The one before the installation isn&#39;t necessarily required, but can help the Exchange installation process to run more smoothly. I definitely recommend using the <strong>xPendingReboot</strong> after the install, as a reboot is almost always required after applying an Exchange 2013 Cumulative Update. If you want to use the same <strong>xPendingReboot</strong> resources in your script, you will need to make sure to download <strong>xPendingReboot</strong> and put in in the <strong>C:\Program Files\WindowsPowerShell\Modules</strong> directory.</p>
<p>&nbsp;</p>
<h1>Script Execution Behavior</h1>
<p>When the script is successfully executed, the <strong>xExchInstall</strong> resource will behave in one of two different ways. Either it will proceed all the way through, and won&#39;t require a reboot until after Exchange is installed (see Behavior 2), or it will want to reboot the server before Exchange setup has even begun (Behavior 1). These behaviors are independent from reboots that may be caused by the <strong>xPendingReboot</strong> resources.</p>
<p>&nbsp;</p>
<h2>Behavior 1</h2>
<p>The first behavior I&#39;ll describe is the most common behavior I&#39;ve seen so far. This is the behavior that people running Windows Management Framework 4 should see (WMF5 is <strong>NOT CURRENTLY SUPPORTED</strong> with Exchange 2013). When you execute the script in Verbose mode, you&#39;ll see Verbose output similar to the following:</p>
<p style="margin-left:30px;">[[xExchInstall]InstallExchange] Entering function &#39;Test-TargetResource&#39;. Notable parameters: Arguments = &#39;/mode:Install /role:Mailbox,ClientAccess /Iacceptexchangeserverlicenseterms&#39;, Path = &#39;C:\Binaries\E15CU7\Setup.exe&#39;<br /> [[xExchInstall]InstallExchange] Exchange is either not installed, or a previous install only partially completed.<br /> [[xExchInstall]InstallExchange] in 1.7030 seconds.<br /> [[xExchInstall]InstallExchange]<br /> [[xExchInstall]InstallExchange] Entering function &#39;Set-TargetResource&#39;. Notable parameters: Arguments = &#39;/mode:Install /role:Mailbox,ClientAccess /Iacceptexchangeserverlicenseterms&#39;, Path = &#39;C:\Binaries\E15CU7\Setup.exe&#39;<br /> <span style="background-color:yellow;">[[xExchInstall]InstallExchange] Value &#39;UpdatedConfig&#39; missing from registry key HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WSMAN. Running: winrm i restore winrm/config<br /> [[xExchInstall]InstallExchange] Machine needs to be rebooted before Exchange setup can proceed</span><br /> [[xExchInstall]InstallExchange] in 1.8030 seconds.</p>
<p>What&#39;s happening here is that <strong>xExchInstall</strong> has detected that certain WSMan registry keys are not present, has decided to configure WSMan using the command &#39;<strong>winrm i restore winrm/config</strong>&#39;, and is waiting for a reboot to occur before starting the install. Once the machine has been rebooted, the installation should begin automatically.</p>
<p>The reason this pre-configuration of WinRM occurs is to prevent an issue which can occur later in Exchange setup. During setup, Exchange checks for the presence of a few registry keys to determine if WinRM is configured correctly. If any of those keys are missing, setup runs &#39;<strong>winrm i restore winrm/config</strong>&#39;, then attempts to restart the WinRM service. Because a DSC configuration is actively running, the stop of the WinRM service fails, which then causes Exchange setup to fail. To pre-empt this condition, <strong>xExchInstall</strong> looks for these registry keys itself, and if they&#39;re missing or not configured, runs the above winrm command before Exchange setup has a chance to try.</p>
<p>Here&#39;s a full screenshot of this behavior:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/InstallExchange-FirstScriptRunPreReboot.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/InstallExchange_2D00_FirstScriptRunPreReboot.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/InstallExchange-FirstScriptRunPreReboot.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/InstallExchange_2D00_FirstScriptRunPreReboot.PNG" /></a></p>
<p>&nbsp;</p>
<h2>Behavior 2</h2>
<p>The less common behavior is for <strong>xExchInstall</strong> to go through the whole setup process, and not require a reboot at all (the <strong>xPendingReboot</strong> resource may still force a reboot after setup has completed). This would occur if you manually ran &#39;<strong>winrm i restore winrm/config</strong>&#39; prior to the install, or possibly if you had WMF5 installed (again, WMF5 is <strong>NOT CURRENTLY SUPPORTED</strong> with Exchange 2013).</p>
<p>With this behavior, <strong>xExchInstall</strong> will launch <strong>Setup.exe</strong> (which then launches <strong>ExSetup.exe</strong>), and then will report to the screen every minute that setup is still running until it has completed:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/InstallExchange-FirstScriptRunNoRebootReqd.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/InstallExchange_2D00_FirstScriptRunNoRebootReqd.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/InstallExchange-FirstScriptRunNoRebootReqd.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/InstallExchange_2D00_FirstScriptRunNoRebootReqd.PNG" /></a></p>
<p>&nbsp;</p>
<h1>Monitoring Install Progress</h1>
<p>If you are installing Exchange using a DSC pull server, or if you experience <strong>Behavior 1</strong> from above, it can be difficult to tell exactly what is happening with the <strong>xExchInstall</strong> resource. The following are different approaches you can use to determine if Exchange setup is running, and if it has encountered any issues.</p>
<p>&nbsp;</p>
<h2>Look for the ExSetup.exe Process</h2>
<p>One way to determine if setup is running is to log on to the machine where Exchange is being installed, and look for the <strong>ExSetup.exe</strong> process in Task Manager:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/InstallExchange-ExSetupProcessRunning.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/InstallExchange_2D00_ExSetupProcessRunning.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/InstallExchange-ExSetupProcessRunning.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/InstallExchange_2D00_ExSetupProcessRunning.PNG" /></a></p>
<p>&nbsp;</p>
<p>You could also use the <strong>Get-Process</strong> cmdlet to inspect whether the <strong>ExSetup.exe</strong> process exists on a remote machine:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/InstallExchange-GetSetupProcess.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/InstallExchange_2D00_GetSetupProcess.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/InstallExchange-GetSetupProcess.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/InstallExchange_2D00_GetSetupProcess.PNG" /></a></p>
<p>&nbsp;</p>
<h2>Look in the Exchange Setup Logs</h2>
<p>As with troubleshooting any Exchange Setup issue, another place you can look is the <strong>C:\ExchangeSetupLogs</strong> folder. In <strong>ExchangeSetup.log</strong>, you can see the exact status of the install, and determine whether it is currently running, or whether it failed or succeeded.</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/InstallExchange-SetupLogs.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/InstallExchange_2D00_SetupLogs.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/InstallExchange-SetupLogs.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/InstallExchange_2D00_SetupLogs.PNG" /></a></p>
<p>&nbsp;</p>
<h2>Use the xDscDiagnostics Module</h2>
<p>Another way to determine what <strong>xExchInstall</strong> is doing is to use the <strong>xDscDiagnostics</strong> module <a href="https://gallery.technet.microsoft.com/scriptcenter/xDscDiagnostics-PowerShell-abb6bcaa">(download here)</a>. <a href="https://blogs.msdn.com/b/powershell/archive/2014/02/11/dsc-diagnostics-module-analyze-dsc-logs-instantly-now.aspx">This blog</a> does a great job explaining how to use the module.</p>
<p>After downloading and installing the module, the first thing you&#39;ll want to do is enable Analytic logging using the <strong>Update-xDscEventLogStatus</strong> cmdlet. This must be done prior to running the script to install Exchange:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/InstallExchange-UpdatexDscEventLogStatus1.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/InstallExchange_2D00_UpdatexDscEventLogStatus1.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/InstallExchange-UpdatexDscEventLogStatus1.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/InstallExchange_2D00_UpdatexDscEventLogStatus1.PNG" /></a></p>
<p>&nbsp;</p>
<p>After you&#39;ve started the script containing <strong>xExchInstall</strong>, use <strong>Get-xDscOperation</strong> to find the appropriate SequenceId (for me it was always Id 1):</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/InstallExchange-GetxDscOperation.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/InstallExchange_2D00_GetxDscOperation.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/InstallExchange-GetxDscOperation.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/InstallExchange_2D00_GetxDscOperation.PNG" /></a></p>
<p>&nbsp;</p>
<p>Once you&#39;ve located the correct SequenceId, use <strong>Trace-xDscOperation</strong> to see all events:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/InstallExchange-TracexDscOperation1.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/InstallExchange_2D00_TracexDscOperation1.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/InstallExchange-TracexDscOperation1.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/InstallExchange_2D00_TracexDscOperation1.PNG" /></a></p>
<p>&nbsp;</p>
<p>You can use the .Message property of the <strong>Trace-xDscOperation</strong> output variable to make it easier to see the Verbose output that was logged:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/InstallExchange-TracexDscOperation2.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/InstallExchange_2D00_TracexDscOperation2.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/InstallExchange-TracexDscOperation2.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/InstallExchange_2D00_TracexDscOperation2.PNG" /></a></p>
<p>&nbsp;</p>
<p>After you&#39;re done troubleshooting, make sure to turn logging back off:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/InstallExchange-UpdatexDscEventLogStatus2.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/InstallExchange_2D00_UpdatexDscEventLogStatus2.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/InstallExchange-UpdatexDscEventLogStatus2.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/InstallExchange_2D00_UpdatexDscEventLogStatus2.PNG" /></a></p>
</div>]]></content:encoded>
    </item>
    <item>
      <title>Listen To Us Talk About xExchange</title>
      <link>https://docs.microsoft.com/archive/blogs/mhendric/listen-to-us-talk-about-xexchange</link>
      <pubDate>Wed, 03 Dec 2014 07:30:30 GMT</pubDate>
      <dc:creator><![CDATA[Mike Hendrickson [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mhendric/2014/12/03/listen-to-us-talk-about-xexchange/</guid>
      <description><![CDATA[Along with Jason Walker, a PFE at Microsoft and co-developer of xExchange, I was recently a guest...]]></description>
      <content:encoded><![CDATA[<div><link href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/Styles2.css" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/Styles2.css" rel="stylesheet" />
<p>Along with Jason Walker, a PFE at Microsoft and co-developer of xExchange, I was recently a guest on the <a href="https://powershell.org/wp/powerscripting-podcast/">PowerScripting Podcast</a>. We were invited on to talk about the xExchange module, and using it to configure Exchange Server 2013. The topics covered should be interesting to both DSC Resource developers, as well as DSC consumers. We cover the development process that we went through to create the initial 20+ resources. We then talk about how the majority of xExchange resources map to existing Exchange Server cmdlets, and how they should be easy to understand and consume for those familiar with the Exchange Management Shell. If this sounds interesting to you, you can download the podcast from the following site:</p>
<p style="margin-left:30px;">Episode 289 &ndash; PowerScripting Podcast &ndash; Mike Hendrickson and Jason Walker from Microsoft on Configuring Exchange With DSC<br /><a href="https://powershell.org/wp/2014/11/30/episode-289-powerscripting-podcast-mike-hendrickson-and-jason-walker-from-microsoft-on-configuring-exchange-with-dsc/">https://powershell.org/wp/2014/11/30/episode-289-powerscripting-podcast-mike-hendrickson-and-jason-walker-from-microsoft-on-configuring-exchange-with-dsc/</a></p>
<p>Thanks!</p>
</div>]]></content:encoded>
    </item>
    <item>
      <title>Using a DSC Pull Server to Deploy the xExchange Module - Managing Exchange 2013 With DSC - Part 4</title>
      <link>https://docs.microsoft.com/archive/blogs/mhendric/using-a-dsc-pull-server-to-deploy-the-xexchange-module-managing-exchange-2013-with-dsc-part-4</link>
      <pubDate>Mon, 10 Nov 2014 08:55:00 GMT</pubDate>
      <dc:creator><![CDATA[Mike Hendrickson [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mhendric/2014/11/10/using-a-dsc-pull-server-to-deploy-the-xexchange-module-managing-exchange-2013-with-dsc-part-4/</guid>
      <description><![CDATA[Managing Exchange 2013 With DSC
Part 1 - Introducing xExchange
Part 2 - The QuickStart...]]></description>
      <content:encoded><![CDATA[<div><link href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/Styles2.css" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/Styles2.css" rel="stylesheet" />
<h1><span style="color:#2e74b5;">Managing Exchange 2013 With DSC</span></h1>
<p><a href="/b/mhendric/archive/2014/10/17/managing-exchange-2013-with-dsc-part-1-introducing-xexchange.aspx">Part 1 - Introducing xExchange</a></p>
<p><a href="/b/mhendric/archive/2014/10/17/managing-exchange-2013-with-dsc-part-2-the-quickstart-template.aspx">Part 2 - The QuickStart Template</a></p>
<p><a href="/b/mhendric/archive/2014/10/27/managing-exchange-2013-with-dsc-part-3-automating-mount-point-setup-and-maintenance-for-autoreseed.aspx">Part 3 - Automating Mount Point Setup and Maintenance for AutoReseed</a></p>
<p>Part 4 - Using a DSC Pull Server to Deploy the xExchange Module</p>
<p><a href="/b/mhendric/archive/2014/12/16/installing-exchange-using-dsc-managing-exchange-2013-with-dsc-part-5.aspx">Part 5 - Installing Exchange Using DSC</a></p>
<p>&nbsp;</p>
<h1>Using a DSC Pull Server to Deploy the xExchange Module</h1>
<p>For this post, I&rsquo;m going to cover how to deploy a configuration utilizing the <strong>xExchange</strong> module via a DSC pull server. The steps I will be covering are mostly based on the below article. I will just be expanding on concepts that I thought needed a little more explanation, and talking about portions that may be different when working with Exchange.</p>
<p style="margin-left:30px;">Windows PowerShell Desired State Configuration Pull Servers<br /><a href="https://technet.microsoft.com/en-us/library/dn249913.aspx">https://technet.microsoft.com/en-us/library/dn249913.aspx</a></p>
<p>&nbsp;</p>
<h1>Test Servers</h1>
<p>I will be referencing two different test servers in this blog post. I will show how to execute all the steps directly on the pull server, as I expect most people would rather configure their Exchange servers remotely from a central location than from multiple locations. The two test servers are:</p>
<ul>
<li>
<p><strong>DSCPULL-1</strong>: A Windows Server 2012 machine which will be setup as a DSC pull server</p>
</li>
<li>
<p><strong>E15-1</strong>: An Exchange 2013 server</p>
</li>
</ul>
<p>Note that most of the documentation on pull servers that I&#39;ve found covers setting them up on Windows Server 2012 R2. I&rsquo;m going to demonstrate setting one up on Windows Server 2012, as I hit some issues trying to get it to work that are worth sharing (these issues have been reported, and will be fixed soon).</p>
<p>&nbsp;</p>
<h1>Sample Scripts</h1>
<p>The scripts that are used in the examples in this post are included in <a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/PullServerScripts.zip" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/PullServerScripts.zip"><strong>PullServerScripts.zip</strong></a>. I will be extracting the contents of the zip to C:\DSCScripts on my pull server, DSCPULL-1, but they could go in any location.</p>
<p>&nbsp;</p>
<h1>Pull Server Prerequisites</h1>
<p>The following components will need to be installed or downloaded onto the DSC pull server:</p>
<ul>
<li>
<p><a href="https://www.microsoft.com/en-us/download/details.aspx?id=40855">Windows Management Framework 4</a></p>
</li>
<li>
<p>Internet Information Services</p>
</li>
<li>
<p><a href="https://gallery.technet.microsoft.com/xPSDesiredStateConfiguratio-417dc71d">xPSDesiredStateConfiguration</a></p>
</li>
<li>
<p><a href="https://www.powershellgallery.com/packages/xExchange/">xExchange (Optional)</a></p>
</li>
</ul>
<p>&nbsp;</p>
<h1>Installing Pull Server Prerequisites</h1>
<h2>Windows Management Framework 4</h2>
<p>Installing WMF 4 is pretty straightforward. All you need to do is download the package for the appropriate version of Windows, and double click it to start the installation.</p>
<p>&nbsp;</p>
<h2>Internet Information Services</h2>
<p>The TechNet article on DSC pull servers does mention that IIS is a prerequisite, but doesn&rsquo;t state specifically which components need to be installed. That being the case, I tried, and was successful, at just choosing the defaults options for IIS.</p>
<p>Using the Add Roles and Features Wizard, you first want to check the &lsquo;Web Server (IIS)&rsquo; role:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-IIS-Check-Web-Server.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_IIS_2D00_Check_2D00_Web_2D00_Server.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-IIS-Check-Web-Server.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_IIS_2D00_Check_2D00_Web_2D00_Server.PNG" /></a></p>
<p>&nbsp;</p>
<p>When prompted, choose that you want to include management tools:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-IIS-Include-Mgmt-Tools.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_IIS_2D00_Include_2D00_Mgmt_2D00_Tools.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-IIS-Include-Mgmt-Tools.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_IIS_2D00_Include_2D00_Mgmt_2D00_Tools.PNG" /></a></p>
<p>&nbsp;</p>
<p>You shouldn&rsquo;t need to add any additional Role Services underneath Web Server. These are the default options that were selected for me:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-IIS-Options1.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_IIS_2D00_Options1.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-IIS-Options1.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_IIS_2D00_Options1.PNG" /></a><br /> <a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-IIS-Options2.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_IIS_2D00_Options2.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-IIS-Options2.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_IIS_2D00_Options2.PNG" /></a></p>
<p>&nbsp;</p>
<h2>xPSDesiredStateConfiguration</h2>
<p>After extracting the zip file for <strong>xPSDesiredStateConfiguration</strong>, copy the <strong>xPSDesiredStateConfiguration</strong> folder to <strong>&lsquo;C:\Program Files\WindowsPowerShell\Modules</strong>&rsquo;:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-ModulesFolder-WithxPSDSC.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_ModulesFolder_2D00_WithxPSDSC.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-ModulesFolder-WithxPSDSC.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_ModulesFolder_2D00_WithxPSDSC.PNG" /></a></p>
<p>&nbsp;</p>
<p>One thing worth mentioning is that for the copy of <strong>xPSDesiredStateConfiguration</strong> I downloaded (v3.0.2.0), all the folders and files were Read Only by default. If you plan on modifying any of the sample scripts, you may want to uncheck Read Only at the root folder:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-ReadOnly-xPSDSC.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_ReadOnly_2D00_xPSDSC.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-ReadOnly-xPSDSC.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_ReadOnly_2D00_xPSDSC.PNG" /></a></p>
<p>&nbsp;</p>
<h2>xExchange (Optional)</h2>
<p>On my pull server, I chose to copy the extracted <strong>xExchange</strong> module to the <strong>&lsquo;C:\Program Files\WindowsPowerShell\Modules&rsquo;</strong> directory as well. This isn&rsquo;t a requirement, but will make it easier to write <strong>xExchange</strong> based configuration scripts directly on the pull server, as the Powershell ISE will be able to recognize the Exchange resources. After copying over the <strong>xExchange</strong> module, I now have two modules in the Modules directory:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-ModulesFolder-WithBoth.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_ModulesFolder_2D00_WithBoth.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-ModulesFolder-WithBoth.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_ModulesFolder_2D00_WithBoth.PNG" /></a></p>
<p>&nbsp;</p>
<h2>Windows Update (Optional)</h2>
<p>After installing all of the above features and components, I highly recommend running Windows Update to make sure the server is completely up to date.</p>
<p>&nbsp;</p>
<h1>Preparing a Certificate</h1>
<p>Now that the pull server prerequisites have been installed, the next thing that needs to be done is to obtain a certificate. The certificate will be used for two things:</p>
<ol>
<li>
<p>Securing communications between the DSC pull server and target computers</p>
</li>
<li>
<p>Encrypting credentials that will be passed to <strong>xExchange</strong> resources.</p>
</li>
</ol>
<p>&nbsp;If you wanted, you could use two separate certificates for this, but I&rsquo;m going to just use a single certificate for both.</p>
<p>&nbsp;</p>
<h2>Requesting the Certificate</h2>
<p>There&rsquo;s a ton of different ways out there to get a certificate, so I&rsquo;m just going to cover an easy to use method which I already have setup in my lab. In the lab, I have one of my Domain Controllers configured with Active Directory Certificate Services, and installed as an Enterprise Root CA. With this setup, I can easily request a certicate using the Certificates snap-in in the mmc and sending the request directly to my CA.</p>
<p>On DSCPULL-1, I&rsquo;m going to open up mmc, go to &#39;Add/Remove Snap-in&#39;, and choose the Certificates snap-in:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-1.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_1.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-1.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_1.PNG" /></a></p>
<p>&nbsp;</p>
<p>After hitting add, it asks what object the snap-in will manage certificates for. The certificate needs to be stored in the Personal store of the Local Computer, so I&rsquo;m going to choose &lsquo;Computer account&rsquo;:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-2.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_2.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-2.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_2.PNG" /></a></p>
<p>&nbsp;</p>
<p>Next I&#39;ll choose &lsquo;Local computer&rsquo;:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-3.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_3.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-3.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_3.PNG" /></a></p>
<p>&nbsp;</p>
<p>Once the snap-in is opened, the first thing I want to do is request a certificate. To do this, I will right click on the Personal store, choose &lsquo;All Tasks&rsquo;, and &lsquo;Request New Certificate&rsquo;:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-4.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_4.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-4.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_4.PNG" /></a></p>
<p>&nbsp;</p>
<p>I only have a single Certificate Enrollment Policy, so I can hit Next again:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-6.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_6.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-6.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_6.PNG" /></a></p>
<p>&nbsp;</p>
<p>Now I need to choose the certificate type that I&#39;d like to request. I&rsquo;ve experimented with using both a Computer or a Workstation certificate for DSC, and both work. Since the Computer template is available with a default CA installation, I will choose Computer.</p>
<p>Before hitting Enroll, I need to expand Details, and go to Properties on the certificate so I can complete some extra fields:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-7.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_7.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-7.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_7.PNG" /></a></p>
<p>&nbsp;</p>
<p>Within the certificate properties, the first thing I&rsquo;m going to do is go to the Subject tab, and add in a <strong>Common name</strong> of PSDSCPullServer. This matches the <strong>EndpointName</strong> we will use later in <strong>Sample_xDscWebServices.ps1</strong>, the the script to setup IIS to host a DSC pull server:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-8.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_8.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-8.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_8.PNG" /></a></p>
<p>&nbsp;</p>
<p>On the Private Key tab, I&rsquo;m going to check the box to make the private key exportable, as we&rsquo;ll need to export a copy of the Private Key and import it in the Personal store of each target computer that will be configured.</p>
<p>After checking this box, I&rsquo;m going to hit OK to close out the Properties, and then Enroll to request the certificate:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-9.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_9.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-9.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_9.PNG" /></a></p>
<p>&nbsp;</p>
<p>After hitting Enroll, I now see the requested certificate in the Personal store:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-10.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_10.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-10.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_10.PNG" /></a></p>
<p>&nbsp;</p>
<h2>Exporting the Private and Public Key</h2>
<p>Now I&rsquo;m going to export the certificate twice, once with just the Public key, and once with the Private key. The Public key export will be used by the DSC pull server to encrypt credentials. The Private key will be imported in each target node, and will be used to decrypt credentials when configurations are applied.</p>
<p>&nbsp;</p>
<h3>Exporting the Private Key</h3>
<p>First I&rsquo;m going to export the Private key. To do this, I right click on the certificate, go to All Tasks, and choose Export:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-11.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_11.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-11.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_11.PNG" /></a></p>
<p>&nbsp;</p>
<p>Next I&#39;ll choose &#39;Yes, export the private key&#39;:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-13.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_13.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-13.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_13.PNG" /></a></p>
<p>&nbsp;</p>
<p>In the Export options, I&rsquo;m going to choose to &lsquo;Include all certificates in the certificate path if possible&rsquo;, and &lsquo;Export all extended properties&rsquo;:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-14.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_14.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-14.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_14.PNG" /></a></p>
<p>&nbsp;</p>
<p>Since this is a Private key export, I have to specify a means to secure the export file. I&rsquo;m going to use a Password:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-15.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_15.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-15.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_15.PNG" /></a></p>
<p>&nbsp;</p>
<p>Now I&rsquo;ll specify the name and location of the export file, c:\privatekey.pfx, and hit Next, then Finish:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-16.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_16.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-16.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_16.PNG" /></a></p>
<p>&nbsp;</p>
<h3>Exporting the Public Key</h3>
<p>Now we need to export the Public key. The initial steps to perform the export are the same as exporting a Private key. When I get to this screen, I want to choose to &#39;not export the private key&#39;:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-18.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_18.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-18.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_18.PNG" /></a></p>
<p>&nbsp;</p>
<p>I&rsquo;ll choose to DER encode the .CER file:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-19.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_19.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-19.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_19.PNG" /></a></p>
<p>&nbsp;</p>
<p>For the export location, I&rsquo;m going to choose c:\publickey.cer, then hit Next and Finish:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-20.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_20.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-20.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_20.PNG" /></a></p>
<p>&nbsp;</p>
<p>I now have two certificate exports:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-21.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_21.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-21.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_21.PNG" /></a></p>
<p>&nbsp;</p>
<h2>Making Note of the Certificate Thumbprint</h2>
<p>The final thing I need to do within the Certificates snap-in is make note of the certificate&rsquo;s thumbprint. To do this, I&rsquo;m going to go to properties of the certificate. On the Details tab, scroll down to the Thumbprint property:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-22.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_22.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-22.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_22.PNG" /></a></p>
<p>&nbsp;</p>
<p>IMPORTANT: It is important to note that you probably don&rsquo;t want to copy/paste the Thumbprint directly out of certificate properties. Doing so copies some additional Unicode characters which will break your DSC configuration scripts. Instead I recommend opening notepad separately and just manually typing in the Thumbprint as you see it. For more information, see the very end of <a href="/b/mhendric/archive/2014/10/17/managing-exchange-2013-with-dsc-part-2-the-quickstart-template.aspx">this post</a>.</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-23.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_23.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-RequestCert-23.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_RequestCert_2D00_23.PNG" /></a></p>
<p>&nbsp;</p>
<h2>Remotely Importing the Private Key on Target Computers</h2>
<p>Now that I have a certificate, I need to import the private key on each target computer, which in this case is just E15-1. There are a variety of methods to do this, so I&#39;m going to choose a method that allows me to initiate a remote import from a central location.</p>
<p>The following commands are included in the example script, <strong>RemotelyImportCert.ps1</strong>.What this script does is copy the private key export over to E15-1, then remotely execute Import-PfxCertificate on E15-1. The password being requested is the password that was specified during the private key export:</p>
<pre style="margin-left:30px;font-size:13px;"><span style="color:#5f9ea0;font-weight:bold;">copy</span><span style="color:#000000;"> </span><span style="color:#800000;">c:\privatekey.pfx</span><span style="color:#000000;"> </span><span style="color:#800000;">\\e15-1\c$</span><span style="color:#000000;">
</span><span style="color:#800080;">$password</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">Read-Host</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-style:italic;">-AsSecureString</span><span style="color:#000000;">
</span><span style="color:#5f9ea0;font-weight:bold;">Invoke-Command</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-style:italic;">-ComputerName</span><span style="color:#000000;"> </span><span style="color:#800000;">e15-1</span><span style="color:#000000;">  </span><span style="color:#5f9ea0;font-style:italic;">-ArgumentList</span><span style="color:#000000;"> </span><span style="color:#800080;">$password</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-style:italic;">-ScriptBlock</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">`</span><span style="color:#000000;">
    {Import-PfxCertificate -CertStoreLocation Cert:\LocalMachine\My -FilePath C:\privatekey.pfx -Password </span><span style="color:#800080;">$args</span><span style="color:#000000;">[0]}</span></pre>
<p>&nbsp;</p>
<h1>Creating the Pull Server</h1>
<p>Now that the I have all the prerequisites ready, it&#39;s time to setup the pull server. To do this I&#39;m going to modify an example config script that ships with <strong>xPSDesiredStateConfiguration</strong>, <strong>Sample_xDscWebServices.ps1</strong>, which should be located in the module within the<strong> &#39;xPSDesiredStateConfiguration\Examples&#39;</strong> folder. I&#39;m going to copy the file to <strong>&#39;C:\DSCScripts&#39;</strong>.</p>
<p>&nbsp;</p>
<h2>Sample_xDscWebServices.ps1 (Modified)</h2>
<pre><span style="color:#000000;">configuration Sample_xDscWebService
{
    </span><span style="color:#0000ff;">param</span><span style="color:#000000;"> 
    (
        [</span><span style="color:#008080;">string</span><span style="color:#000000;">[]]</span><span style="color:#800080;">$NodeName</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">localhost</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">,

        [ValidateNotNullOrEmpty()]
        [</span><span style="color:#008080;">string</span><span style="color:#000000;">] </span><span style="color:#800080;">$certificateThumbPrint</span><span style="color:#000000;">
    )

    Import-DSCResource -ModuleName xPSDesiredStateConfiguration

    Node </span><span style="color:#800080;">$NodeName</span><span style="color:#000000;">
    {
        WindowsFeature DSCServiceFeature
        {
            Ensure </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Present</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
            Name   </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">DSC-Service</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">            
        }

        xDscWebService PSDSCPullServer
        {
            Ensure                  </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Present</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
            EndpointName            </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">PSDSCPullServer</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
            Port                    </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#000000;">8080</span><span style="color:#000000;">
            PhysicalPath            </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">$env:SystemDrive\inetpub\wwwroot\PSDSCPullServer</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
            CertificateThumbPrint   </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$certificateThumbPrint</span><span style="color:#000000;">         
            ModulePath              </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">$env:PROGRAMFILES\WindowsPowerShell\DscService\Modules</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
            ConfigurationPath       </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">$env:PROGRAMFILES\WindowsPowerShell\DscService\Configuration</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">            
            State                   </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Started</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
            DependsOn               </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">[WindowsFeature]DSCServiceFeature</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">                        
        }

        xDscWebService PSDSCComplianceServer
        {
            Ensure                  </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Present</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
            EndpointName            </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">PSDSCComplianceServer</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
            Port                    </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#000000;">9080</span><span style="color:#000000;">
            PhysicalPath            </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">$env:SystemDrive\inetpub\wwwroot\PSDSCComplianceServer</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
            CertificateThumbPrint   </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">AllowUnencryptedTraffic</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
            State                   </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Started</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
            IsComplianceServer      </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$true</span><span style="color:#000000;">
            DependsOn               </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> @(</span><span style="color:#800000;">&quot;</span><span style="color:#800000;">[WindowsFeature]DSCServiceFeature</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">,</span><span style="color:#800000;">&quot;</span><span style="color:#800000;">[xDSCWebService]PSDSCPullServer</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">)
        }
    }
}

Sample_xDscWebService -certificateThumbPrint c9586647cc93a3fac8791ded121bc68a03c7fa87
Start-DscConfiguration -Verbose -Wait -Path .\Sample_xDscWebService -ComputerName </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">localhost</span><span style="color:#800000;">&quot;</span></pre>
<p>&nbsp;</p>
<p>I only made two changes to <strong>Sample_xDscWebServices.ps1</strong>, which was adding the two lines at the end of the script:</p>
<ul>
<li>
<p>The first line compiles the script, and passes in the thumbprint of the certificate that was created earlier</p>
</li>
<li>
<p>The second line executes the configuration, and configures IIS for use as a pull server</p>
</li>
</ul>
<p>&nbsp;</p>
<p>After successfully executing the script, I see the following output:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-CreatePullServer-ScriptOutput1.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_CreatePullServer_2D00_ScriptOutput1.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-CreatePullServer-ScriptOutput1.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_CreatePullServer_2D00_ScriptOutput1.PNG" /></a><br /> <a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-CreatePullServer-ScriptOutput2.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_CreatePullServer_2D00_ScriptOutput2.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-CreatePullServer-ScriptOutput2.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_CreatePullServer_2D00_ScriptOutput2.PNG" /></a></p>
<p>&nbsp;</p>
<h2>WINDOWS 2012 ONLY</h2>
<p><strong>EDIT (12/18/14)</strong>: This issue was resolved in version 3.0.3.0 of <strong>xPSDesiredStateConfiguration</strong>. If you run into this issue, make sure to download the latest version of the module.</p>
<p>Here&#39;s the one place that I had to diverge from the TechNet instructions to get the pull server to work with Windows 2012. Note that this issue has been reported as a bug, and should be fixed in the next release of <strong>xPSDesiredStateConfiguration</strong>. I found the solution to this by following <a href="https://stackoverflow.com/questions/24252635/powershell-dsc-pull-server-throws-internal-error-microsoft-isam-esent-interop">this stackoverflow post</a>.</p>
<p>Essentially the problem is that the <strong>xDscWebService</strong> resource which is included in <strong>xPSDesiredStateConfiguration</strong> (v3.0.2.0) registers a database provider that is only available in Windows 2012 R2. To fix this, we need to edit the web.config file which is located in<strong> &#39;C:\inetpub\wwwroot\PSDSCPullServer&#39;</strong> (the <strong>PhysicalPath</strong> property in <strong>Sample_xDscWebServices.ps1</strong>):</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-EditWebConfig.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_EditWebConfig.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-EditWebConfig.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_EditWebConfig.PNG" /></a></p>
<p>&nbsp;</p>
<p>Open the web.config file in Notepad. Find the following lines:</p>
<p style="margin-left:30px;font-size:13px;">&lt;add key=&quot;dbprovider&quot; value=&quot;ESENT&quot; /&gt;<br /> &lt;add key=&quot;dbconnectionstr&quot; value=&quot;C:\Program Files\WindowsPowerShell\DscService\Devices.edb&quot; /&gt;</p>
<p>&nbsp;</p>
<p>Replace them with:</p>
<p style="margin-left:30px;font-size:13px;">&lt;add key=&quot;dbprovider&quot; value=&quot;System.Data.OleDb&quot; /&gt;<br /> &lt;add key=&quot;dbconnectionstr&quot; value=&quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\WindowsPowerShell\DscService\Devices.mdb;&quot;/&gt;</p>
<p>&nbsp;</p>
<p>Finally, you&#39;ll need to restart the server, or at a minimum restart IIS for the changes to take effect.</p>
<p>&nbsp;</p>
<h1>Preparing the xExchange Module for Deployment</h1>
<p>Now I need to prepare the <strong>xExchange</strong> module for deployment to target nodes. Without doing this step, the target nodes will not have a local copy of <strong>xExchange</strong> to work with when they try to execute their configuration.</p>
<p>To set this up, I&#39;m going to copy the downloaded <strong>xExchange</strong> module to the path specified in <strong>ModulePath</strong> in <strong>Sample_xDscWebServices.ps1</strong>. This is <strong>&#39;C:\Program Files\WindowsPowerShell\DscServices\Modules&#39;</strong>. Instead of putting the extracted module in this folder though, we&#39;re going to drop the zip file exactly as it was downloaded from TechNet. Essentially it needs to be in the format <strong>MODULENAME_#.#.#.#.zip</strong>, where #.#.#.# is the module version.</p>
<p>Here&#39;s a couple screenshots that show what it should look like:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-xExchangeZip1.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_xExchangeZip1.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-xExchangeZip1.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_xExchangeZip1.PNG" /></a></p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-xExchangeZip2.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_xExchangeZip2.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-xExchangeZip2.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_xExchangeZip2.PNG" /></a></p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-xExchangeZip3.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_xExchangeZip3.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-xExchangeZip3.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_xExchangeZip3.PNG" /></a></p>
<p>&nbsp;</p>
<p>Now I need to generate a checksum file for all modules (which for me is just <strong>xExchange</strong>) in <strong>&#39;C:\Program Files\WindowsPowerShell\DscServices\Modules&#39;</strong>. To do this, I&#39;m going to run the following command:</p>
<pre><span style="color:#000000;">New-DscCheckSum -ConfigurationPath </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">C:\Program Files\WindowsPowerShell\DscServices\Modules</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">`</span><span style="color:#000000;">
    -OutPath </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">C:\Program Files\WindowsPowerShell\DscServices\Modules</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> -Verbose -Force</span></pre>
<p>&nbsp;</p>
<p>After doing this, a checksum file shows up in the same Modules folder:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-ChecksumModuleFiles.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_ChecksumModuleFiles.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-ChecksumModuleFiles.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_ChecksumModuleFiles.PNG" /></a></p>
<p>&nbsp;</p>
<h1>Preparing Configuration Scripts for Target Servers</h1>
<h2>Generating a Unique GUID for Each Target Server</h2>
<p>Before we can setup a configuration script, we must first generate a unique GUID for each target server. This GUID will be used to name the target MOF file for each computer, and also when configuring the Local Configuration Manager on the target node to tell it which configuration to retrieve.</p>
<p>For every server that will be configured, we&#39;ll want to run the following command to generate a GUID:</p>
<pre><span style="color:#000000;">[</span><span style="color:#008080;">Guid</span><span style="color:#000000;">]::</span><span style="color:#8b4513;">NewGuid</span><span style="color:#000000;">().</span><span style="color:#8b4513;">ToString</span><span style="color:#000000;">()</span></pre>
<p>&nbsp;</p>
<p>The output will look similar to the following. Make sure to save the GUID somewhere for later use.</p>
<p style="margin-left:30px;font-size:13px;">3f5452c9-aa68-4494-b94d-70f4c92b28a7</p>
<p>&nbsp;</p>
<h2>Setting Up the Exchange Configuration Script</h2>
<p>The next configuration script we need to setup is the script that will be used for configuring Exchange. For this, I am going to start with the <strong>QuickStartTemplate</strong> described in <a href="/b/mhendric/archive/2014/10/17/managing-exchange-2013-with-dsc-part-2-the-quickstart-template.aspx">this post</a>. The example is located in the <strong>xExchange\Examples\QuickStartTemplate</strong> folder of the <strong>xExchange</strong> module.</p>
<p>To avoid confusion, I&#39;m going to copy the two template files to a new location, and rename them. The original files are <strong>QuickStartTemplate.ps1</strong> and <strong>QuickStartTemplate-Config.psd1</strong>. I&#39;m going to copy these to <strong>C:\DSCScripts</strong>, and rename them to <strong>ConfigureExchange.ps1</strong> and <strong>ConfigureExchange-Config.psd1</strong>.</p>
<p>&nbsp;</p>
<p>Renamed but otherwise unmodified, the two configuration files look as follows:</p>
<p>&nbsp;</p>
<h3>ConfigureExchange.ps1 (Unmodified)</h3>
<pre><span style="color:#000000;">Configuration QuickStartTemplate
{
    </span><span style="color:#0000ff;">param</span><span style="color:#000000;">
    (
        [</span><span style="color:#008080;">PSCredential</span><span style="color:#000000;">]</span><span style="color:#800080;">$ShellCreds</span><span style="color:#000000;">
    )

    Import-DscResource -Module xExchange

    Node </span><span style="color:#800080;">$AllNodes</span><span style="color:#000000;">.NodeName
    {
        </span><span style="color:#008000;">#</span><span style="color:#008000;">Used when passing credentials securely. This configures the thumbprint of the </span><span style="color:#008000;">
</span><span style="color:#000000;">        </span><span style="color:#008000;">#</span><span style="color:#008000;">cert that will be used to decrypt the creds</span><span style="color:#008000;">
</span><span style="color:#000000;">        LocalConfigurationManager
        {
            CertificateId </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$Node</span><span style="color:#000000;">.Thumbprint
        }
    }
}

</span><span style="color:#008000;">#</span><span style="color:#008000;">Get credentials if they haven&#39;t already been passed</span><span style="color:#008000;">
</span><span style="color:#0000ff;">if</span><span style="color:#000000;"> (</span><span style="color:#800080;">$ShellCreds</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800080;">$null</span><span style="color:#000000;">)
{
    </span><span style="color:#800080;">$ShellCreds</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">Get-Credential</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-style:italic;">-Message</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">Enter credentials for establishing Remote Powershell sessions to Exchange</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
}

</span><span style="color:#008000;">#</span><span style="color:#008000;">##Compiles the example</span><span style="color:#008000;">
</span><span style="color:#000000;">QuickStartTemplate -ConfigurationData </span><span style="color:#800080;">$PSScriptRoot</span><span style="color:#000000;">\QuickStartTemplate-Config.psd1 -ShellCreds </span><span style="color:#800080;">$ShellCreds</span></pre>
<p>&nbsp;</p>
<h3>ConfigureExchange-Config.psd1 (Unmodified)</h3>
<pre><span style="color:#000000;">@{
    AllNodes </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> @(
        </span><span style="color:#008000;">#</span><span style="color:#008000;">Settings under &#39;NodeName = *&#39; apply to all nodes.</span><span style="color:#008000;">
</span><span style="color:#000000;">        @{
            NodeName        </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">*</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">

            </span><span style="color:#008000;">#</span><span style="color:#008000;">CertificateFile and Thumbprint are used for securing credentials. See:</span><span style="color:#008000;">
</span><span style="color:#000000;">            </span><span style="color:#008000;">#</span><span style="color:#008000;">https://blogs.msdn.com/b/powershell/archive/2014/01/31/want-to-secure-credentials-in-windows-powershell-desired-state-configuration.aspx</span><span style="color:#008000;">
</span><span style="color:#000000;">            
            </span><span style="color:#008000;">#</span><span style="color:#008000;">The location on the compiling machine of the public key export of the certfificate which will be used to encrypt credentials</span><span style="color:#008000;">
</span><span style="color:#000000;">            CertificateFile </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">C:\publickey.cer</span><span style="color:#800000;">&#39;</span><span style="color:#000000;"> 

            </span><span style="color:#008000;">#</span><span style="color:#008000;">Thumbprint of the certificate being used for encrypting credentials</span><span style="color:#008000;">
</span><span style="color:#000000;">            Thumbprint      </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">39bef4b2e82599233154465323ebf96a12b60673</span><span style="color:#800000;">&#39;</span><span style="color:#000000;"> 
        }

        </span><span style="color:#008000;">#</span><span style="color:#008000;">Individual target nodes are defined next</span><span style="color:#008000;">
</span><span style="color:#000000;">        @{
            NodeName </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">e15-1</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
        }

        @{
            NodeName </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">e15-2</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
        }
    );
}</span></pre>
<p>&nbsp;</p>
<p>Now I&#39;ll make the following modifications:</p>
<p>&nbsp;</p>
<h3>ConfigureExchange.ps1 (Modified)</h3>
<pre><span style="color:#000000;">Configuration ConfigureExchange
{
    </span><span style="color:#0000ff;">param</span><span style="color:#000000;">
    (
        [</span><span style="color:#008080;">PSCredential</span><span style="color:#000000;">]</span><span style="color:#800080;">$ShellCreds</span><span style="color:#000000;">
    )

    Import-DscResource -Module xExchange

    Node </span><span style="color:#800080;">$AllNodes</span><span style="color:#000000;">.NodeName
    {
        xExchOutlookAnywhere OAVdir
        {
            Identity                           </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">$($Node.NodeName)\Rpc (Default Web Site)</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
            Credential                         </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$ShellCreds</span><span style="color:#000000;">
            ExternalClientAuthenticationMethod </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">Ntlm</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
            ExternalClientsRequireSSL          </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$true</span><span style="color:#000000;">
            ExternalHostName                   </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">mail.mikelab.local</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
            IISAuthenticationMethods           </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">Ntlm</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
            InternalClientAuthenticationMethod </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">Ntlm</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
            InternalClientsRequireSSL          </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$true</span><span style="color:#000000;">
            InternalHostName                   </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">mail-site1.mikelab.local</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
            AllowServiceRestart                </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$true</span><span style="color:#000000;">
        }
    }
}

</span><span style="color:#008000;">#</span><span style="color:#008000;">Get credentials if they haven&#39;t already been passed</span><span style="color:#008000;">
</span><span style="color:#0000ff;">if</span><span style="color:#000000;"> (</span><span style="color:#800080;">$ShellCreds</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800080;">$null</span><span style="color:#000000;">)
{
    </span><span style="color:#800080;">$ShellCreds</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">Get-Credential</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-style:italic;">-Message</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">Enter credentials for establishing Remote Powershell sessions to Exchange</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
}

</span><span style="color:#008000;">#</span><span style="color:#008000;">##Compiles the example</span><span style="color:#008000;">
</span><span style="color:#000000;">ConfigureExchange -ConfigurationData </span><span style="color:#800080;">$PSScriptRoot</span><span style="color:#000000;">\ConfigureExchange-Config.psd1 -ShellCreds </span><span style="color:#800080;">$ShellCreds</span></pre>
<p>&nbsp;</p>
<p>For <strong>ConfigureExchange.ps1</strong>, I made a few changes:</p>
<ul>
<li>
<p>I replaced all instances of <strong>QuickStartTemplate</strong> with <strong>ConfigureExchange</strong></p>
</li>
<li>
<p>I removed the <strong>LocalConfigurationManager</strong> section, as we will be configuring the LCM at a later point in a separate script</p>
</li>
<li>
<p>I added an <strong>xExchOutlookAnywhere</strong> resource (which I copied from the <strong>ConfigureVirtualDirectories</strong> example in <strong>xExchange</strong>)</p>
</li>
</ul>
<p>&nbsp;</p>
<h3>ConfigureExchange-Config.psd1 (Modified)</h3>
<pre><span style="color:#000000;">@{
    AllNodes </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> @(
        </span><span style="color:#008000;">#</span><span style="color:#008000;">Settings in this section will apply to all nodes.</span><span style="color:#008000;">
</span><span style="color:#000000;">        @{
            NodeName        </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">*</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">

            </span><span style="color:#008000;">#</span><span style="color:#008000;">CertificateFile and Thumbprint are used for securing credentials. See:</span><span style="color:#008000;">
</span><span style="color:#000000;">            </span><span style="color:#008000;">#</span><span style="color:#008000;">https://blogs.msdn.com/b/powershell/archive/2014/01/31/want-to-secure-credentials-in-windows-powershell-desired-state-configuration.aspx</span><span style="color:#008000;">
</span><span style="color:#000000;">            
            </span><span style="color:#008000;">#</span><span style="color:#008000;">The location on the compiling machine of the public key export of the certfificate which will be used to encrypt credentials</span><span style="color:#008000;">
</span><span style="color:#000000;">            CertificateFile </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">C:\publickey.cer</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">

            </span><span style="color:#008000;">#</span><span style="color:#008000;">The thumbprint of the Encryption Certificate used to decrypt the credentials</span><span style="color:#008000;">
</span><span style="color:#000000;">            </span><span style="color:#008000;">#</span><span style="color:#008000;">on target node</span><span style="color:#008000;">
</span><span style="color:#000000;">            Thumbprint      </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">c9586647cc93a3fac8791ded121bc68a03c7fa87</span><span style="color:#800000;">&#39;</span><span style="color:#000000;"> 
        }

        </span><span style="color:#008000;">#</span><span style="color:#008000;">Individual target nodes are defined next</span><span style="color:#008000;">
</span><span style="color:#000000;">        @{
            NodeName </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">e15-1</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
            NodeGuid </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">3f5452c9-aa68-4494-b94d-70f4c92b28a7</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
        }
    );
}</span></pre>
<p>&nbsp;</p>
<p>Here are the changes made for<strong> ConfigureExchange-Config.psd1</strong>:</p>
<ul>
<li>
<p>I removed node E15-2, as I am only configuring a single server in this example</p>
</li>
<li>
<p>I updated <strong>Thumbprint</strong> to contain the thumbprint of the certificate that was generated earlier</p>
</li>
<li>
<p>I added a <strong>NodeGuid</strong> property to E15-1&#39;s section, and specified the GUID that was generated for the server earlier</p>
</li>
</ul>
<p>&nbsp;</p>
<h3>Compiling the Script, and Moving and Renaming the Target .MOF</h3>
<p>The next step is to compile the script, move the target computer&#39;s .MOF to the proper location for pulling, and rename it using the GUID that was generated earlier.</p>
<p>Note that the computer that is compiling the script MUST be compiling it with the same version of <strong>xExchange</strong> that was dropped into and checksummed in the <strong>&#39;C:\Program Files\WindowsPowerShell\DscServices\Modules&#39;</strong> folder. If not, you may get a <strong>Desired State Configuration</strong> error with <strong>Event ID 4104</strong> on the target machine when it tries to download the configuration. To look for this or any other DSC errors within Event Viewer on the target machine, go to <strong>&#39;Applications and Service Logs\Microsoft\Windows\Desired State Configuration&#39;</strong>, then choose the <strong>Operational</strong> log.</p>
<p>In the below error, I had compiled the script using v1.0.2.1 of the <strong>xExchange</strong> module, but had zipped and checksummed v1.0.0.0 of the module in the <strong>DscServices\Modules</strong> folder.</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-EventLog-CantFindModule.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_EventLog_2D00_CantFindModule.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-EventLog-CantFindModule.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_EventLog_2D00_CantFindModule.PNG" /></a></p>
<p>&nbsp;</p>
<h4>Compiling the Script</h4>
<p>I can compile the script by running <strong>ConfigureExchange.ps1</strong>. Doing so, I get a file named e15-1.mof:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-ConfigureExchange-Compiled-Output-BeforeRename.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_ConfigureExchange_2D00_Compiled_2D00_Output_2D00_BeforeRename.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-ConfigureExchange-Compiled-Output-BeforeRename.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_ConfigureExchange_2D00_Compiled_2D00_Output_2D00_BeforeRename.PNG" /></a></p>
<p>&nbsp;</p>
<h4>Renaming the .MOF</h4>
<p>Now I&#39;m going to rename e15-1.mof to 3f5452c9-aa68-4494-b94d-70f4c92b28a7.mof (the GUID generated for E15-1), and copy the file to <strong>&#39;C:\Program Files\WindowsPowerShell\DscService\Configuration&#39;</strong> (the path specified in <strong>ConfigurationPath</strong> when the pull server was setup).</p>
<p>&nbsp;</p>
<h4>Checksumming the .MOF</h4>
<p>Finally, I&#39;m going to run New-DSCCheckSum to generate a checksum for all configurations in the Configuration folder:</p>
<pre><span style="color:#000000;">New-DscCheckSum -ConfigurationPath </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">C:\Program Files\WindowsPowerShell\DscServices\Configuration</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">`</span><span style="color:#000000;">
    -OutPath </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">C:\Program Files\WindowsPowerShell\DscServices\Configuration</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> -Verbose -Force</span></pre>
<p>&nbsp;</p>
<p>At this point, the Configuration folder should look as follows:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-ConfigureExchange-CopiedToConfigFolderAndChecksummed.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_ConfigureExchange_2D00_CopiedToConfigFolderAndChecksummed.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-ConfigureExchange-CopiedToConfigFolderAndChecksummed.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_ConfigureExchange_2D00_CopiedToConfigFolderAndChecksummed.PNG" /></a></p>
<p>&nbsp;</p>
<h2>Setting Up the &#39;Local Configuration Manager&#39; Configuration Script</h2>
<p>The last step in the process is to tell the target node to start pulling the configuration. To do this, we need to configure the Local Configuration Manager on the target node. To get started, I&#39;m going to copy the <strong>SimpleMetaConfigurationForPull</strong> script which is included in <a href="https://technet.microsoft.com/en-us/library/dn249913.aspx">this article</a>. I&#39;m going to save the contents into a new file, <strong>ConfigureTargetLCMs.ps1</strong>.</p>
<p>Unmodified, <strong>ConfigureTargetLCMs.ps1</strong> looks as follows:</p>
<p>&nbsp;</p>
<h3>ConfigureTargetLCMs.ps1 (Unmodified)</h3>
<pre><span style="color:#000000;">Configuration SimpleMetaConfigurationForPull 
{ 
    LocalConfigurationManager 
    { 
        ConfigurationID </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">1C707B86-EF8E-4C29-B7C1-34DA2190AE24</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">;
        RefreshMode </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">PULL</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">;
        DownloadManagerName </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">WebDownloadManager</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">;
        RebootNodeIfNeeded </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$true</span><span style="color:#000000;">;
        RefreshFrequencyMins </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#000000;">15</span><span style="color:#000000;">;
        ConfigurationModeFrequencyMins </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#000000;">30</span><span style="color:#000000;">; 
        ConfigurationMode </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">ApplyAndAutoCorrect</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">;
        DownloadManagerCustomData </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> 
            @{ServerUrl </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">https://PullServer:8080/PSDSCPullServer/PSDSCPullServer.svc</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">;
              AllowUnsecureConnection </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&ldquo;</span><span style="color:#800000;">TRUE</span><span style="color:#800000;">&rdquo;</span><span style="color:#000000;">}
    }
}
SimpleMetaConfigurationForPull -Output </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">.</span><span style="color:#800000;">&quot;</span></pre>
<p>&nbsp;</p>
<p>Now I&#39;ll make the following modifications:</p>
<p>&nbsp;</p>
<h3>ConfigureTargetLCMs.ps1 (Modified)</h3>
<pre><span style="color:#000000;">Configuration ConfigureTargetLCMs 
{
    Node </span><span style="color:#800080;">$AllNodes</span><span style="color:#000000;">.NodeName
    {
        LocalConfigurationManager 
        {
            CertificateId                  </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$Node</span><span style="color:#000000;">.Thumbprint
            ConfigurationID                </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$Node</span><span style="color:#000000;">.NodeGuid;
            RefreshMode                    </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">PULL</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">;
            DownloadManagerName            </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">WebDownloadManager</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">;
            RebootNodeIfNeeded             </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$true</span><span style="color:#000000;">;
            RefreshFrequencyMins           </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#000000;">15</span><span style="color:#000000;">;
            ConfigurationModeFrequencyMins </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#000000;">30</span><span style="color:#000000;">; 
            ConfigurationMode              </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">ApplyAndAutoCorrect</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">;
            DownloadManagerCustomData      </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> @{
                ServerUrl               </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">https://dscpull-1.mikelab.local:8080/PSDSCPullServer.svc</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">;
                AllowUnsecureConnection </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&ldquo;</span><span style="color:#800000;">TRUE</span><span style="color:#800000;">&rdquo;</span><span style="color:#000000;">}

            </span><span style="color:#008000;">#</span><span style="color:#008000;">## Note that the URL used to be configured differently, and contained an additional subfolder in the path</span><span style="color:#008000;">
</span><span style="color:#000000;">            </span><span style="color:#008000;">#</span><span style="color:#008000;">## prior to v3.0.3.4 of xPSDesiredStateConfiguration. This was the old style.</span><span style="color:#008000;">
</span><span style="color:#000000;">            </span><span style="color:#008000;">#</span><span style="color:#008000;">DownloadManagerCustomData      = @{</span><span style="color:#008000;">
</span><span style="color:#000000;">            </span><span style="color:#008000;">#</span><span style="color:#008000;">    ServerUrl               = &quot;https://dscpull-1.mikelab.local:8080/PSDSCPullServer/PSDSCPullServer.svc&quot;;</span><span style="color:#008000;">
</span><span style="color:#000000;">            </span><span style="color:#008000;">#</span><span style="color:#008000;">    AllowUnsecureConnection = &ldquo;TRUE&rdquo;}</span><span style="color:#008000;">
</span><span style="color:#000000;">        }
    }
}

ConfigureTargetLCMs -ConfigurationData </span><span style="color:#800080;">$PSScriptRoot</span><span style="color:#000000;">\ConfigureExchange-Config.psd1</span></pre>
<p>&nbsp;</p>
<p>Here&#39;s the specific changes I made:</p>
<ul>
<li>
<p>I renamed all instances of <strong>SimpleMetaConfigurationForPull</strong> to <strong>ConfigureTargetLCMs</strong></p>
</li>
<li>
<p>Moved the <strong>LocalConfigurationManager</strong> section into a <strong>Node</strong> block, so that the script can be used for multiple nodes</p>
</li>
<li>
<p>Added a <strong>CertificateId</strong> property, and specify that it will use <strong>$Node.Thumbprint</strong> from <strong>ConfigureExchange-Config.psd1</strong></p>
</li>
<li>
<p>Changed <strong>ConfigurationID</strong> to use <strong>$Node.NodeGuid</strong> from <strong>ConfigureExchange-Config.psd1</strong></p>
</li>
<li>
<p>Changed the <strong>ServerUrl</strong> to use <strong>https</strong>, and also to include the FQDN of the pull server, dscpull-1</p>
</li>
<li>
<p>Updated the compile line to include a ConfigurationData file; the same <strong>ConfigureExchange-Config.psd1</strong> file we created earlier</p>
</li>
<li>
<p>Removed the <strong>PSDSCPullServer</strong> subfolder from <strong>ServerUrl</strong>. Version <strong>3.0.3.4</strong> and higher of <strong>xPSDesiredStateConfiguration</strong> no longer setup the pull server with this subfolder.</p>
</li>
</ul>
<p>&nbsp;</p>
<h1>Compiling, Executing and Verifying the &#39;Local Configuration Manager&#39; Script</h1>
<p>Now that everything is in place, all I have left to do is compile and execute the LCM configuration script, <strong>ConfigureTargetLCMs.ps1</strong>.</p>
<p>&nbsp;</p>
<h2>Compiling the Script</h2>
<p>I can compile the script by just running it. Note that this time I get a<strong> .meta.mof</strong> file instead of a plain <strong>.mof</strong> file, as I am configuring the Local Configuration Manager:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-ConfigureTargetLCMs-OutputFiles.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_ConfigureTargetLCMs_2D00_OutputFiles.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-ConfigureTargetLCMs-OutputFiles.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_ConfigureTargetLCMs_2D00_OutputFiles.PNG" /></a></p>
<p>&nbsp;</p>
<h2>Executing the Configuration</h2>
<p>To execute the configuration, I&#39;ll run:</p>
<pre><span style="color:#000000;">Set-DscLocalConfigurationManager -Path .\ConfigureTargetLCMs -Verbose</span></pre>
<p>&nbsp;</p>
<h2>Verifying the Configuration</h2>
<p>To confirm that the configuration was successful, I can look in the Event Viewer of the target computer. The following event, <strong>Desired Sate Configuration</strong>, Event ID <strong>4160</strong>, indicates that the configuration was successful, and the machine will attempt to pull it&#39;s configuration <span class="auto-style1"><strong>after a reboot</strong></span>:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-EventLog-WaitingForReboot.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_EventLog_2D00_WaitingForReboot.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-EventLog-WaitingForReboot.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_EventLog_2D00_WaitingForReboot.PNG" /></a></p>
<p>&nbsp;</p>
<p><span class="auto-style1"><strong>After the reboot</strong></span>, you can again go into the Event Viewer of the target computer to check if the configuation was pulled and applied. If everything runs successfully, you will just see a single error, a <strong>Desired State Configuration</strong> event, with Event ID <strong>4194</strong>. This error is ignorable. DSC wants to delete the existing configuration for the computer, but since this is the first iteration, it has no configuration to delete:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-EventLog-IgnorableError.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_EventLog_2D00_IgnorableError.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-EventLog-IgnorableError.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_EventLog_2D00_IgnorableError.PNG" /></a></p>
<p>&nbsp;</p>
<p>In addition to 20 or 30 other Informational events, you will see events <strong>4108</strong> and <strong>4109</strong> indicating that required modules, and required configuration, was downloaded successfully from the pull server. If you don&#39;t see these, there will most likely be more than one Error or Warning in the recent Event Viewer.</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-EventLog-SuccessfullyGotModules.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_EventLog_2D00_SuccessfullyGotModules.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-EventLog-SuccessfullyGotModules.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_EventLog_2D00_SuccessfullyGotModules.PNG" /></a></p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-EventLog-SuccessfullyGotConfig.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_EventLog_2D00_SuccessfullyGotConfig.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/DSCPart3-EventLog-SuccessfullyGotConfig.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/DSCPart3_2D00_EventLog_2D00_SuccessfullyGotConfig.PNG" /></a></p>
</div>]]></content:encoded>
    </item>
    <item>
      <title>Automating Mount Point Setup and Maintenance for AutoReseed - Managing Exchange 2013 With DSC - Part 3</title>
      <link>https://docs.microsoft.com/archive/blogs/mhendric/automating-mount-point-setup-and-maintenance-for-autoreseed-managing-exchange-2013-with-dsc-part-3</link>
      <pubDate>Mon, 27 Oct 2014 15:32:00 GMT</pubDate>
      <dc:creator><![CDATA[Mike Hendrickson [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mhendric/2014/10/27/automating-mount-point-setup-and-maintenance-for-autoreseed-managing-exchange-2013-with-dsc-part-3/</guid>
      <description><![CDATA[Managing Exchange 2013 With DSC
Part 1 - Introducing xExchange
Part 2 - The QuickStart...]]></description>
      <content:encoded><![CDATA[<div><link href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/Styles2.css" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/Styles2.css" rel="stylesheet" />
<h1><span style="color:#2e74b5;">Managing Exchange 2013 With DSC</span></h1>
<p><a href="/b/mhendric/archive/2014/10/17/managing-exchange-2013-with-dsc-part-1-introducing-xexchange.aspx">Part 1 - Introducing xExchange</a></p>
<p><a href="/b/mhendric/archive/2014/10/17/managing-exchange-2013-with-dsc-part-2-the-quickstart-template.aspx">Part 2 - The QuickStart Template</a></p>
<p>Part 3 - Automating Mount Point Setup and Maintenance for AutoReseed</p>
<p><a href="/b/mhendric/archive/2014/11/10/managing-exchange-2013-with-dsc-part-4-using-a-dsc-pull-server-to-deploy-the-xexchange-module.aspx">Part 4 - Using a DSC Pull Server to Deploy the xExchange Module</a></p>
<p><a href="/b/mhendric/archive/2014/12/16/installing-exchange-using-dsc-managing-exchange-2013-with-dsc-part-5.aspx">Part 5 - Installing Exchange Using DSC</a></p>
<p>&nbsp;</p>
<h1>Automating Mount Point Setup and Maintenance for AutoReseed</h1>
<p><strong>xExchAutoMountPoint</strong> is a resource within the <strong>xExchange</strong> module that was designed specifically to be used with AutoReseed, a feature introduced in Exchange 2013. Setting up AutoReseed requires that you create a relatively complex mount point structure, where volumes for databases and spare volumes will be mounted. Database mount points go under <strong>C:\ExchangeDatabases</strong>, and spare volumes go under <strong>C:\ExchangeVolumes</strong>. On larger servers with 4 databases copies per disk, you could easily end up with over 100 mount points per server.</p>
<p>The Exchange Server Role Requirements Calculator already has the capability of generating CSV&rsquo;s defining the required databases and copies per server, and can also generate PowerShell scripts for creating mount points, databases, and database copies using those CSV&#39;s. If all you want to do is configure the server once and forget it, those scripts are more than sufficient for the job.</p>
<p>Seeing as how these scripts already existed, a big driver for creating the <strong>xExchAutoMountPoint</strong> resource was to deal with what happens after a failed disk is replaced. Right now the (simplified) AutoReseed process for a fully configured and operational server is as follows:</p>
<ul>
<li>
<p>Server has a disk failure</p>
</li>
<li>
<p>AutoReseed detects the failed disk, remaps a spare volume as a database volume, and initiates a reseed from a known good copy</p>
</li>
<li>
<p>Administrator pulls the failed disk, and replaces it with a good disk</p>
</li>
<li>
<p style="color:red;">Administrator assigns the new disk a mount point in <strong>C:\ExchangeVolumes</strong></p>
</li>
<li>
<p style="color:red;">Administrator formats the volume</p>
</li>
<li>
<p style="color:red;">(OPTIONAL) Administrator applies Bitlocker to volume</p>
</li>
</ul>
<p>&nbsp;</p>
<p>With <strong>xExchAutoMountPoint</strong> (and optionally the <a style="font-weight:bold;" href="https://gallery.technet.microsoft.com/xBitlocker-Module-794c4bf8">xBitlocker</a> module and <strong>xBLAutoBitlocker</strong> resource), the last three steps can be completely automated. Note that this requires that the configuration is setup in pull mode, where the configuration is regularly inspected for differences. Using these resources with pull mode, the new workflow would be as follows:</p>
<ul>
<li>
<p>Server has a disk failure</p>
</li>
<li>
<p>AutoReseed detects the failed disk, remaps a spare volume as a database volume, and initiates a reseed from a known good copy</p>
</li>
<li>
<p>Administrator pulls the failed disk, and replaces it with a good disk</p>
</li>
<li>
<p style="color:green;"><strong>xExchAutoMountPoint</strong> determines that the number of active <strong>ExchangeVolumes</strong> mount points is less than the required number of mount points, and that there is an available disk with no assigned mount points</p>
</li>
<li>
<p style="color:green;"><strong>xExchAutoMountPoint</strong> assigns an <strong>ExchangeVolumes</strong> mount point to the new disk, and formats it</p>
</li>
<li>
<p style="color:green;">(OPTIONAL) <strong>xBLAutoBitlocker</strong> determines that there is a Fixed data disk online that has a mount point assigned, but is not Bitlocker&#39;ed, and applies Bitlocker</p>
</li>
</ul>
<p>&nbsp;</p>
<p>So essentially, all the administrator has to do is pull the failed disk, and replace it with a new disk. <strong>xExchAutoMountPoint</strong> and <strong>xBLAutoBitlocker</strong> take care of the work that is required to get the new disk ready for <strong>AutoReseed</strong>.</p>
<p>&nbsp;</p>
<h1>When to Run xExchAutoMountPoint?</h1>
<p>Before jumping into examples, I wanted to quickly comment on when you should run <strong>xExchAutoMountPoint</strong>. Depending on the pre-validation you do on your servers, you may actually want to run <strong>xExchAutoMountPoint</strong> in two different scripts.</p>
<p>Many administrators like to run Jetstress against their database volumes prior to installing Exchange so that they can burn in their disks, and verify disk performance. If you are one of these administrators, you may want to run a script with <strong>xExchAutoMountPoint</strong> by itself prior to installing Exchange. That way you can create your mount point structure for Jetstress. After Jetstress has been run and Exchange is installed, if you are going to implement the rest of your Exchange configuration in pull mode, you could add the <strong>xExchAutoMountPoint</strong> resource in that configuration script as well. That way you can have mount points recreated automatically after disk failures.</p>
<p>&nbsp;</p>
<h1>Example 1 - Manually Specifying Database and Disk Structure for AutoReseed</h1>
<p>For this first example, I will show how to manually feed database information into the <strong>xExchAutoMountPoint</strong> resource. I will be working with 2 servers, and 4 total databases. Both servers will have 2 disks for databases, where each disk has 2 database copies per disk. The servers will also have a third disk to use as a spare.</p>
<p>The following graphic shows what this example looks like. Each folder in the graphic is a mount point that will be assigned to the specified volume. Remember that even though the disks have multiple mount points, each mount point on a single disk shows the same physical disk contents.</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/AMP1-MountPointStructure.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/AMP1_2D00_MountPointStructure.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/AMP1-MountPointStructure.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/AMP1_2D00_MountPointStructure.png" /></a></p>
<p>&nbsp;</p>
<p>Now I will show the configuration scripts which implement this design. Both scripts are included in the <strong>xExchange\Examples\ConfigureAutoMountPoints-Manual</strong> folder of the <strong>xExchange</strong> module.</p>
<h2>ConfigureAutoMountPoints-Manual.ps1</h2>
<pre><span style="color:#000000;">Configuration ConfigureAutoMountPointsManual
{
    Import-DscResource -Module xExchange

    Node </span><span style="color:#800080;">$AllNodes</span><span style="color:#000000;">.NodeName
    {
        xExchAutoMountPoint AMP
        {
            Identity                       </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$Node</span><span style="color:#000000;">.NodeName
            AutoDagDatabasesRootFolderPath </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">C:\ExchangeDatabases</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
            AutoDagVolumesRootFolderPath   </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">C:\ExchangeVolumes</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
            DiskToDBMap                    </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$Node</span><span style="color:#000000;">.DiskToDBMap
            SpareVolumeCount               </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#000000;">1</span><span style="color:#000000;">
            VolumePrefix                   </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">EXVOL</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
        }
    }
}</span></pre>
<p>Note the following:</p>
<ul>
<li>
<p>I hardcoded <strong>AutoDagDatabasesRootFolderPath</strong> and <strong>AutoDagVolumesRootFolderPath</strong> within the config script, as these would be the same regardless of how many servers and databases I was configuring. When working with DSC in general, if a setting is going to be the same for every single machine being configured, I&#39;ll hardcode it directly in the configuration script. If the settings are not going to be the same for each target machine, I&#39;ll probably abstract them to the configuration data file.</p>
</li>
<li>
<p>Even though both servers in this example have copies of the exact same databases, I specify what the <strong>DiskToDBMap</strong> should look like in the configuration data file instead of hard coding it in the script. In larger DAG&#39;s, it is likely that each server will have copies of different databases, and as such will require different mount point structures. It makes more sense to put the DiskToDBMap in the configuration data file, where you can specify a different map per server.</p>
</li>
<li>
<p>I specify a <strong>SpareVolumeCount</strong> of 1, as I plan on having 1 spare disk for <strong>AutoReseed</strong>.</p>
</li>
<li>
<p>I specify a <strong>VolumePrefix</strong> of EXVOL. This does two things. First, when volumes are created, they will be assigned a volume label of EXVOL#, where # increments depending on the number of total disks being used for AutoReseed. Second, it specifies that ExchangeVolume mount points will be created under <strong>C:\ExchangeVolumes\EXVOL#</strong>. Note that EXVOL is the default value for VolumePrefix, so I could actually omit VolumePrefix altogether in this example.</p>
</li>
</ul>
<p>&nbsp;</p>
<h2>ConfigureAutoMountPoints-Manual-Config.psd1</h2>
<pre><span style="color:#000000;">@{
    AllNodes </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> @(
        @{
            NodeName    </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">e15-1</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
            DiskToDBMap </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">DB1,DB2</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">,</span><span style="color:#800000;">&#39;</span><span style="color:#800000;">DB3,DB4</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
        }

        @{
            NodeName    </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">e15-2</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
            DiskToDBMap </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">DB1,DB2</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">,</span><span style="color:#800000;">&#39;</span><span style="color:#800000;">DB3,DB4</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
        }
    );
}</span></pre>
<p>The main thing to note here is the format for <strong>DiskToDBMap</strong>. The expected input here is a string array (string[]), where each string in the array contains a comma separated list of DB mount points that should be created on a single disk. For both nodes in this example, DB1 and DB2 will be placed on one disk, and DB3 and DB4 will be placed on another.</p>
<p>&nbsp;</p>
<h1>The Exchange Server Role Requirements Calculator and Servers.csv</h1>
<p>Manually filling out the <strong>DiskToDBMap</strong> is easy enough in small environments, but can quickly become unwieldy in larger DAGs. I figured that out pretty fast once I started trying to fill out the map for my customer who has over 200 databases per DAG, and over 80 copies per server. To make this easier, I wrote a helper script which is included in the <strong>xExchange</strong> module, and is located at <strong>xExchange\Examples\HelperScripts\ExchangeConfigHelper.psm1</strong>. The function that we will use, <strong>DBMapFromServersCsv</strong>, takes the <strong>Servers.csv</strong> file that is generated by the calculator, and turns the relevant disk information into a <strong>DiskToDBMap</strong>.</p>
<p>&nbsp;</p>
<h2>The Sample Topology</h2>
<p>For the topology, I&#39;m using a copy of the Exchange Server Role Requirements Calculator which defines the following:</p>
<ul>
<li>
<p>1 DAG</p>
</li>
<li>
<p>4 servers</p>
</li>
<li>
<p>10 data disks + 1 spare per server</p>
</li>
<li>
<p>40 database copies per server</p>
</li>
<li>
<p>4 database copies per disk</p>
</li>
</ul>
<p>&nbsp;</p>
<p>An important thing to note in the calculator is the server names that were put into the <strong>Input</strong> tab. The server names I use are in the format SRV<strong>-nn-</strong>##, where <strong>nn</strong> is the DAG identifier, and ## is the node identifier. As an example, the first server in the first DAG would be SRV-01-01.</p>
<p>In this example, I&#39;m just configuring servers in a single DAG, but in real life, you may be configuring multiple DAGs. Since the calculator will only generate CSV files for a single DAG, we need a way to be able to reuse the same CSV files for multiple DAGs which share a similar structure. To do this, I put a placeholder for the DAG number in the server name. This way, even if I&#39;m configuring SRV-01-01, SRV-02-01, or SRV-03-01, they can all use the same definition for <strong>SRV-nn-01</strong>.</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/AMP1-InputTab-ServerNameList.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/AMP1_2D00_InputTab_2D00_ServerNameList.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/AMP1-InputTab-ServerNameList.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/AMP1_2D00_InputTab_2D00_ServerNameList.PNG" /></a></p>
<p>&nbsp;</p>
<p>On the <strong>Input</strong> tab, right next to the server names, I also define the database prefix. Here, I again use <strong>-nn-</strong> instead of a specific DAG number so that the same <strong>Servers.csv</strong> file can be used for multiple DAGs.</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/AMP1-InputTab-DAGDBNameList.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/AMP1_2D00_InputTab_2D00_DAGDBNameList.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/AMP1-InputTab-DAGDBNameList.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/AMP1_2D00_InputTab_2D00_DAGDBNameList.PNG" /></a></p>
<p>&nbsp;</p>
<h2>Generating Servers.csv</h2>
<p>With the calculator configured, we need to generate the <strong>Servers.csv</strong> file which will be fed into the configuration script. To do this, go to the <strong>Distribution</strong> tab, and hit the <strong>Export DB Mount List</strong> button.</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/AMP1-CalculatorDistributionTabButtons.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/AMP1_2D00_CalculatorDistributionTabButtons.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/AMP1-CalculatorDistributionTabButtons.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/AMP1_2D00_CalculatorDistributionTabButtons.PNG" /></a></p>
<p>&nbsp;</p>
<p>After hitting the button, the following window comes up. For <strong>xExchAutoMountPoint</strong>, the only thing we care about is the Export Path, where <strong>Servers.csv</strong> will be created. The other properties are configured directly in the configuration script and don&#39;t need to be pulled from <strong>Servers.csv</strong>.</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/AMP1-CalculatorExportDBMountList.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/AMP1_2D00_CalculatorExportDBMountList.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/AMP1-CalculatorExportDBMountList.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/AMP1_2D00_CalculatorExportDBMountList.PNG" /></a></p>
<p>&nbsp;</p>
<p>After hitting OK, you&#39;ll get the following confirmation showing where <strong>Servers.csv</strong> was sent to:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/AMP1-CalculatorExportDBMountList-Confirmation.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/AMP1_2D00_CalculatorExportDBMountList_2D00_Confirmation.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/AMP1-CalculatorExportDBMountList-Confirmation.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/AMP1_2D00_CalculatorExportDBMountList_2D00_Confirmation.PNG" /></a></p>
<p>&nbsp;</p>
<p>Here&#39;s a screenshot of what the <strong>Servers.csv</strong> file looks like. The two columns that are consumed by the helper function, <strong>DBMapFromServersCsv</strong>, are <strong>ServerName</strong> and <strong>DbMap</strong>:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/AMP1-ServersCSVPic.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/AMP1_2D00_ServersCSVPic.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/AMP1-ServersCSVPic.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/AMP1_2D00_ServersCSVPic.PNG" /></a></p>
<p>&nbsp;</p>
<h2>Using the Helper Module</h2>
<p>To demonstrate what the helper function does, I wrote a simple test script which shows it&#39;s output. For demo purposes, I put <strong>ExchangeConfigHelper.psm1</strong>, <strong>Servers.csv</strong>, and <strong>TestHelper.ps1</strong> all in the same folder:</p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/AMP1-TestHelperFolder.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/AMP1_2D00_TestHelperFolder.PNG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/AMP1-TestHelperFolder.PNG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/AMP1_2D00_TestHelperFolder.PNG" /></a></p>
<p>&nbsp;</p>
<p>TestHelper.ps1 looks as follows:</p>
<pre><span style="color:#5f9ea0;font-weight:bold;">Import-Module</span><span style="color:#000000;"> .\</span><span style="color:#800000;">ExchangeConfigHelper.psm1</span><span style="color:#000000;">

</span><span style="color:#800080;">$dbMap</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;">DBMapFromServersCsv</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">`</span><span style="color:#000000;">
    -ServersCsvPath </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">Servers.csv</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">`</span><span style="color:#000000;">
    -ServerNameInCsv </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">SRV-nn-01</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">`</span><span style="color:#000000;">
    -DbNameReplacements @{</span><span style="color:#800000;">&quot;</span><span style="color:#800000;">-nn-</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">-01-</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">}
    
</span><span style="color:#800080;">$dbMap</span></pre>
<p>&nbsp;</p>
<p>The important points of this script are as follows:</p>
<ul>
<li>
<p>I have to import the <strong>ExchangeConfigHelper.psm1</strong> module, as that is where the <strong>DBMapFromServersCsv</strong> function lives</p>
</li>
<li>
<p><strong>ServersCsvPath</strong> is the path to the <strong>Servers.csv</strong> file on the machine which will be compiling the configuration. If no folder path is specified, it will use the current directory</p>
</li>
<li>
<p>I pass in <strong>SRV-nn-01</strong> for <strong>ServerNameInCsv</strong>, as that will be the <strong>ServerName</strong> in <strong>Servers.csv</strong> that the <strong>DbMap</strong> property will be processed for</p>
</li>
<li>
<p>For <strong>DbNameReplacements</strong>, I pass in a hashtable, where the key &#39;<strong>-nn-</strong>&#39; is what should be replaced, and the value &#39;<strong>-01-</strong>&#39; is what it should be replaced with. If you want to make multiple replacements, you can seperate the key value pairs with a semicolon. Note that due to the way a hashtable operates, the replacements will be processed in a (seemingly) random order, and not necessarily the order you put them in. As such you may need to carefully plan out what multiple replacements look like so they do not interfere with each other.</p>
</li>
</ul>
<p>&nbsp;</p>
<p>After running the test script, we can see what the <strong>$dbMap</strong> variable looks like. Each line in the output is a separate string in a string array:</p>
<p style="margin-left:30px;">DAG-01-DB01,DAG-01-DB02,DAG-01-DB03,DAG-01-DB04<br /> DAG-01-DB05,DAG-01-DB06,DAG-01-DB07,DAG-01-DB08<br /> DAG-01-DB09,DAG-01-DB10,DAG-01-DB11,DAG-01-DB12<br /> DAG-01-DB13,DAG-01-DB14,DAG-01-DB15,DAG-01-DB16<br /> DAG-01-DB17,DAG-01-DB18,DAG-01-DB19,DAG-01-DB20<br /> DAG-01-DB21,DAG-01-DB22,DAG-01-DB23,DAG-01-DB24<br /> DAG-01-DB25,DAG-01-DB26,DAG-01-DB27,DAG-01-DB28<br /> DAG-01-DB29,DAG-01-DB30,DAG-01-DB31,DAG-01-DB32<br /> DAG-01-DB33,DAG-01-DB34,DAG-01-DB35,DAG-01-DB36<br /> DAG-01-DB37,DAG-01-DB38,DAG-01-DB39,DAG-01-DB40</p>
<p>&nbsp;</p>
<p>This is equivalent to if I had manually typed the following in the configuration data file (although everything would be on a single line; you can&#39;t define an array across multiple lines like I do here):</p>
<pre><span style="color:#000000;">DiskToDBMap </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">DAG-01-DB01,DAG-01-DB02,DAG-01-DB03,DAG-01-DB04</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">,</span><span style="color:#5f9ea0;font-weight:bold;">`</span><span style="color:#000000;">
                </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">DAG-01-DB05,DAG-01-DB06,DAG-01-DB07,DAG-01-DB08</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">,</span><span style="color:#5f9ea0;font-weight:bold;">`</span><span style="color:#000000;">
                </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">DAG-01-DB09,DAG-01-DB10,DAG-01-DB11,DAG-01-DB12</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">,</span><span style="color:#5f9ea0;font-weight:bold;">`</span><span style="color:#000000;">
                </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">DAG-01-DB13,DAG-01-DB14,DAG-01-DB15,DAG-01-DB16</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">,</span><span style="color:#5f9ea0;font-weight:bold;">`</span><span style="color:#000000;">
                </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">DAG-01-DB17,DAG-01-DB18,DAG-01-DB19,DAG-01-DB20</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">,</span><span style="color:#5f9ea0;font-weight:bold;">`</span><span style="color:#000000;">
                </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">DAG-01-DB21,DAG-01-DB22,DAG-01-DB23,DAG-01-DB24</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">,</span><span style="color:#5f9ea0;font-weight:bold;">`</span><span style="color:#000000;">
                </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">DAG-01-DB25,DAG-01-DB26,DAG-01-DB27,DAG-01-DB28</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">,</span><span style="color:#5f9ea0;font-weight:bold;">`</span><span style="color:#000000;">
                </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">DAG-01-DB29,DAG-01-DB30,DAG-01-DB31,DAG-01-DB32</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">,</span><span style="color:#5f9ea0;font-weight:bold;">`</span><span style="color:#000000;">
                </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">DAG-01-DB33,DAG-01-DB34,DAG-01-DB35,DAG-01-DB36</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">,</span><span style="color:#5f9ea0;font-weight:bold;">`</span><span style="color:#000000;">
                </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">DAG-01-DB37,DAG-01-DB38,DAG-01-DB39,DAG-01-DB40</span><span style="color:#800000;">&#39;</span></pre>
<p>&nbsp;</p>
<h1>Example 2 - Using Servers.csv as Input for xExchAutoMountPoint</h1>
<p>Now that we know how to generate a <strong>Servers.csv</strong> file, and also how to work with the <strong>DBMapFromServersCsv</strong> helper function, we can look at the next demo scripts. These show how to use <strong>Servers.csv</strong> to populate the <strong>DiskToDBMap</strong>. Both scripts are included in the <strong>xExchange\Examples\ConfigureAutoMountPoints-FromCalculator</strong> folder of the <strong>xExchange</strong> module.</p>
<p>&nbsp;</p>
<h2>ConfigureAutoMountPoints-FromCalculator.ps1</h2>
<pre><span style="color:#000000;">Configuration ConfigureAutoMountPointsFromCalculator
{
    Import-DscResource -Module xExchange

    </span><span style="color:#5f9ea0;font-weight:bold;">Import-Module</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">$((Get-Item -LiteralPath </span><span style="color:#800000;">&quot;</span><span style="color:#000000;">$(</span><span style="color:#800080;">$PSScriptRoot</span><span style="color:#000000;">)</span><span style="color:#800000;">&quot;</span><span style="color:#800000;">).Parent.FullName)\HelperScripts\ExchangeConfigHelper.psm1</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">

    Node </span><span style="color:#800080;">$AllNodes</span><span style="color:#000000;">.NodeName
    {
        </span><span style="color:#800080;">$dagSettings</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$ConfigurationData</span><span style="color:#000000;">[</span><span style="color:#800080;">$Node</span><span style="color:#000000;">.DAGId]
        
        </span><span style="color:#800080;">$dbMap</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> DBMapFromServersCsv </span><span style="color:#5f9ea0;font-weight:bold;">`</span><span style="color:#000000;">
                    -ServersCsvPath </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">$($PSScriptRoot)\CalculatorAndScripts\Servers.csv</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">`</span><span style="color:#000000;">
                    -ServerNameInCsv </span><span style="color:#800080;">$Node</span><span style="color:#000000;">.ServerNameInCsv </span><span style="color:#5f9ea0;font-weight:bold;">`</span><span style="color:#000000;">
                    -DbNameReplacements </span><span style="color:#800080;">$dagSettings</span><span style="color:#000000;">.DbNameReplacements

        xExchAutoMountPoint AMP
        {
            Identity                       </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$Node</span><span style="color:#000000;">.NodeName
            AutoDagDatabasesRootFolderPath </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">C:\ExchangeDatabases</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
            AutoDagVolumesRootFolderPath   </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">C:\ExchangeVolumes</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
            DiskToDBMap                    </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$dbMap</span><span style="color:#000000;">
            SpareVolumeCount               </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#000000;">1</span><span style="color:#000000;">
            VolumePrefix                   </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">EXVOL</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
        }
    }
}</span></pre>
<p>&nbsp;</p>
<p>There are a few things worth noting here. First, since we&#39;re using the helper module, we have to import it. The location I have specified is relative to the location of the configuration script, <strong>ConfigureAutoMountPoints-FromCalculator.ps1</strong>, as it is located in the <strong>xExchange</strong> download.</p>
<pre><span style="color:#5f9ea0;font-weight:bold;">Import-Module</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">$((Get-Item -LiteralPath </span><span style="color:#800000;">&quot;</span><span style="color:#000000;">$(</span><span style="color:#800080;">$PSScriptRoot</span><span style="color:#000000;">)</span><span style="color:#800000;">&quot;</span><span style="color:#800000;">).Parent.FullName)\HelperScripts\ExchangeConfigHelper.psm1</span><span style="color:#800000;">&quot;</span></pre>
<p>&nbsp;</p>
<p>Instead of using a relative location for the helper module, you could just as easily specify the exact location:</p>
<pre><span style="color:#5f9ea0;font-weight:bold;">Import-Module</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">C:\HelperScripts\ExchangeConfigHelper.psm1</span><span style="color:#800000;">&quot;</span></pre>
<p>&nbsp;</p>
<p>The next line locates the DAG settings for the node being processed, and put&#39;s them in a variable for easy usage later:</p>
<pre><span style="color:#800080;">$dagSettings</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$ConfigurationData</span><span style="color:#000000;">[</span><span style="color:#800080;">$Node</span><span style="color:#000000;">.DAGId]</span></pre>
<p>&nbsp;</p>
<p>Now I get the DBMap using the helper function, as I did earlier, and send it to the variable <strong>$dbMap</strong>. This time however, I pass in a variable for <strong>ServerNameInCsv</strong> and <strong>DbNameReplacements</strong>, so that the same script can be used to configure multiple nodes. Both of these variables are defined in the configuration data file.</p>
<pre><span style="color:#800080;">$dbMap</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> DBMapFromServersCsv </span><span style="color:#5f9ea0;font-weight:bold;">`</span><span style="color:#000000;">
    -ServersCsvPath </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">$($PSScriptRoot)\CalculatorAndScripts\Servers.csv</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">`</span><span style="color:#000000;">
    -ServerNameInCsv </span><span style="color:#800080;">$Node</span><span style="color:#000000;">.ServerNameInCsv </span><span style="color:#5f9ea0;font-weight:bold;">`</span><span style="color:#000000;">
    -DbNameReplacements </span><span style="color:#800080;">$dagSettings</span><span style="color:#000000;">.DbNameReplacements</span></pre>
<p>&nbsp;</p>
<p>The <strong>xExchAutoMountPoint</strong> resource looks almost the same as in the manual example. The only difference is for <strong>DiskToDBMap</strong>, we are passing in<strong> $dbMap,</strong> which was generated by the helper function.</p>
<pre><span style="color:#000000;">xExchAutoMountPoint AMP
{
    Identity                       </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$Node</span><span style="color:#000000;">.NodeName
    AutoDagDatabasesRootFolderPath </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">C:\ExchangeDatabases</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
    AutoDagVolumesRootFolderPath   </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">C:\ExchangeVolumes</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
    DiskToDBMap                    </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$dbMap</span><span style="color:#000000;">
    SpareVolumeCount               </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#000000;">1</span><span style="color:#000000;">
    VolumePrefix                   </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">EXVOL</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
}</span></pre>
<p>&nbsp;</p>
<h2>ConfigureAutoMountPoints-FromCalculator-Config.psd1</h2>
<pre><span style="color:#000000;">@{
    AllNodes </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> @(
        @{
            NodeName        </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">SRV-01-01</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
            ServerNameInCsv </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">SRV-nn-01</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
            DAGId           </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">DAG1</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
        }

        @{
            NodeName        </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">SRV-01-02</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
            ServerNameInCsv </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">SRV-nn-02</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
            DAGId           </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">DAG1</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
        }
        @{
            NodeName        </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">SRV-01-03</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
            ServerNameInCsv </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">SRV-nn-03</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
            DAGId           </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">DAG1</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
        }

        @{
            NodeName        </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">SRV-01-04</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
            ServerNameInCsv </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">SRV-nn-04</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
            DAGId           </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">DAG1</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">
        }        
    );
    
    DAG1 </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> @{
        DbNameReplacements </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> @{</span><span style="color:#800000;">&quot;</span><span style="color:#800000;">-nn-</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">-01-</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">}
    }
}</span></pre>
<p>&nbsp;</p>
<p>There&#39;s a couple things of note in this configuration data file. First, this data file makes use of a new node in the hashtable which is a sibling of <strong>AllNodes</strong>. This node is named <strong>DAG1</strong>, and can be used to define properties that are specific to that DAG. In this example, the only thing defined in here is the replacements to make in the database names when taken out of <strong>Servers.csv</strong>.</p>
<pre><span style="color:#000000;">DAG1 </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> @{
    DbNameReplacements </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> @{</span><span style="color:#800000;">&quot;</span><span style="color:#800000;">-nn-</span><span style="color:#800000;">&quot;</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">-01-</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">}
}</span></pre>
<p>&nbsp;</p>
<p>When looking up DAG settings for a node in the configuration script, the <strong>DAG1</strong> node is referenced via the <strong>DAGId</strong> property in the node:</p>
<pre><span style="color:#000000;">DAGId           </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">DAG1</span><span style="color:#800000;">&quot;</span></pre>
<p>&nbsp;</p>
<h1>Summary</h1>
<p>In conclusion, the <strong>xExchAutoMountPoint</strong> resource can be used to automatically create the <strong>ExchangeDatabases</strong> and <strong>ExchangVolumes</strong> mount points that are required for AutoReseed. You can use it a single time during the initial setup of your Exchange servers to create your mount points, but you can also use it on a regular basis to set new disks back up automatically after failed disks are replaced. For smaller environments, you can fill out the disk and database information directly in your configuration scripts. For larger environments, it is probably a good idea to use <strong>Servers.csv</strong> from the Exchange Server Role Requirements Calculator as input.</p>
<p>&nbsp;</p>
<h1>Related Reading</h1>
<p style="margin-left:30px;">AutoReseed: Exchange 2013 Help<br /><a href="https://technet.microsoft.com/en-us/library/dn789209(v=exchg.150).aspx">https://technet.microsoft.com/en-us/library/dn789209(v=exchg.150).aspx</a></p>
<p style="margin-left:30px;">Configure AutoReseed for a database availability group<br /><a href="https://technet.microsoft.com/en-us/library/jj619303(v=exchg.150).aspx">https://technet.microsoft.com/en-us/library/jj619303(v=exchg.150).aspx</a></p>
</div>]]></content:encoded>
    </item>
    <item>
      <title>The QuickStart Template - Managing Exchange 2013 With DSC - Part 2</title>
      <link>https://docs.microsoft.com/archive/blogs/mhendric/the-quickstart-template-managing-exchange-2013-with-dsc-part-2</link>
      <pubDate>Fri, 17 Oct 2014 09:48:00 GMT</pubDate>
      <dc:creator><![CDATA[Mike Hendrickson [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mhendric/2014/10/17/the-quickstart-template-managing-exchange-2013-with-dsc-part-2/</guid>
      <description><![CDATA[Managing Exchange 2013 With DSC
Part 1 - Introducing xExchange
Part 2 - The QuickStart...]]></description>
      <content:encoded><![CDATA[<h1><span style="color:#2e74b5;">Managing Exchange 2013 With DSC</span></h1>
<p><a href="/b/mhendric/archive/2014/10/17/managing-exchange-2013-with-dsc-part-1-introducing-xexchange.aspx">Part 1 - Introducing xExchange</a></p>
<p>Part 2 - The QuickStart Template</p>
<p><a href="/b/mhendric/archive/2014/10/27/managing-exchange-2013-with-dsc-part-3-automating-mount-point-setup-and-maintenance-for-autoreseed.aspx">Part 3 - Automating Mount Point Setup and Maintenance for AutoReseed</a></p>
<p><a href="/b/mhendric/archive/2014/11/10/managing-exchange-2013-with-dsc-part-4-using-a-dsc-pull-server-to-deploy-the-xexchange-module.aspx">Part 4 - Using a DSC Pull Server to Deploy the xExchange Module</a></p>
<p><a href="/b/mhendric/archive/2014/12/16/installing-exchange-using-dsc-managing-exchange-2013-with-dsc-part-5.aspx">Part 5 - Installing Exchange Using DSC</a></p>
<p>&nbsp;</p>
<h1><span style="color:#2e74b5;">The QuickStart Template</span></h1>
<p><span style="font-size:medium;">Most of the resources that are available in the <b>xExchange</b> module have similar requirements when used in a configuration script. Almost all the resources require that a PSCredential object is passed in, which contains the credentials of the account that will be used to establish a Remote Powershell session to Exchange. Microsoft recommends that when credentials are used within a DSC configuration script, they be encrypted and decrypted using a certificate. If this is not done, passwords will be stored in plain text in the compiled .MOF files for each target computer. For more information, see:</span></p>
<p style="margin-left:30px;"><span style="font-size:medium;">Want to secure credentials in Windows PowerShell Desired State Configuration?</span><br /><a href="https://blogs.msdn.com/b/powershell/archive/2014/01/31/want-to-secure-credentials-in-windows-powershell-desired-state-configuration.aspx"><span style="color:#0563c1;font-size:medium;">https://blogs.msdn.com/b/powershell/archive/2014/01/31/want-to-secure-credentials-in-windows-powershell-desired-state-configuration.aspx</span></a></p>
<p>&nbsp;</p>
<p><span style="font-size:medium;">In addition to the full examples that are included with <b>xExchange</b>, I have created a template which contains common elements that will be used in most configuration scripts which utilize <b>xExchange</b>. This will hopefully make it easier to get started writing your own configuration scripts, or to understand the differences in components.</span></p>
<p>&nbsp;</p>
<h1><span style="color:#2e74b5;">Template Files</span></h1>
<p><span style="font-size:medium;">The template contains two files, <b>QuickStartTemplate.ps1</b>, and <b>QuickStartTemplate-Config.psd1</b>. <b>QuickStartTemplate.ps1</b> is the main configuration script, and what will be compiled into a .MOF file for DSC consumption. <b>QuickStartTemplate-Config.psd1</b> contains configuration data and variables that are passed into, and utilized by <b>QuickStartTemplate.ps1</b>. The full files look as follows:</span></p>
<p>&nbsp;</p>
<p><span style="font-size:medium;"><b><span style="text-decoration:underline;">QuickStartTemplate.ps1</span></b><span style="text-decoration:underline;"> Full:</span></span></p>
<pre><span style="color:#000000;">    Configuration QuickStartTemplate
    {
        </span><span style="color:#0000ff;">param</span><span style="color:#000000;">
        (
            [</span><span style="color:#008080;">PSCredential</span><span style="color:#000000;">]</span><span style="color:#800080;">$ShellCreds</span><span style="color:#000000;">
        )

        Import-DscResource -Module xExchange

        Node </span><span style="color:#800080;">$AllNodes</span><span style="color:#000000;">.NodeName
        {
            </span><span style="color:#008000;">#</span><span style="color:#008000;">Used when passing credentials securely. This configures the thumbprint of the </span><span style="color:#008000;">
</span><span style="color:#000000;">            </span><span style="color:#008000;">#</span><span style="color:#008000;">cert that will be used to decrypt the creds</span><span style="color:#008000;">
</span><span style="color:#000000;">            LocalConfigurationManager
            {
                CertificateId </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$Node</span><span style="color:#000000;">.Thumbprint
            }
        }
    }

    </span><span style="color:#008000;">#</span><span style="color:#008000;">Get credentials if they haven&#39;t already been passed</span><span style="color:#008000;">
</span><span style="color:#000000;">    </span><span style="color:#0000ff;">if</span><span style="color:#000000;"> (</span><span style="color:#800080;">$ShellCreds</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800080;">$null</span><span style="color:#000000;">)
    {
        </span><span style="color:#800080;">$ShellCreds</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">Get-Credential</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-style:italic;">-Message</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">Enter credentials for establishing Remote Powershell sessions to Exchange</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
    }

    </span><span style="color:#008000;">#</span><span style="color:#008000;">##Compiles the example</span><span style="color:#008000;">
</span><span style="color:#000000;">    QuickStartTemplate -ConfigurationData </span><span style="color:#800080;">$PSScriptRoot</span><span style="color:#000000;">\QuickStartTemplate-Config.psd1 -ShellCreds </span><span style="color:#800080;">$ShellCreds</span></pre>
<p>&nbsp;</p>
<p><span style="font-size:medium;"><b><span style="text-decoration:underline;">QuickStartTemplate-Config.psd1</span></b><span style="text-decoration:underline;"> Full:</span></span></p>
<pre><span style="color:#000000;">    @{
        AllNodes </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> @(
            </span><span style="color:#008000;">#</span><span style="color:#008000;">Settings in this section will apply to all nodes.</span><span style="color:#008000;">
</span><span style="color:#000000;">            @{
                NodeName        </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">*</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">

                </span><span style="color:#008000;">#</span><span style="color:#008000;">The path to the .cer file containing the public key of the Encryption</span><span style="color:#008000;">
</span><span style="color:#000000;">                </span><span style="color:#008000;">#</span><span style="color:#008000;">Certificate used to encrypt credentials for this node</span><span style="color:#008000;">
</span><span style="color:#000000;">
                CertificateFile </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">C:\publickey.cer</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">


                </span><span style="color:#008000;">#</span><span style="color:#008000;">The thumbprint of the Encryption Certificate used to decrypt the credentials</span><span style="color:#008000;">
</span><span style="color:#000000;">                </span><span style="color:#008000;">#</span><span style="color:#008000;">on target node</span><span style="color:#008000;">
</span><span style="color:#000000;">                Thumbprint      </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">98e1858ee4da01e4fb9f0519bc60d9c30f33b1c6</span><span style="color:#800000;">&#39;</span><span style="color:#000000;"> 
            }

            </span><span style="color:#008000;">#</span><span style="color:#008000;">Each individual server that will be configured needs to be defined next.</span><span style="color:#008000;">
</span><span style="color:#000000;">            @{
                NodeName </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">e15-1</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
            }

            @{
                NodeName </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">e15-2</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
            }
        );
    }</span></pre>
<p>&nbsp;</p>
<p><span style="font-size:medium;">To understand the basic DSC components of these, I recommend reading the following two Technet articles. The first article is useful for understanding the components in <b>QuickStartTemplate.ps1</b>, and how the config script is compiled into a MOF file. The second article helps to understand why it is a good idea to break some configuration into a separate section, which is what is done in <b>QuickStartTemplate-Config.psd1</b>, and how to do so.</span></p>
<p style="margin-left:30px;"><span style="font-size:medium;">Get Started with Windows PowerShell Desired State Configuration</span><br /><a href="https://technet.microsoft.com/en-us/library/dn249918.aspx"><span style="color:#0563c1;font-size:medium;">https://technet.microsoft.com/en-us/library/dn249918.aspx</span></a></p>
<p style="margin-left:30px;"><span style="font-size:medium;">Separating Configuration and Environment Data</span><br /><a href="https://technet.microsoft.com/en-us/library/dn249925.aspx"><span style="color:#0563c1;font-size:medium;">https://technet.microsoft.com/en-us/library/dn249925.aspx</span></a></p>
<p>&nbsp;</p>
<h1><span style="color:#2e74b5;">Individual Components</span></h1>
<p><span style="font-size:medium;">Now I&rsquo;ll break down the individual components of these that are not covered in the above articles.</span></p>
<p>&nbsp;</p>
<p><span style="font-size:medium;"><b><span style="text-decoration:underline;">QuickStartTemplate.ps1</span></b><span style="text-decoration:underline;"> Broken Down:</span></span></p>
<p><span style="font-size:medium;">The first section within the <strong>Configuration</strong> block is the parameters section. In this template, as well as most of my example scripts, there is only a single parameter being passed, a PSCredential object, <strong>$ShellCreds</strong>. These are the credentials that will be used by the resources to establish a Remote Powershell session to Exchange. The account being used must have appropriate RBAC rights to the corresponding Exchange cmdlets used by the resource (for instance, to use <b>xExchOwaVirtualDirectory</b>, the account must have access to the Get/Set-OwaVirtualDirectory cmdlets). Note that even though <b>xExchange</b> uses Remote Powershell, the server being configured is just making a Remote Powershell session to itself.</span></p>
<pre><span style="color:#000000;">    </span><span style="color:#0000ff;">param</span><span style="color:#000000;">
    (
        [</span><span style="color:#008080;">PSCredential</span><span style="color:#000000;">]</span><span style="color:#800080;">$ShellCreds</span><span style="color:#000000;">
    )</span></pre>
<p>&nbsp;</p>
<p><span style="font-size:medium;">The next line in the script imports the <b>xExchange</b> module for use as a DSC resource. Without doing this, the script will fail to compile if any <b>xExchange</b> resources are used.</span></p>
<pre><span style="color:#000000;">    Import-DscResource -Module xExchange</span></pre>
<p>&nbsp;</p>
<p><span style="font-size:medium;">For the template, only a single DSC resource is used within the Node block, a <b>LocalConfigurationManager</b> resource. In all other samples, <b>xExchange</b> resources are used within the Node block, after the <b>LocalConfigurationManager</b> section.</span></p>
<p><span style="font-size:medium;">The purpose of the <b>LocalConfigurationManager</b> resource within the template is to pass in the thumbprint of the certificate that the target node can use at run time to decrypt credentials.</span></p>
<p><span style="font-size:medium;"><strong>$Node.Thumbprint</strong> comes from <b>QuickStartTemplate-Config.psd1</b>.</span></p>
<pre><span style="color:#000000;">    LocalConfigurationManager
    {
        CertificateId </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$Node</span><span style="color:#000000;">.Thumbprint
    }</span></pre>
<p>&nbsp;</p>
<p><span style="font-size:medium;">Outside of the <strong>Configuration</strong> block, the first block of code is used to prompt for and store credentials when the configuration script is executed. These will then be passed into the <strong>Configuration</strong> block as a parameter. The reason I check to see if credentials are null is so that if I&rsquo;m troubleshooting or running the script multiple times for some reason, I only have to enter the credentials a single time.</span></p>
<pre><span style="color:#000000;">    </span><span style="color:#0000ff;">if</span><span style="color:#000000;"> (</span><span style="color:#800080;">$ShellCreds</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800080;">$null</span><span style="color:#000000;">)
    {
        </span><span style="color:#800080;">$ShellCreds</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">Get-Credential</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-style:italic;">-Message</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">Enter credentials for establishing Remote Powershell sessions to Exchange</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
    }</span></pre>
<p>&nbsp;</p>
<p><span style="font-size:medium;"><b><span style="text-decoration:underline;">QuickStartTemplate-Config.psd1</span></b><span style="text-decoration:underline;"> Broken Down:</span></span></p>
<p><span style="font-size:medium;">Within the <strong>AllNodes</strong> node of the configuration data, the first section defines configuration that will be specific to &hellip; all nodes. That is specified by the <strong>NodeName</strong> = &lsquo;*&rsquo;. The first item that is defined in this section is, <strong>CertificateFile</strong>,&nbsp;the path to public key export of the certificate that will be used to encrypt credentials on the node compiling the MOFs.&nbsp;The next defined item is <strong>Thumbprint</strong>. This is&nbsp;the thumbprint of the certificate that was used to encrypt the credentials, and&nbsp;that will be used on target nodes to decrypt the credentials. This certificate will need to be imported, with private key, on each target node that will be configured.</span></p>
<p><span style="font-size:medium;">If there were other things that were going to be common to all servers, like ProductKey, they could go in here. They could also just be hard coded in the configuration script. </span></p>
<pre><span style="color:#000000;">    @{
        NodeName        </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">*</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">

        CertificateFile </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">C:\publickey.cer</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">

        Thumbprint      </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">98e1858ee4da01e4fb9f0519bc60d9c30f33b1c6</span><span style="color:#800000;">&#39;</span><span style="color:#000000;"> 
    }</span></pre>
<p>&nbsp;</p>
<p><span style="font-size:medium;">The next section defines the individual nodes that will have MOF files created for them when the configuration script is compiled. For the template, all that is specified here is the <strong>NodeName</strong>. In most other examples, computer specific information is put in these as well.</span></p>
<pre><span style="color:#000000;">    @{
        NodeName </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">e15-1</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
    }

    @{
        NodeName </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">e15-2</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
    }</span></pre>
<p>&nbsp;</p>
<h1><span style="color:#2e74b5;">Adding an xExchange Resource</span></h1>
<p><span style="font-size:medium;">Now I am just going to add a single <b>xExchange</b> resource to the template, an <b>xExchOwaVirtualDirectory</b> resource. At this point, the configuration script is very close to the <b>SimpleOneResourceExample</b> that is also included with the module.</span></p>
<pre><span style="color:#000000;">    Configuration QuickStartTemplate
    {
        </span><span style="color:#0000ff;">param</span><span style="color:#000000;">
        (
            [</span><span style="color:#008080;">PSCredential</span><span style="color:#000000;">]</span><span style="color:#800080;">$ShellCreds</span><span style="color:#000000;">
        )

        Import-DscResource -Module xExchange

        Node </span><span style="color:#800080;">$AllNodes</span><span style="color:#000000;">.NodeName
        {
            </span><span style="color:#008000;">#</span><span style="color:#008000;">Used when passing credentials securely. This configures the thumbprint of the </span><span style="color:#008000;">
</span><span style="color:#000000;">            </span><span style="color:#008000;">#</span><span style="color:#008000;">cert that will be used to decrypt the creds</span><span style="color:#008000;">
</span><span style="color:#000000;">            LocalConfigurationManager
            {
                CertificateId </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#800080;">$Node</span><span style="color:#000000;">.Thumbprint
            }
        
<span class="auto-style1">            xExchOwaVirtualDirectory OWAVdir</span>
<span class="auto-style1">            {</span>
<span class="auto-style1">                Identity                      </span></span><span class="auto-style1" style="color:#ff0000;">=</span><span class="auto-style1" style="color:#000000;"> </span><span class="auto-style1" style="color:#800000;">&quot;$($Node.NodeName)\owa (Default Web Site)&quot;</span><span style="color:#000000;">
<span class="auto-style1">                Credential                    </span></span><span class="auto-style1" style="color:#ff0000;">=</span><span class="auto-style1" style="color:#000000;"> </span><span class="auto-style1" style="color:#800080;">$ShellCreds</span><span style="color:#000000;">
<span class="auto-style1">                BasicAuthentication           </span></span><span class="auto-style1" style="color:#ff0000;">=</span><span class="auto-style1" style="color:#000000;"> </span><span class="auto-style1" style="color:#800080;">$false</span><span style="color:#000000;">
<span class="auto-style1">                ExternalAuthenticationMethods </span></span><span class="auto-style1" style="color:#ff0000;">=</span><span class="auto-style1" style="color:#000000;"> </span><span class="auto-style1" style="color:#800000;">&#39;Ntlm&#39;</span><span class="auto-style1" style="color:#000000;">,</span><span class="auto-style1" style="color:#800000;">&#39;WindowsIntegrated&#39;</span><span style="color:#000000;">
<span class="auto-style1">                ExternalUrl                   </span></span><span class="auto-style1" style="color:#ff0000;">=</span><span class="auto-style1" style="color:#000000;"> </span><span class="auto-style1" style="color:#800000;">&quot;https://mail-ext.mikelab.local/owa&quot;</span><span style="color:#000000;">
<span class="auto-style1">                FormsAuthentication           </span></span><span class="auto-style1" style="color:#ff0000;">=</span><span class="auto-style1" style="color:#000000;"> </span><span class="auto-style1" style="color:#800080;">$false</span><span style="color:#000000;">
<span class="auto-style1">                InternalUrl                   </span></span><span class="auto-style1" style="color:#ff0000;">=</span><span class="auto-style1" style="color:#000000;"> </span><span class="auto-style1" style="color:#800000;">&quot;https://mail-int.mikelab.local/owa&quot;</span><span style="color:#000000;"><span class="auto-style1">    </span>
<span class="auto-style1">                WindowsAuthentication         </span></span><span class="auto-style1" style="color:#ff0000;">=</span><span class="auto-style1" style="color:#000000;"> </span><span class="auto-style1" style="color:#800080;">$true</span><span style="color:#000000;">
<span class="auto-style1">                AllowServiceRestart           </span></span><span class="auto-style1" style="color:#ff0000;">=</span><span class="auto-style1" style="color:#000000;"> </span><span class="auto-style1" style="color:#800080;">$true</span><span style="color:#000000;">
<span class="auto-style1">            }        </span>
        }
    }

    </span><span style="color:#008000;">#</span><span style="color:#008000;">Get credentials if they haven&#39;t already been passed</span><span style="color:#008000;">
</span><span style="color:#000000;">    </span><span style="color:#0000ff;">if</span><span style="color:#000000;"> (</span><span style="color:#800080;">$ShellCreds</span><span style="color:#000000;"> </span><span style="color:#ff0000;">-eq</span><span style="color:#000000;"> </span><span style="color:#800080;">$null</span><span style="color:#000000;">)
    {
        </span><span style="color:#800080;">$ShellCreds</span><span style="color:#000000;"> </span><span style="color:#ff0000;">=</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-weight:bold;">Get-Credential</span><span style="color:#000000;"> </span><span style="color:#5f9ea0;font-style:italic;">-Message</span><span style="color:#000000;"> </span><span style="color:#800000;">&#39;</span><span style="color:#800000;">Enter credentials for establishing Remote Powershell sessions to Exchange</span><span style="color:#800000;">&#39;</span><span style="color:#000000;">
    }

    </span><span style="color:#008000;">#</span><span style="color:#008000;">##Compiles the example</span><span style="color:#008000;">
</span><span style="color:#000000;">    QuickStartTemplate -ConfigurationData </span><span style="color:#800080;">$PSScriptRoot</span><span style="color:#000000;">\QuickStartTemplate-Config.psd1 -ShellCreds </span><span style="color:#800080;">$ShellCreds</span></pre>
<p>&nbsp;</p>
<h1><span style="color:#2e74b5;">Testing the Script</span></h1>
<p><span style="font-size:medium;">After updating the configuration script and data file with your own certificate information and computer information, the next step is to compile it. The very last line in the script is what initiates the compilation, so all you have to do is run the script. However you could just manually compile it with:</span></p>
<pre><span style="color:#000000;">    QuickStartTemplate -ConfigurationData </span><span style="color:#800080;">$PSScriptRoot</span><span style="color:#000000;">\QuickStartTemplate-Config.psd1 -ShellCreds </span><span style="color:#800080;">$ShellCreds</span></pre>
<p>&nbsp;</p>
<p><span style="font-size:medium;">After it prompts for credentials, if everything ran successfully, you will see output like the following. There should be both a .mof, and a .meta.mof file for each node that is defined in <b>QuickStartTemplate-Config.psd1</b>. The .mof is what actually contains information about how to use the DSC resources. The .meta.mof file contains information required to decrypt the credentials.</span></p>
<p></p>
<p style="margin-left:30px;"><span style="color:#0000ff;font-family:courier new,courier;">PS C:\QuickStartTemplate&gt; C:\QuickStartTemplate\QuickStartTemplate.ps1</span></p>
<p style="margin-left:30px;"></p>
<p style="margin-left:30px;"><span style="color:#0000ff;font-family:courier new,courier;">&nbsp;&nbsp;&nbsp; Directory: C:\QuickStartTemplate\QuickStartTemplate</span></p>
<p style="margin-left:30px;"></p>
<p style="margin-left:30px;"><span style="color:#0000ff;font-family:courier new,courier;">Mode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LastWriteTime&nbsp;&nbsp;&nbsp;&nbsp; Length Name</span><br /><span style="color:#0000ff;font-family:courier new,courier;">----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -------------&nbsp;&nbsp;&nbsp;&nbsp; ------ ----</span><br /><span style="color:#0000ff;font-family:courier new,courier;">-a---&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/10/2014&nbsp;&nbsp; 1:54 PM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2936 e15-1.mof</span><br /><span style="color:#0000ff;font-family:courier new,courier;">-a---&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/10/2014&nbsp;&nbsp; 1:54 PM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 848 e15-1.meta.mof</span><br /><span style="color:#0000ff;font-family:courier new,courier;">-a---&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/10/2014&nbsp;&nbsp; 1:54 PM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2936 e15-2.mof</span><br /><span style="color:#0000ff;font-family:courier new,courier;">-a---&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/10/2014&nbsp;&nbsp; 1:54 PM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 848 e15-2.meta.mof</span></p>
<p><span style="font-size:medium;">&nbsp;</span></p>
<p><span style="font-size:medium;">Next we need to configure the Local Configuration Manager on the target computers to be able to decrypt credentials using the specified certificate. This is done with the following command (in this case we are just doing a single computer, E15-1):</span></p>
<pre><span style="color:#000000;">    Set-DscLocalConfigurationManager -Path .\QuickStartTemplate -Verbose -ComputerName </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">E15-1</span><span style="color:#800000;">&quot;</span></pre>
<p>&nbsp;</p>
<p><span style="font-size:medium;">If it runs successfully, the output should look as follows:</span><span style="font-size:medium;"><br /></span></p>
<p><span style="font-size:medium;"><a href="https://i241.photobucket.com/albums/ff78/hendricksonmj123/DSC%20Part%202/Part2Setdsclocalconfig_zps46dc7268.png"><img alt=" " src="https://i241.photobucket.com/albums/ff78/hendricksonmj123/DSC%20Part%202/Part2Setdsclocalconfig_zps46dc7268.png" border="0" /></a><br /></span></p>
<p><span style="font-size:medium;">Finally, we can execute the configuration in Push mode. Again, we&rsquo;ll just work against a single computer. The command is:</span></p>
<pre><span style="color:#000000;">    Start-DscConfiguration -Verbose -Wait -Path .\QuickStartTemplate -ComputerName </span><span style="color:#800000;">&quot;</span><span style="color:#800000;">E15-1</span><span style="color:#800000;">&quot;</span><span style="color:#000000;">    </span></pre>
<p>&nbsp;</p>
<p><span style="font-size:medium;">If it runs successfully, the output should look similar to the following:</span></p>
<p><a href="https://i241.photobucket.com/albums/ff78/hendricksonmj123/DSC%20Part%202/Part2pushmode_zps17a67964.png"><img alt=" " src="https://i241.photobucket.com/albums/ff78/hendricksonmj123/DSC%20Part%202/Part2pushmode_zps17a67964.png" border="0" /></a></p>
<p>&nbsp;</p>
<h1><span style="color:#2e74b5;">Common Issues</span></h1>
<p><span style="font-size:medium;"><span style="text-decoration:underline;"><strong>Issue</strong></span>: Trying to apply the configuration fails with &ldquo;The SendConfigurationApply function did not succeed&rdquo;:</span></p>
<p><span style="font-size:medium;"><a href="https://i241.photobucket.com/albums/ff78/hendricksonmj123/DSC%20Part%202/part2certerror_zps9be5f038.png"><img alt=" " src="https://i241.photobucket.com/albums/ff78/hendricksonmj123/DSC%20Part%202/part2certerror_zps9be5f038.png" border="0" /></a><br /></span></p>
<p><span style="font-size:medium;">&nbsp;</span></p>
<p><span style="font-size:medium;"><span style="text-decoration:underline;"><strong>Cause</strong></span>: This can occur if you attempt to copy the Thumbprint of the certificate directly out of the properties window for the certificate. When you do this, it copies the thumbprint string in Unicode instead of ANSI.</span></p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/part%202%20cert%20props.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/part-2-cert-props.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/part%202%20cert%20props.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/part-2-cert-props.png" border="0" /></a></p>
<p><span style="font-size:medium;">This will not be noticeable in the Powershell ISE:</span></p>
<p><span style="font-size:medium;"><a href="https://i241.photobucket.com/albums/ff78/hendricksonmj123/DSC%20Part%202/part2thumbprintpic_zps080993fc.png"><img alt=" " src="https://i241.photobucket.com/albums/ff78/hendricksonmj123/DSC%20Part%202/part2thumbprintpic_zps080993fc.png" border="0" /></a><br /></span></p>
<p><span style="font-size:medium;">However, when you try to save the file, it will throw the following Warning:</span></p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/part%202%20save%20warning.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/part-2-save-warning.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/part%202%20save%20warning.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/part-2-save-warning.png" border="0" /></a></p>
<p><span style="font-size:medium;">If you open the file in notepad though, save it as type ANSI, and re-open the file in Notepad, you will see an extra ? listed before the thumbprint:</span></p>
<p style="margin-left:30px;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/part%202%20bad%20thumbprint.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/part-2-bad-thumbprint.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/01/84/part%202%20bad%20thumbprint.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-01-84/part-2-bad-thumbprint.png" border="0" /></a></p>
<p><span style="font-size:medium;"><span style="text-decoration:underline;"><strong>Solution</strong></span>: The easiest solution for this is to not copy and paste out of the certificate properties, and instead just manually type in the Thumbprint. If you still have issues, make sure that the file is saved in ANSI format using Notepad, and then check that you don&rsquo;t have any hidden characters in the string.</span></p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Introducing xExchange - Managing Exchange 2013 With DSC - Part 1</title>
      <link>https://docs.microsoft.com/archive/blogs/mhendric/introducing-xexchange-managing-exchange-2013-with-dsc-part-1</link>
      <pubDate>Fri, 17 Oct 2014 09:47:00 GMT</pubDate>
      <dc:creator><![CDATA[Mike Hendrickson [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mhendric/2014/10/17/introducing-xexchange-managing-exchange-2013-with-dsc-part-1/</guid>
      <description><![CDATA[Managing Exchange 2013 With DSC
Part 1 - Introducing xExchange
Part 2 - The QuickStart...]]></description>
      <content:encoded><![CDATA[<h1><span style="color:#2e74b5;">Managing Exchange 2013 With DSC</span></h1>
<p>Part 1 - Introducing xExchange</p>
<p><a href="/b/mhendric/archive/2014/10/17/managing-exchange-2013-with-dsc-part-2-the-quickstart-template.aspx">Part 2 - The QuickStart Template</a></p>
<p><a href="/b/mhendric/archive/2014/10/27/managing-exchange-2013-with-dsc-part-3-automating-mount-point-setup-and-maintenance-for-autoreseed.aspx">Part 3 - Automating Mount Point Setup and Maintenance for AutoReseed</a></p>
<p><a href="/b/mhendric/archive/2014/11/10/managing-exchange-2013-with-dsc-part-4-using-a-dsc-pull-server-to-deploy-the-xexchange-module.aspx">Part 4 - Using a DSC Pull Server to Deploy the xExchange Module</a></p>
<p><a href="/b/mhendric/archive/2014/12/16/installing-exchange-using-dsc-managing-exchange-2013-with-dsc-part-5.aspx">Part 5 - Installing Exchange Using DSC</a></p>
<p>&nbsp;</p>
<h1><span style="color:#2e74b5;">Introducing the xExchange Module for Powershell Desired State Configuration</span></h1>
<p><span style="font-size:medium;">Welcome to the first in a series of blog posts which will be covering the <strong>xExchange</strong> module for Powershell Desired State Configuration. The <b>xExchange</b> module is a DSC module designed for configuring Exchange 2013 servers, and can be downloaded from the PowerShell Gallery <a href="https://www.powershellgallery.com/packages/xExchange/">here</a>. With help from Jason Walker, creating Exchange DSC resources (as well as <a href="https://gallery.technet.microsoft.com/xBitlocker-Module-794c4bf8">Bitlocker resources</a>) has been one of my main projects for the past few months. </span></p>
<p><span style="font-size:medium;">It is my goal in this blog series to gradually introduce the various components that are required to utilize <strong>xExchange</strong> resources within a DSC configuration script. I realize the module is large, and is probably pretty daunting for someone that hasn&rsquo;t worked with DSC before (and maybe even for those that have). That being the case, I plan on introducing concepts in separate posts in a way that each post builds on the ones before them.</span></p>
<p>&nbsp;</p>
<h1><span style="color:#2e74b5;">Why DSC?</span></h1>
<p><span style="font-size:medium;">The main driver for wanting to create DSC resources for Exchange was to help improve the configuration management story for one of the customers who I work with. My customer runs a very complex Exchange environment, which is extensively customized to meet business requirements. A number of the configuration changes they make, especially ones which are stored in IIS, are prone to being reverted when Service Packs and Cumulative Updates are applied. With previous versions of Exchange, they had to maintain multiple sets of configuration scripts. One set of scripts would actually apply the configuration. The other set of scripts would verify all the settings that were set by the configuration scripts. If any updates were applied, or if they were troubleshooting issues, they could run the verification scripts to see if anything changed, and then re-run the configuration scripts to fix any issues.</span></p>
<p><span style="font-size:medium;">While the set of configuration and verification scripts worked, it required a lot of work to keep the two in sync, and also required a lot of work running the scripts semi periodically in a large scale environment. Once DSC was released, I realized that it would be a great opportunity to consolidate the handful of scripts that my customer had, and group the configuration and verification for each Exchange resource type into more logical units. It also was a good opportunity to better automate their configuration story. Once the DSC configuration is applied in pull mode, they can leave the configuration alone, and any divergences in configuration will be automatically corrected. </span></p>
<p>&nbsp;</p>
<h1><span style="color:#2e74b5;">Requirements</span></h1>
<p><span style="font-size:medium;">The <strong>xExchange</strong> module has the following requirements for the machines that will be managed:</span></p>
<ul>
<li>
<p><span style="font-size:medium;">Exchange Server 2013 (only tested on Exchange 2013 CU5 and CU6 as of 10/10/2014)</span></p>
</li>
<li>
<p><span style="font-size:medium;">Windows Management Framework 4.0</span></p>
</li>
<li>
<p><span style="font-size:medium;">Windows Server 2012 or Windows Server 2012 R2 (earlier versions are not blocked, but they are untested)</span></p>
</li>
</ul>
<p>&nbsp;</p>
<h1><span style="color:#2e74b5;">Resources</span></h1>
<p><span style="color:#000000;"><span style="font-size:medium;">The <strong>xExchange</strong> module contains 24 DSC resources (as of 10/6/2014). A majority of the resources (21)&nbsp;correspond to existing Exchange Powershell cmdlets, and are as follows:</span></span></p>
<table align="center" style="width:900px;" border="1" cellspacing="0" cellpadding="0"><colgroup><col width="320" /></colgroup><colgroup><col width="400" /></colgroup><colgroup><col width="180" /></colgroup>
<tbody>
<tr>
<td height="20" class="auto-style1"><strong><span style="text-decoration:underline;"><span style="font-family:Calibri;font-size:medium;">Resource</span></span></strong></td>
<td width="353"><strong><span style="text-decoration:underline;"><span style="font-family:Calibri;font-size:medium;">Associated Exchange Cmdlet(s)</span></span></strong></td>
<td width="182"><strong><span style="text-decoration:underline;"><span style="font-family:Calibri;font-size:medium;">Category</span></span></strong></td>
</tr>
<tr>
<td height="20" class="auto-style1"><span style="font-family:Calibri;font-size:medium;">MSFT_xExchActiveSyncVirtualDirectory</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Set-ActiveSyncVirtualDirectory</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Client Access Server</span></td>
</tr>
<tr>
<td height="20" class="auto-style1"><span style="font-family:Calibri;font-size:medium;">MSFT_xExchAutodiscoverVirtualDirectory</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Set-AutodiscoverVirtualDirectory</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Client Access Server</span></td>
</tr>
<tr>
<td height="20" class="auto-style1"><span style="font-family:Calibri;font-size:medium;">MSFT_xExchClientAccessServer</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Set-ClientAccessServer</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Client Access Server</span></td>
</tr>
<tr>
<td height="20" class="auto-style1"><span style="font-family:Calibri;font-size:medium;">MSFT_xExchDatabaseAvailabilityGroup</span></td>
<td><span style="font-family:Calibri;font-size:medium;">New/Set-DatabaseAvailabilityGroup</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Database Availability Group</span></td>
</tr>
<tr>
<td height="20" class="auto-style1"><span style="font-family:Calibri;font-size:medium;">MSFT_xExchDatabaseAvailabilityGroupMember</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Add-DatabaseAvailabilityGroupServer</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Database Availability Group</span></td>
</tr>
<tr>
<td height="20" class="auto-style1"><span style="font-family:Calibri;font-size:medium;">MSFT_xExchDatabaseAvailabilityGroupNetwork</span></td>
<td><span style="font-family:Calibri;font-size:medium;">New/Remove/Set-DatabaseAvailabilityGroupNetwork</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Database Availability Group</span></td>
</tr>
<tr>
<td height="20" class="auto-style1"><span style="font-family:Calibri;font-size:medium;">MSFT_xExchEcpVirtualDirectory</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Set-EcpVirtualDirectory</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Client Access Server</span></td>
</tr>
<tr>
<td height="20" class="auto-style1"><span style="font-family:Calibri;font-size:medium;">MSFT_xExchExchangeCertificate</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Enable/Import/Remove-ExchangeCertificate</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Exchange Server</span></td>
</tr>
<tr>
<td height="20" class="auto-style1"><span style="font-family:Calibri;font-size:medium;">MSFT_xExchExchangeServer</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Set-ExchangeServer</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Exchange Server</span></td>
</tr>
<tr>
<td height="20" class="auto-style1"><span style="font-family:Calibri;font-size:medium;">MSFT_xExchImapSettings</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Set-ImapSettings</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Client Access Server</span></td>
</tr>
<tr>
<td height="20" class="auto-style1"><span style="font-family:Calibri;font-size:medium;">MSFT_xExchMailboxDatabase</span></td>
<td><span style="font-family:Calibri;font-size:medium;">New/Set-MailboxDatabase</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Mailbox Server/Database</span></td>
</tr>
<tr>
<td height="20" class="auto-style1"><span style="font-family:Calibri;font-size:medium;">MSFT_xExchMailboxDatabaseCopy</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Add/Set-MailboxDatabaseCopy</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Mailbox Server/Database</span></td>
</tr>
<tr>
<td height="20" class="auto-style1"><span style="font-family:Calibri;font-size:medium;">MSFT_xExchMapiVirtualDirectory</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Set-MapiVirtualDirectory</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Client Access Server</span></td>
</tr>
<tr>
<td height="20" class="auto-style1"><span style="font-family:Calibri;font-size:medium;">MSFT_xExchOabVirtualDirectory</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Set-OabVirtualDirectory</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Client Access Server</span></td>
</tr>
<tr>
<td height="20" class="auto-style1"><span style="font-family:Calibri;font-size:medium;">MSFT_xExchOutlookAnywhere</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Set-OutlookAnywhere</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Client Access Server</span></td>
</tr>
<tr>
<td height="20" class="auto-style1"><span style="font-family:Calibri;font-size:medium;">MSFT_xExchOwaVirtualDirectory</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Set-OwaVirtualDirectory</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Client Access Server</span></td>
</tr>
<tr>
<td height="20" class="auto-style1"><span style="font-family:Calibri;font-size:medium;">MSFT_xExchPopSettings</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Set-PopSettings</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Client Access Server</span></td>
</tr>
<tr>
<td height="20" class="auto-style1"><span style="font-family:Calibri;font-size:medium;">MSFT_xExchPowershellVirtualDirectory</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Set-PowershellVirtualDirectory</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Client Access Server</span></td>
</tr>
<tr>
<td height="20" class="auto-style1"><span style="font-family:Calibri;font-size:medium;">MSFT_xExchReceiveConnector</span></td>
<td><span style="font-family:Calibri;font-size:medium;">New/Remove/Set-ReceiveConnector</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Transport Server</span></td>
</tr>
<tr>
<td height="20" class="auto-style1"><span style="font-family:Calibri;font-size:medium;">MSFT_xExchUMService</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Set-UMService</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Unified Messaging Server</span></td>
</tr>
<tr>
<td height="20" class="auto-style1"><span style="font-family:Calibri;font-size:medium;">MSFT_xExchWebServicesVirtualDirectory</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Set-WebServicesVirtualDirectory</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Client Access Server</span></td>
</tr>
</tbody>
</table>
<p><span style="color:#000000;"><span style="font-size:medium;">&nbsp;</span></span></p>
<p><span style="color:#000000;"><span style="font-size:medium;">The first resource that does not correspond to any existing Exchange cmdlet is the <strong>xExchAutoMountPoint</strong> resource. This will be covered in detail in a separate blog post:<br /></span></span></p>
<table align="center" style="width:600px;" border="1" cellspacing="0" cellpadding="0"><colgroup><col width="300" /></colgroup><colgroup><col width="300" /></colgroup>
<tbody>
<tr>
<td width="244" height="20"><strong><span style="text-decoration:underline;"><span style="font-family:Calibri;font-size:medium;">Resource</span></span></strong></td>
<td width="182"><strong><span style="text-decoration:underline;"><span style="font-family:Calibri;font-size:medium;">Category</span></span></strong></td>
</tr>
<tr>
<td height="20"><span style="font-family:Calibri;font-size:medium;">MSFT_xExchAutoMountPoint</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Mailbox Server/Database</span></td>
</tr>
</tbody>
</table>
<p><span style="color:#000000;"><span style="font-size:medium;">&nbsp;</span></span></p>
<p><span style="color:#000000;"><span style="font-size:medium;">The last two resources that are available are used for synchronization purposes. The first is used while creating Database Availability Groups, and the second is used when creating Mailbox Database copies. Both of these will be covered in a separate blog post as well:<br /></span></span></p>
<table align="center" style="width:600px;" border="1" cellspacing="0" cellpadding="0"><colgroup><col width="300" /></colgroup><colgroup><col width="300" /></colgroup>
<tbody>
<tr>
<td width="244" height="20"><strong><span style="text-decoration:underline;"><span style="font-family:Calibri;font-size:medium;">Resource</span></span></strong></td>
<td width="182"><strong><span style="text-decoration:underline;"><span style="font-family:Calibri;font-size:medium;">Category</span></span></strong></td>
</tr>
<tr>
<td height="20"><span style="font-family:Calibri;font-size:medium;">MSFT_xExchWaitForDAG</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Database Availability Group</span></td>
</tr>
<tr>
<td height="20"><span style="font-family:Calibri;font-size:medium;">MSFT_xExchWaitForMailboxDatabase</span></td>
<td><span style="font-family:Calibri;font-size:medium;">Mailbox Server/Database</span></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<h1><span style="color:#2e74b5;">Exploring the xExchange Module</span></h1>
<p><span style="font-size:medium;">After downloading the <b>xExchange</b> module, copy the extracted <b>xExchange</b> folder to &lsquo;%SYSTEMDRIVE%\Program Files\WindowsPowerShell\Modules&rsquo;. The folder structure should look like:</span></p>
<p></p>
<p style="margin-left:30px;"><span style="color:#0000ff;font-family:courier new,courier;">PS C:\&gt; Get-ChildItem &#39;C:\Program Files\WindowsPowerShell\Modules\xExchange&#39;</span></p>
<p style="margin-left:30px;"></p>
<p style="margin-left:30px;"><span style="color:#0000ff;font-family:courier new,courier;">&nbsp;&nbsp;&nbsp; Directory: C:\Program Files\WindowsPowerShell\Modules\xExchange</span></p>
<p style="margin-left:30px;"></p>
<p style="margin-left:30px;"><span style="color:#0000ff;font-family:courier new,courier;">Mode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LastWriteTime&nbsp;&nbsp;&nbsp;&nbsp; Length Name</span><br /><span style="color:#0000ff;font-family:courier new,courier;">----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -------------&nbsp;&nbsp;&nbsp;&nbsp; ------ ----</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/10/2014&nbsp; 12:02 PM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DSCResources</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/10/2014&nbsp; 12:02 PM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Examples</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/10/2014&nbsp; 12:02 PM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Misc</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/10/2014&nbsp; 12:02 PM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Test</span><br /><span style="color:#0000ff;font-family:courier new,courier;">-a---&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/10/2014&nbsp; 11:38 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5652 xExchange.psd1</span><br /><span style="color:#0000ff;font-family:courier new,courier;">-a---&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/10/2014&nbsp;&nbsp; 7:55 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 59652 xExchange_Documentation.html</span></p>
<p><span style="font-size:medium;">&nbsp;</span></p>
<p><span style="font-size:medium;">To confirm that the xExchange module has been correctly detected, run Get-DscResource. You should see all 24 resources listed:</span></p>
<p></p>
<p style="margin-left:30px;"><span style="color:#0000ff;font-family:courier new,courier;">PS C:\&gt; Get-DscResource | where {$_.Module -like &quot;xExchange&quot;} | ft Name, Module</span></p>
<p style="margin-left:30px;"></p>
<p style="margin-left:30px;"><span style="color:#0000ff;font-family:courier new,courier;">Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Module</span><br /><span style="color:#0000ff;font-family:courier new,courier;">----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ------</span><br /><span style="color:#0000ff;font-family:courier new,courier;">xExchActiveSyncVirtualDirectory&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xExchange</span><br /><span style="color:#0000ff;font-family:courier new,courier;">xExchAutodiscoverVirtualDirectory&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xExchange</span><br /><span style="color:#0000ff;font-family:courier new,courier;">xExchAutoMountPoint&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xExchange</span><br /><span style="color:#0000ff;font-family:courier new,courier;">xExchClientAccessServer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xExchange</span><br /><span style="color:#0000ff;font-family:courier new,courier;">xExchDatabaseAvailabilityGroup&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xExchange</span><br /><span style="color:#0000ff;font-family:courier new,courier;">xExchDatabaseAvailabilityGroupMember&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xExchange</span><br /><span style="color:#0000ff;font-family:courier new,courier;">xExchDatabaseAvailabilityGroupNetwork&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xExchange</span><br /><span style="color:#0000ff;font-family:courier new,courier;">xExchEcpVirtualDirectory&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xExchange</span><br /><span style="color:#0000ff;font-family:courier new,courier;">xExchExchangeCertificate&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xExchange</span><br /><span style="color:#0000ff;font-family:courier new,courier;">xExchExchangeServer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xExchange</span><br /><span style="color:#0000ff;font-family:courier new,courier;">xExchImapSettings&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xExchange</span><br /><span style="color:#0000ff;font-family:courier new,courier;">xExchMailboxDatabase&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xExchange</span><br /><span style="color:#0000ff;font-family:courier new,courier;">xExchMailboxDatabaseCopy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xExchange</span><br /><span style="color:#0000ff;font-family:courier new,courier;">xExchMapiVirtualDirectory&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xExchange</span><br /><span style="color:#0000ff;font-family:courier new,courier;">xExchOabVirtualDirectory&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xExchange</span><br /><span style="color:#0000ff;font-family:courier new,courier;">xExchOutlookAnywhere&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xExchange</span><br /><span style="color:#0000ff;font-family:courier new,courier;">xExchOwaVirtualDirectory&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xExchange</span><br /><span style="color:#0000ff;font-family:courier new,courier;">xExchPopSettings&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xExchange</span><br /><span style="color:#0000ff;font-family:courier new,courier;">xExchPowerShellVirtualDirectory&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xExchange</span><br /><span style="color:#0000ff;font-family:courier new,courier;">xExchReceiveConnector&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xExchange</span><br /><span style="color:#0000ff;font-family:courier new,courier;">xExchUMService&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xExchange</span><br /><span style="color:#0000ff;font-family:courier new,courier;">xExchWaitForDAG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xExchange</span><br /><span style="color:#0000ff;font-family:courier new,courier;">xExchWaitForMailboxDatabase&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xExchange</span><br /><span style="color:#0000ff;font-family:courier new,courier;">xExchWebServicesVirtualDirectory&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xExchange</span></p>
<p><span style="font-size:medium;">&nbsp;</span></p>
<p><span style="font-size:medium;">If you look in the <b>DSCResources</b> folder, you will see all the same <b>xExchange</b> resources that were listed in the Get-DscResource output:</span></p>
<p></p>
<p style="margin-left:30px;"><span style="color:#0000ff;font-family:courier new,courier;">PS C:\&gt; Get-ChildItem &#39;C:\Program Files\WindowsPowerShell\Modules\xExchange\DSCResources&#39;</span></p>
<p style="margin-left:30px;"></p>
<p style="margin-left:30px;"><span style="color:#0000ff;font-family:courier new,courier;">&nbsp;&nbsp;&nbsp; Directory: C:\Program Files\WindowsPowerShell\Modules\xExchange\DSCResources</span></p>
<p style="margin-left:30px;"></p>
<p style="margin-left:30px;"><span style="color:#0000ff;font-family:courier new,courier;">Mode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LastWriteTime&nbsp;&nbsp;&nbsp;&nbsp; Length Name</span><br /><span style="color:#0000ff;font-family:courier new,courier;">----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -------------&nbsp;&nbsp;&nbsp;&nbsp; ------ ----</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/3/2014&nbsp; 10:18 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSFT_xExchActiveSyncVirtualDirectory</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/3/2014&nbsp; 10:18 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSFT_xExchAutodiscoverVirtualDirectory</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/3/2014&nbsp; 10:18 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSFT_xExchAutoMountPoint</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/3/2014&nbsp; 10:18 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSFT_xExchClientAccessServer</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/3/2014&nbsp; 10:18 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSFT_xExchDatabaseAvailabilityGroup</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/3/2014&nbsp; 10:18 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSFT_xExchDatabaseAvailabilityGroupMember</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/3/2014&nbsp; 10:18 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSFT_xExchDatabaseAvailabilityGroupNetwork</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/3/2014&nbsp; 10:18 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSFT_xExchEcpVirtualDirectory</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/3/2014&nbsp; 10:18 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSFT_xExchExchangeCertificate</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/3/2014&nbsp; 10:18 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSFT_xExchExchangeServer</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/3/2014&nbsp; 10:18 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSFT_xExchImapSettings</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/3/2014&nbsp; 10:18 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSFT_xExchMailboxDatabase</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/3/2014&nbsp; 10:18 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSFT_xExchMailboxDatabaseCopy</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/3/2014&nbsp; 10:18 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSFT_xExchMapiVirtualDirectory</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/3/2014&nbsp; 10:18 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSFT_xExchOabVirtualDirectory</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/3/2014&nbsp; 10:18 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSFT_xExchOutlookAnywhere</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/3/2014&nbsp; 10:18 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSFT_xExchOwaVirtualDirectory</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/3/2014&nbsp; 10:18 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSFT_xExchPopSettings</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/3/2014&nbsp; 10:18 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSFT_xExchPowershellVirtualDirectory</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/3/2014&nbsp; 10:18 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSFT_xExchReceiveConnector</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/3/2014&nbsp; 10:18 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSFT_xExchUMService</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/3/2014&nbsp; 10:18 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSFT_xExchWaitForDAG</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/3/2014&nbsp; 10:18 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSFT_xExchWaitForMailboxDatabase</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/3/2014&nbsp; 10:18 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MSFT_xExchWebServicesVirtualDirectory</span></p>
<p><span style="font-size:medium;">&nbsp;</span></p>
<p><span style="font-size:medium;">The <b>Examples</b> folder contains a handful of sample configuration scripts that show how to use various <b>xExchange</b> resources:</span></p>
<p></p>
<p style="margin-left:30px;"><span style="color:#0000ff;font-family:courier new,courier;">PS C:\&gt; Get-ChildItem &#39;C:\Program Files\WindowsPowerShell\Modules\xExchange\Examples&#39;</span></p>
<p style="margin-left:30px;"></p>
<p style="margin-left:30px;"><span style="color:#0000ff;font-family:courier new,courier;">&nbsp;&nbsp;&nbsp; Directory: C:\Program Files\WindowsPowerShell\Modules\xExchange\Examples</span></p>
<p style="margin-left:30px;"></p>
<p style="margin-left:30px;"><span style="color:#0000ff;font-family:courier new,courier;">Mode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LastWriteTime&nbsp;&nbsp;&nbsp;&nbsp; Length Name</span><br /><span style="color:#0000ff;font-family:courier new,courier;">----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -------------&nbsp;&nbsp;&nbsp;&nbsp; ------ ----</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/10/2014&nbsp; 12:02 PM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ConfigureAutoMountPoint-FromCalculator</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/10/2014&nbsp; 12:02 PM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ConfigureAutoMountPoints-Manual</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/10/2014&nbsp; 12:02 PM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ConfigureDatabases-FromCalculator</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/10/2014&nbsp; 12:02 PM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ConfigureDatabases-Manual</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/10/2014&nbsp; 12:02 PM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ConfigureVirtualDirectories</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/10/2014&nbsp; 12:02 PM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CreateAndConfigureDAG</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/10/2014&nbsp; 12:04 PM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EndToEndExample</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/10/2014&nbsp; 12:02 PM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HelperScripts</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/10/2014&nbsp; 12:02 PM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QuickStartTemplate</span><br /><span style="color:#0000ff;font-family:courier new,courier;">d----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/10/2014&nbsp; 12:02 PM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SimpleOneResourceExample</span></p>
<p><span style="font-size:medium;">&nbsp;</span></p>
<p><span style="font-size:medium;">The <b>Test</b> folder contains the tests that were used to verify resource functionality during development of the module. There should be no need to use this if just writing configuration scripts, but this may be useful to others who are trying to write their own DSC modules or resources:</span></p>
<p></p>
<p style="margin-left:30px;"><span style="color:#0000ff;font-family:courier new,courier;">PS C:\&gt; Get-ChildItem &#39;C:\Program Files\WindowsPowerShell\Modules\xExchange\Test&#39;</span></p>
<p style="margin-left:30px;"></p>
<p style="margin-left:30px;"><span style="color:#0000ff;font-family:courier new,courier;">&nbsp;&nbsp;&nbsp; Directory: C:\Program Files\WindowsPowerShell\Modules\xExchange\Test</span></p>
<p style="margin-left:30px;"></p>
<p style="margin-left:30px;"><span style="color:#0000ff;font-family:courier new,courier;">Mode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LastWriteTime&nbsp;&nbsp;&nbsp;&nbsp; Length Name</span><br /><span style="color:#0000ff;font-family:courier new,courier;">----&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -------------&nbsp;&nbsp;&nbsp;&nbsp; ------ ----</span><br /><span style="color:#0000ff;font-family:courier new,courier;">-a---&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10/10/2014&nbsp; 10:12 AM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 31091 Test-xExchange.ps1</span></p>
<p><span style="font-size:medium;">&nbsp;</span></p>
<h1><span style="color:#2e74b5;">Learning More about xExchange</span></h1>
<p><span style="font-size:medium;">In the next post in this series, I will talk about the included <b>QuickStartTemplate</b>. This consists of two files that contain common elements used in most <b>xExchange</b> configuraton scripts. In subsequent posts, I plan to cover at least the following topics:</span></p>
<ul>
<li>
<p><span style="font-size:medium;">Creating and configuring one or more Database Availability Groups</span></p>
</li>
<li>
<p><span style="font-size:medium;">Configuring CAS settings for multiple Active Directory Sites</span></p>
</li>
<li>
<p><span style="font-size:medium;">Using the CSVs that are generated by the Exchange Server Role Requirements Calculator to automatically build out mount points, databases and copies</span></p>
</li>
<li>
<p><span style="font-size:medium;">Using xExchange with a DSC Pull Server</span></p>
</li>
</ul>
<p><span style="font-size:medium;">&nbsp;</span></p>
<h1><span style="color:#2e74b5;">Resources</span></h1>
<p><span style="font-size:medium;">First, here&#39;s the link to download the xExchange module:</span></p>
<p style="margin-left:30px;"><span style="font-size:medium;">PowerShell Gallery | xExchange</span><br /><a href="https://www.powershellgallery.com/packages/xExchange/"><span style="color:#0563c1;font-size:medium;">https://www.powershellgallery.com/packages/xExchange/</span></a></p>
<p>&nbsp;</p>
<p><span style="font-size:medium;">Here&rsquo;s a handful of resources that I found helpful when learning about DSC:</span></p>
<p style="margin-left:30px;"><span style="font-size:medium;">Get Started with Windows PowerShell Desired State Configuration</span><br /><a href="https://technet.microsoft.com/en-us/library/dn249918.aspx"><span style="color:#0563c1;font-size:medium;">https://technet.microsoft.com/en-us/library/dn249918.aspx</span></a></p>
<p style="margin-left:30px;"><span style="font-size:medium;">Separating Configuration and Environment Data</span><br /><a href="https://technet.microsoft.com/en-us/library/dn249925.aspx"><span style="color:#0563c1;font-size:medium;">https://technet.microsoft.com/en-us/library/dn249925.aspx</span></a></p>
<p style="margin-left:30px;"><span style="font-size:medium;">Desired State Configuration Blog Series &ndash; Part 1, Information about DSC</span><br /><a href="/b/privatecloud/archive/2014/04/25/desired-state-configuration-blog-series-part-1-learning-about-dsc.aspx"><span style="color:#0563c1;font-size:medium;">https://blogs.technet.com/b/privatecloud/archive/2014/04/25/desired-state-configuration-blog-series-part-1-learning-about-dsc.aspx</span></a></p>
<p style="margin-left:30px;"><span style="font-size:medium;">Want to secure credentials in Windows PowerShell Desired State Configuration?</span><br /><a href="https://blogs.msdn.com/b/powershell/archive/2014/01/31/want-to-secure-credentials-in-windows-powershell-desired-state-configuration.aspx"><span style="color:#0563c1;font-size:medium;">https://blogs.msdn.com/b/powershell/archive/2014/01/31/want-to-secure-credentials-in-windows-powershell-desired-state-configuration.aspx</span></a></p>
<p style="margin-left:30px;">&nbsp;</p>]]></content:encoded>
    </item>
  </channel>
</rss>