<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>Webbanshee</title>
	<atom:link href="https://webbanshee.net/feed/" rel="self" type="application/rss+xml" />
	<link>https://webbanshee.net</link>
	<description>Your Exchange Server Blog</description>
	<lastBuildDate>Thu, 28 Apr 2022 07:43:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://webbanshee.net/wp-content/uploads/2017/01/WB_BL_RND-150x150.png</url>
	<title>Webbanshee</title>
	<link>https://webbanshee.net</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">122610384</site>	<item>
		<title>StalledDueToSource_DiskLatency Mailbox Export</title>
		<link>https://webbanshee.net/stalledduetosource_disklatency/</link>
					<comments>https://webbanshee.net/stalledduetosource_disklatency/#respond</comments>
		
		<dc:creator><![CDATA[WebBanshee]]></dc:creator>
		<pubDate>Sat, 05 Feb 2022 13:29:14 +0000</pubDate>
				<category><![CDATA[Serverside]]></category>
		<category><![CDATA[2013]]></category>
		<category><![CDATA[2016]]></category>
		<category><![CDATA[2019]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[MailboxExport]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Throttling]]></category>
		<guid isPermaLink="false">https://webbanshee.net/?p=4118</guid>

					<description><![CDATA[<style>.key{background:#444444;padding-left: 5px;padding-right: 5px;padding-top: 2px;padding-bottom: 2px;color:#fefefe;border-radius: 3px;font-size: 14px;}</style>
<p><a class="ex-link" href="https://webbanshee.net/stalledduetosource_disklatency/"><img style="width:200px; border-radius:8px;" src="https://webbanshee.net/wp-content/uploads/2022/01/StalledDueToSourceDiskLatency_10_saveas_final.svg"/><span class="exTeaser" style="width:70%;">Finish mailbox export requests that are StalledDueToSource_DiskLatency</span><br />
<span class="exText" style="width:70%;" >Yesterday I exported a 30GB Mailbox to our SFTP server. The request always stalled at the end. As a consequence, the export started to loop and the the export .pst was growing much bigger than the initial mailbox size<span style="font-size: 11px !Important; width: 10%; height: 5%; color: #993333; padding-left: 20px;">......read more</span></span></a></p>
<p>The post <a rel="nofollow" href="https://webbanshee.net/stalledduetosource_disklatency/">StalledDueToSource_DiskLatency Mailbox Export</a> appeared first on <a rel="nofollow" href="https://webbanshee.net">Webbanshee</a>.</p>
]]></description>
										<content:encoded><![CDATA[<style>
.num{margin-top:2px!Important; margin-right:10px;} h2 {font-weight: bold;text-decoration:none;font-size: 20px!Important;} .see {overflow-x: scroll!Important; overflow-y: hidden;white-space:nowrap;} .wpe-box-note3 {color:#333;} .wp-svg-sun-3 {font-size:24px!Important;position:relative;top:5px;left:5px;}
</style>
<p>Hello fellow Exchange Admins, Yesterday I exported a 30GB Mailbox as a .pst file to our SFTP server. At about 90% the MailboxExportRequest stalled with StalledDueToSource_DiskLatency. </p>
<p>No other exports were running from the source server. I even disabled all scheduled tasks that could have an impact on the database where the mailbox is mounted. </p>
<p>However, the export request always switched to: <span style="font-weight:bold;">StalledDueToSource_DiskLatency</span></p>
<p>As a consequence, the export started to loop. It just created a new folder hierarchy and started to export the items again.</p>
<p>Therefore the export .pst was growing much bigger than the initial mailbox size. In other words, this can blow up your storage capacities if you have a large mailbox and leave the export overnight! Not to mention that the export is useless afterward.</p>
<p>In this post, I want to share how I worked around the StalledDueToSource_DiskLatency condition. </p>
<div class="wpe-box wpe-box-alert" style="background: #FBF4939C!Important; font-weight:bold;">
The solution requires that you have a DAG in place.
</div>
<p>Let&#8217;s start at the beginning:</p>
<div class="wpe-box wpe-box-note3" style="color:#232366;font-weight:bold;">
First, I started the Mailbox Export Request using the Priority switch with <span style="color:#993333;font-weight:bold;">Emergency</span>.<br />
So the export request is being prioritized over other jobs.</p>
<div class="wpe-box wpe-box-note see" style="color:#333;font-weight:bold;">
New-MailboxExportRequest -Mailbox <span style="color:#993333;font-weight:bold;">MailboxToExport</span> -Name <span style="color:#993333;font-weight:bold;">IndividualNameOfTheExportRequest</span> -BatchName <span style="color:#993333;font-weight:bold;">BatchName</span> -BadItemLimit <span style="color:#993333;font-weight:bold;">0</span> -LargeItemLimit <span style="color:#993333;font-weight:bold;">0</span> -FilePath <span style="color:#993333;font-weight:bold;">&#8220;\\PathToExportLocation\NameOfExportedMailbox.pst&#8221;</span> -Priority <span style="color:#993333;font-weight:bold;">Emergency</span>
</div>
</div>
<div class="wpe-box wpe-box-note3" style="color:#232366;font-weight:bold;">
Once the export was running I monitored the request. The following CMDlet will show all relevant information:</p>
<div class="wpe-box wpe-box-note see" style="color:#333;font-weight:bold;">
Get-MailboxExportRequest <span style="color:#993333;font-weight:bold;">IndividualNameOfTheExportRequest</span> -BatchName <span style="color:#993333;font-weight:bold;">BatchName</span>| Get-MailboxExportRequestStatistics <span style="color:#993333;font-weight:bold;">-IncludeReport</span> | select Report,MRSServerName,Name,SyncStage,Priority,LastFailure,FailureCode,FailureType,BadItemLimit,BadItemsEncountered,LargeItemLimit,LargeItemsEncountered,OverallDuration,Status,StatusDetail,EstimatedTransferSize,BytesTransferred,EstimatedTransferItemCount,ItemsTransferred,PercentComplete
</div>
</div>
<p>You can find more useful details on monitoring export requests here:</p>
<p><a class="wpe-button wpe-button-blue" href="https://webbanshee.net/export-mailbox-new-mailboxexportrequest/">Monitor Mailbox Exports</a><br />
<br />
The pain started whenever the export reached completion of 100%.<br />
The job was relinquished due to large delays and unfavorable server health on the source server-side.</p>
<p>As can be seen in the image below the export status stayed inProgress.<br />
While SyncStage was CopyingMessages and StatusDetail was StalledDueToSource_DiskLatency:</p>
<div class="wpe-box wpe-box-note3">
<a href="https://webbanshee.net/wp-content/uploads/2022/04/StalledDueToSourceDiskLatency-01.png"><img loading="lazy" src="https://webbanshee.net/wp-content/uploads/2022/04/StalledDueToSourceDiskLatency-01.png" alt="StalledDueToSource_Disklatency" width="481" height="259" class="aligncenter size-full wp-image-4207" srcset="https://webbanshee.net/wp-content/uploads/2022/04/StalledDueToSourceDiskLatency-01.png 481w, https://webbanshee.net/wp-content/uploads/2022/04/StalledDueToSourceDiskLatency-01-300x162.png 300w" sizes="(max-width: 481px) 100vw, 481px" /></a>
</div>
<p>Therefore the export job was relinquished: </p>
<div class="wpe-box wpe-box-note3">
<a href="https://webbanshee.net/wp-content/uploads/2022/04/StalledDueToSourceDiskLatency-02.png"><img loading="lazy" src="https://webbanshee.net/wp-content/uploads/2022/04/StalledDueToSourceDiskLatency-02.png" alt="Relinquishing Job StalledDueToSource_Disklatency" width="1246" height="77" class="aligncenter size-full wp-image-4204" srcset="https://webbanshee.net/wp-content/uploads/2022/04/StalledDueToSourceDiskLatency-02.png 1246w, https://webbanshee.net/wp-content/uploads/2022/04/StalledDueToSourceDiskLatency-02-300x19.png 300w, https://webbanshee.net/wp-content/uploads/2022/04/StalledDueToSourceDiskLatency-02-1024x63.png 1024w, https://webbanshee.net/wp-content/uploads/2022/04/StalledDueToSourceDiskLatency-02-768x47.png 768w" sizes="(max-width: 1246px) 100vw, 1246px" /></a>
</div>
<p>Eventually, the export started all over again. StatusDetail: CreatingFolderHerarchy:</p>
<div class="wpe-box wpe-box-note3">
<a href="https://webbanshee.net/wp-content/uploads/2022/04/StalledDueToSourceDiskLatency-03.png"><img loading="lazy" src="https://webbanshee.net/wp-content/uploads/2022/04/StalledDueToSourceDiskLatency-03.png" alt="Creating Folder Hierarchy" width="475" height="254" class="aligncenter size-full wp-image-4205" srcset="https://webbanshee.net/wp-content/uploads/2022/04/StalledDueToSourceDiskLatency-03.png 475w, https://webbanshee.net/wp-content/uploads/2022/04/StalledDueToSourceDiskLatency-03-300x160.png 300w" sizes="(max-width: 475px) 100vw, 475px" /></a>
</div>
<p>Then PercentComplete was 10% again:</p>
<div class="wpe-box wpe-box-note3">
<a href="https://webbanshee.net/wp-content/uploads/2022/04/StalledDueToSourceDiskLatency-04.png"><img loading="lazy" src="https://webbanshee.net/wp-content/uploads/2022/04/StalledDueToSourceDiskLatency-04.png" alt="Copying Messages" width="480" height="253" class="aligncenter size-full wp-image-4206" srcset="https://webbanshee.net/wp-content/uploads/2022/04/StalledDueToSourceDiskLatency-04.png 480w, https://webbanshee.net/wp-content/uploads/2022/04/StalledDueToSourceDiskLatency-04-300x158.png 300w" sizes="(max-width: 480px) 100vw, 480px" /></a>
</div>
<p>As a result, the size of the export PST grew much bigger than the initial mailbox size.</p>
<p>After all, the solution for me was to switch the mailbox database that hosts the mailbox to another copy within the DAG:</p>
<h2>Work around StalledDueToSource_DiskLatency</h2>
<div class="wpe-box wpe-box-note3" style="color:#232366;font-weight:bold;">
<h5>First, check which mailbox database hosts the mailbox you want to export:</h5>
<div class="wpe-box wpe-box-note" style="color:#333;font-weight:bold;">
Get-Mailbox -Identity <span style="color:#993333;font-weight:bold;">MailboxToExport</span> | select <span style="color:#993333;font-weight:bold;">PrimarySmtpAddress, ServerName, Database</span>
</div>
<p><span style="color:#232366;font-weight:bold;">ServerName shows the server where StalledDueToSource_DiskLatency originates from.</span>
</div>
<div class="wpe-box wpe-box-note3" style="color:#232366;font-weight:bold;">
<h5>Next, check to which servers the passive database copies are seeded:</h5>
<div class="wpe-box wpe-box-note" style="color:#333;font-weight:bold;">
Get-MailboxDatabaseCopyStatus -Identity <span style="color:#993333;font-weight:bold;">DatabaseName</span>
</div>
<p><span style="color:#232366;font-weight:bold;">The output lists the active mailbox database ( Status: Mounted ), the passive copies ( Status: Healthy ), and the lagged mailbox database copy. ( Status: Healthy with ReplayQueueLenghth greater than the others )</span>
</div>
<div class="wpe-box wpe-box-note3" style="color:#232366;font-weight:bold;">
<h5>Now switch the active mailbox database with Status: Mounted to one of the passive copies with Status: Healthy:</h5>
<div class="wpe-box wpe-box-error"<span style="color:#993333;font-weight:bold;">Note that you don&#8217;t switch it to the copy where the ReplayQueueLenghth is greater than on the other copies!</span></div>
<div class="wpe-box wpe-box-note see" style="color:#333;font-weight:bold;">
Move-ActiveMailboxDatabase <span style="color:#993333;font-weight:bold;">DatabaseName</span> -ActivateOnServer <span style="color:#993333;font-weight:bold;">OneOfTheServersFromTheOutputBefore</span>
</div>
<p><span style="color:#232366;font-weight:bold;">As has been noted before take care that you don&#8217;t try to activate the mailbox database on the server that hosts the lagged database copy!</span>
</div>
<p>After the database is switched to another server try to export the mailbox with a new export request.<br />
Given that the new server has no performance or disk issues the export should complete in a normal manner.</p>
<p>&nbsp;</p>
<div class="wpe-box wpe-box-alert" style="background: #FBF49361!Important; font-weight:bold;">
<span style="font-weight:bold;">One more thing:</span><br />
After I activated the mailbox database that hosts the mailbox on another server the ServerName did not change when querying the mailbox.</p>
<div class="wpe-box wpe-box-note3" style="color:#232366;font-weight:bold;">
Get-Mailbox -Identity MailboxToExport | select PrimarySmtpAddress, ServerName, Database
</div>
<p><span style="font-weight:bold;">The output of the command above will still show the old server under ServerName. But this is just visual. However, you can find a good explanation for that</span> <a style="color:#993333; font-weight:bold;" href="https://blog.rmilne.ca/2014/12/04/exchange-servername-points-to-wrong-or-decommissioned-server/" rel="noopener" target="_blank">here</a>.
</div>
<p>Have a nice day <span class="wp-svg-sun-3 sun-3"></span></p>
<p>The post <a rel="nofollow" href="https://webbanshee.net/stalledduetosource_disklatency/">StalledDueToSource_DiskLatency Mailbox Export</a> appeared first on <a rel="nofollow" href="https://webbanshee.net">Webbanshee</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://webbanshee.net/stalledduetosource_disklatency/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4118</post-id>	</item>
		<item>
		<title>Export Mailbox New-MailboxExportRequest</title>
		<link>https://webbanshee.net/export-mailbox-new-mailboxexportrequest/</link>
					<comments>https://webbanshee.net/export-mailbox-new-mailboxexportrequest/#respond</comments>
		
		<dc:creator><![CDATA[WebBanshee]]></dc:creator>
		<pubDate>Thu, 06 Jan 2022 14:21:06 +0000</pubDate>
				<category><![CDATA[Serverside]]></category>
		<category><![CDATA[2013]]></category>
		<category><![CDATA[2016]]></category>
		<category><![CDATA[2019]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[MailboxExport]]></category>
		<category><![CDATA[Powershell]]></category>
		<guid isPermaLink="false">https://webbanshee.net/?p=4149</guid>

					<description><![CDATA[<style>.key{background:#444444;padding-left: 5px;padding-right: 5px;padding-top: 2px;padding-bottom: 2px;color:#fefefe;border-radius: 3px;font-size: 14px;}</style>
<p><a class="ex-link" href="https://webbanshee.net/export-mailbox-new-mailboxexportrequest/"><img style="border-radius:8px;" src="https://webbanshee.net/wp-content/uploads/2022/03/NewMailboxExportRequest.svg"/><span class="exTeaser" style="width:70%;">Export a mailbox and monitor the export request</span><br />
<span class="exText" style="width:70%;" >Find a detailed description of how to export a mailbox with New-MailboxExportRequest and monitor the export request in this post. Get-MailboxExportRequestStatistics are explained as well.<span style="font-size: 11px !Important; width: 10%; height: 5%; color: #993333; padding-left: 20px;">......read more</span></span></a></p>
<p>The post <a rel="nofollow" href="https://webbanshee.net/export-mailbox-new-mailboxexportrequest/">Export Mailbox New-MailboxExportRequest</a> appeared first on <a rel="nofollow" href="https://webbanshee.net">Webbanshee</a>.</p>
]]></description>
										<content:encoded><![CDATA[<style>
.num{margin-top:2px!Important; margin-right:10px;} h2 {font-weight: bold;text-decoration:none;font-size: 20px!Important;} .see {overflow-x: scroll!Important; overflow-y: hidden;white-space:nowrap;} .wpe-box-note3 {color:#333;}
</style>
<p>Hello folks, Today I would like to share my experience so far on how to export a mailbox with New-MailboxExportRequest. There are a couple of parameters to query to get useful information about the status of an export request.</p>
<p>As long as everything goes smooth you will probably just need the percentage information. But when the New-MailboxExportRequest stalls or stops with an error you will be happy to have some additional parameters to query at your disposal.</p>
<p>So let&#8217;s get to the point straight away:</p>
<h2>Start to export a mailbox with New-MailboxExportRequest:</h2>
<div class="wpe-box wpe-box-note3">
<div class="wpe-box wpe-box-note see" style="color:#232366;font-weight:bold;">
New-MailboxExportRequest -Mailbox <span style="color:#993333;font-weight:bold;">MailboxName</span> -Name <span style="color:#993333;font-weight:bold;">ExportRequestName</span> -BatchName <span style="color:#993333;font-weight:bold;">BatchName</span> -BadItemLimit <span style="color:#993333;font-weight:bold;">0</span> -LargeItemLimit <span style="color:#993333;font-weight:bold;">0</span> -FilePath <span style="color:#993333;font-weight:bold;">&#8220;\\ServerName\ExportLocationFolder\MailboxName.pst&#8221;</span> -Priority <span style="color:#993333;font-weight:bold;">Emergency</span>
</div>
<p><span style="color:#232366;font-weight:bold;">Use the -Priority switch with Emergency to prevent stalling!</span>
</div>
<h4>After you have started the export request check the progress:</h4>
<div class="wpe-box wpe-box-note3">
<div class="wpe-box wpe-box-note see" style="color:#232366;font-weight:bold;">
Get-MailboxExportRequest <span style="color:#993333;font-weight:bold;">-Name ExportRequestName</span> -BatchName <span style="color:#993333;font-weight:bold;">BatchName</span> | Get-MailboxExportRequestStatistics <span style="color:#993333;font-weight:bold;">-IncludeReport</span> | select <span style="color:#993333;font-weight:bold;">Report, name,Priority, FailureCode, FailureType,DiagnosticInfo,BadItemLimit,BadItemsEncountered,LargeItemLimit,LargeItemsEncountered, OverallDuration, Status, StatusDetail,EstimatedTransferSize,BytesTransferred, EstimatedTransferItemCount, ItemsTransferred,PercentComplete</span>
</div>
<p><span style="color:#232366;font-weight:bold;">As a result, you will get the values of the selected parameters.</span><br />
<span style="color:#232366;font-weight:bold;">Adjust the selected parameters if the output gets too long or intransparent.</span><br />
<span style="color:#232366;font-weight:bold;">For example remove <span style="color:#993333;font-weight:bold;">-IncludeReport</span></span></p>
<p><span style="color:#232366;font-weight:bold;">You can find a description of the selected parameters below.</span>
</div>
<h4>First, a short info on the <span style="color:#993333;font-weight:bold;">-IncludeReport</span> switch:<span style="color:#993333;font-weight:bold;"></h4>
<div class="wpe-box wpe-box-note3" style="color:#232366;font-weight:bold;">
When this switch is used in accordance with select Report the ouptut looks like this:</p>
<div class="wpe-box wpe-box-note" style="color:#232366;font-weight:bold;">
<a href="https://webbanshee.net/wp-content/uploads/2022/03/IncludeReport.jpg"><img loading="lazy" src="https://webbanshee.net/wp-content/uploads/2022/03/IncludeReport.jpg" alt="New-MailboxExportRequest -IncludeReport" width="1128" height="683" class="aligncenter size-full wp-image-4162" srcset="https://webbanshee.net/wp-content/uploads/2022/03/IncludeReport.jpg 1128w, https://webbanshee.net/wp-content/uploads/2022/03/IncludeReport-300x182.jpg 300w, https://webbanshee.net/wp-content/uploads/2022/03/IncludeReport-1024x620.jpg 1024w, https://webbanshee.net/wp-content/uploads/2022/03/IncludeReport-768x465.jpg 768w" sizes="(max-width: 1128px) 100vw, 1128px" /></a><br />
The output displays the currently processed items. Depending on the mailbox size the output can get much longer. Below the report, the output of other parameters you have selected is displayed.
</div>
</div>

<h4>New-MailboxExportRequest relevant infos that can be selected:</h4>
<div class="wpe-box wpe-box-note3">
<div class="wpe-box wpe-box-note" style="color:#232366;font-weight:bold;">
<span style="display:inline-block;margin-bottom:10px;font-weight:bold;"><span style="color:#993333;font-weight:bold;">Report:</span> Displays the whole export request history when used with the <span style="color:#993333;font-weight:bold;">-IncludeReport</span> switch. Skipped items based on bad or large items limits are also displayed.</span><br />
<span style="display:inline-block;margin-bottom:10px;font-weight:bold;"><span style="color:#993333;font-weight:bold;">Name:</span> The individual name of the mailbox export request.</span><br />
<span style="display:inline-block;margin-bottom:10px;font-weight:bold;"><span style="color:#993333;font-weight:bold;">Priority:</span>  Possible values are Lower, Low, Normal (This is the default value), High, Higher, Highest, Emergency [Use the highest priority to prevent stalling. I usually use Emergency]</span><br />
<span style="display:inline-block;margin-bottom:10px;font-weight:bold;"><span style="color:#993333;font-weight:bold;">FailureCode:</span> Displays the failure code [ not really useful unless you find a list of failure codes for export requests. I couldn&#8217;t find one.]</span><br />
<span style="display:inline-block;margin-bottom:10px;font-weight:bold;"><span style="color:#993333;font-weight:bold;">FailureType:</span> Description of the failure that stopped the mailbox export request.</span><br />
<span style="display:inline-block;margin-bottom:10px;font-weight:bold;"><span style="color:#993333;font-weight:bold;">DiagnosticInfo:</span> This needs to be used with the <span style="color:#993333;font-weight:bold;">-Diagnostic</span> switch when selected to display diagnostic information. Among others, you will be able to see job pickup results and timestamps.</span><br />
<span style="display:inline-block;margin-bottom:10px;font-weight:bold;"><span style="color:#993333;font-weight:bold;">BadItemLimit:</span> The max. amount of inconsistent items that will be skipped and will not be exported. When this limit is reached the export will fail. A BadItemLimit greater than 50 requires the <span style="color:#993333;font-weight:bold;">-AcceptLargeDataLoss</span> switch.</span><br />
<span style="display:inline-block;margin-bottom:10px;font-weight:bold;"><span style="color:#993333;font-weight:bold;">BadItemsEncountered:</span> Number of bad items found during the export.</span><br />
<span style="display:inline-block;margin-bottom:10px;font-weight:bold;"><span style="color:#993333;font-weight:bold;">LargeItemLimit:</span> The max. amount of items in the mailbox that exceeds the allowed message size. The default value is 0. A value higher than 50 requires the <span style="color:#993333;font-weight:bold;">-AcceptLargeDataLoss</span> switch. (not recommended)</span><br />
<span style="display:inline-block;margin-bottom:10px;font-weight:bold;"><span style="color:#993333;font-weight:bold;">LargeItemsEcountered:</span> Number of large items found during the export.</span><br />
<span style="display:inline-block;margin-bottom:10px;font-weight:bold;"><span style="color:#993333;font-weight:bold;">OverallDuration:</span> Duration of the mailbox export. Includes times of stalling as well.</span><br />
<span style="display:inline-block;margin-bottom:10px;font-weight:bold;"><span style="color:#993333;font-weight:bold;">Status:</span> The current state of the export. Relevant values are inProgress, Queued, Completed, Failed, Suspended.</span><br />
<span style="display:inline-block;margin-bottom:10px;font-weight:bold;"><span style="color:#993333;font-weight:bold;">StatusDetail:</span> Displays additional information on some states.</span><br />
<span style="display:inline-block;margin-bottom:10px;font-weight:bold;"><span style="color:#993333;font-weight:bold;">EstimatedTransferSize:</span> Estimates and displays the amount of the exported data.</span><br />
<span style="display:inline-block;margin-bottom:10px;font-weight:bold;"><span style="color:#993333;font-weight:bold;">BytesTransferred:</span> Displays the amount of data that has been really transferred. This usually differs from the EstimatedTransferSize.</span><br />
<span style="display:inline-block;margin-bottom:10px;font-weight:bold;"><span style="color:#993333;font-weight:bold;">EstimatedTransferItemCount:</span> Estimates and displays the number of items that will be transferred.</span><br />
<span style="display:inline-block;margin-bottom:10px;font-weight:bold;"><span style="color:#993333;font-weight:bold;">ItemsTransferred:</span> Displays the number of items that have been transferred. Can differ from EstimatedTransferItemCount. ( Among others depending on encountered bad or large items and the associated limits )</span><br />
<span style="color:#993333;font-weight:bold;">PercentComplete:</span> The progress of the export request in percent.
</div>
<p><span style="color:#232366;">See the standard reference to Get-MailboxExportRequest by Microsoft</span> <a style="font-weight:bold;color:#232366;" href="https://docs.microsoft.com/en-us/powershell/module/exchange/get-mailboxexportrequest?view=exchange-ps" rel="noopener" target="_blank">here</a>.<br />
<span style="color:#232366;">Find more to Get-MailboxExportRequestStatistics by Microsoft under <a style="font-weight:bold;color:#232366;" href="https://docs.microsoft.com/en-us/powershell/module/exchange/get-mailboxexportrequeststatistics?view=exchange-ps" rel="noopener" target="_blank">this link</a>.</span>
</div>
<h2>Modify parameters of a mailbox export request:</h2>
<p>To modify the parameters of an existing mailbox export request you will need to suspend the request first. This can be useful when you retrospectively want to change the BadItemnLimit or want to raise the priority.</p>
<h4>Suspend the mailbox export request:</h4>
<div class="wpe-box wpe-box-note3">
<div class="wpe-box wpe-box-note" style="color:#232366;font-weight:bold;">
Get-MailboxExportRequest -Name <span style="color:#993333;font-weight:bold;">ExportRequestName</span> | Suspend-MailboxExportRequest
</div>
<p><span style="color:#232366; font-weight:bold;">In case you want to suspend all mailbox exports of the same batch:</span></p>
<div class="wpe-box wpe-box-note" style="color:#232366;font-weight:bold;">
Get-MailboxExportRequest -BatchName <span style="color:#993333;font-weight:bold;">BatchName</span> | Suspend-MailboxExportRequest
</div>
</div>
<h4>Now change the parameters [Example: <span style="color:#993333;font-weight:bold;">BadItemLimit</span>]</h4>
<div class="wpe-box wpe-box-note3">
<div class="wpe-box wpe-box-note see" style="color:#232366;font-weight:bold;">
Get-MailboxExportRequest -Name <span style="color:#993333;font-weight:bold;">ExportRequestName</span> | Set-MailboxExportRequest <span style="color:#993333;font-weight:bold;">-BadItemLimit 25</span>
</div>
<p><span style="color:#232366; font-weight:bold;">In order to change all export requests of the same batch:</span></p>
<div class="wpe-box wpe-box-note see" style="color:#232366;font-weight:bold;">
Get-MailboxExportRequest -BatchName <span style="color:#993333;font-weight:bold;">BatchName</span> | Set-MailboxExportRequest <span style="color:#993333;font-weight:bold;">-BadItemLimit 25</span>
</div>
</div>

<h4>Resume the mailbox export request:</h4>
<div class="wpe-box wpe-box-note3">
<div class="wpe-box wpe-box-note" style="color:#232366;font-weight:bold;">
Get-MailboxExportRequest -Name <span style="color:#993333;font-weight:bold;">ExportRequestName</span> | Resume-MailboxExportRequest
</div>
<p><span style="color:#232366; font-weight:bold;">In case you want to resume all mailbox exports of the same batch:</span></p>
<div class="wpe-box wpe-box-note" style="color:#232366;font-weight:bold;">
Get-MailboxExportRequest -BatchName <span style="color:#993333;font-weight:bold;">BatchName</span> | Resume-MailboxExportRequest
</div>
</div>
<div class="wpe-box wpe-box-alert" style="background: #F9F6D9!Important;">
<span style="font-weight:bold;color:#993333;">Note:</span><br />
<span style="font-weight:bold;">Modifying the BadItemLimit value makes sense when you have started the export with a low BadItemLimit ( for exmaple 5 ). While monitoring the export you assume that there will be more bad item than you have specified.</span></p>
<p><span style="font-weight:bold;">Another case would be when the export fails because the BadItemLimit threshold has been reached. In that case, you can modify the BadItemLimit after the export failed and resume the export. Suspend is not needed here as it has already failed. To be honest I usually trigger a New-MailboxExportRequest when this happens because I don&#8217;t trust the resume. I am not 100 percent sure that the resume picks up where it stopped and I want to prevent duplicated items. But if you trust the resume process more than me give it a try.</span>
</div>
<h2>Remove-MailboxExportRequest</h2>
<p>Here are two arguments to remove mailbox export requests you don&#8217;t need anymore:</p>
<ul>
<li>To export a mailbox with New-MailboxExportRequest with the same request name.</li>
<li>Further, do some housekeeping and keep your environment clean and transparent.</li>
</ul>
<div class="wpe-box wpe-box-note3" style="margin-top:25px;">
<div class="wpe-box wpe-box-note" style="color:#232366;font-weight:bold;">
Get-MailboxExportRequest -Name <span style="color:#993333;font-weight:bold;">ExportRequestName</span> | Remove-MailboxExportRequest
</div>
<p><span style="color:#232366; font-weight:bold;">In case you want to remove all mailbox exports of the same batch:</span></p>
<div class="wpe-box wpe-box-note" style="color:#232366;font-weight:bold;">
Get-MailboxExportRequest -BatchName <span style="color:#993333;font-weight:bold;">BatchName</span> | Remove-MailboxExportRequest
</div>
<p><span style="color:#232366; font-weight:bold;">In order to remove all mailbox export requests:</span></p>
<div class="wpe-box wpe-box-note" style="color:#232366;font-weight:bold;">
Get-MailboxExportRequest | Remove-MailboxExportRequest
</div>
</div>
<div class="wpe-box wpe-box-alert" style="background: #F9F6D9!Important;">
<span style="font-weight:bold;color:#993333;">Final remark:</span><br />
<span style="font-weight:bold;color:#232366">Get-mailboxExportRequest vs. Get-MailboxExportRequestStatistics:</span><br />
<span style="font-weight:bold;color:#232366">Whenever an export request got stalled and I monitored the request with Get-MailboxExportRequest it showed me InProgress as the current state.</span></p>
<p><span style="font-weight:bold;color:#232366">Only <span style="color:#993333;font-weight:bold;">Get-mailboxExportRequest | Get-MailboxExportRequestStatistics</span> showed me the real status.</span><br />
<span style="font-weight:bold;color:#232366">It seems regarding the state of the export Get-mailboxExportRequest is not as much reliable as Get-MailboxExportRequestStatistics.</span><br />
<span style="font-weight:bold;color:#232366">For this reason I always use Get-MailboxExportRequestStatistics when I export a mailbox with New-MailboxExportRequest.</span>
</div>
<p>Have a nice day!</p>
<p>The post <a rel="nofollow" href="https://webbanshee.net/export-mailbox-new-mailboxexportrequest/">Export Mailbox New-MailboxExportRequest</a> appeared first on <a rel="nofollow" href="https://webbanshee.net">Webbanshee</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://webbanshee.net/export-mailbox-new-mailboxexportrequest/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4149</post-id>	</item>
		<item>
		<title>Zoom Quit Unexpectedly Cannot Start Meeting</title>
		<link>https://webbanshee.net/zoom-quit-unexpectedly/</link>
					<comments>https://webbanshee.net/zoom-quit-unexpectedly/#respond</comments>
		
		<dc:creator><![CDATA[WebBanshee]]></dc:creator>
		<pubDate>Thu, 25 Nov 2021 08:42:04 +0000</pubDate>
				<category><![CDATA[More Tech]]></category>
		<category><![CDATA[Zoom]]></category>
		<guid isPermaLink="false">https://webbanshee.net/?p=4068</guid>

					<description><![CDATA[<style>.key{background:#444444;padding-left: 5px;padding-right: 5px;padding-top: 2px;padding-bottom: 2px;color:#fefefe;border-radius: 3px;font-size: 14px;}</style>
<p><a class="ex-link" href="https://webbanshee.net/zoom-quit-unexpectedly/"><img width="200" src="https://webbanshee.net/wp-content/uploads/2021/11/zoom.svg"/><span class="exTeaser" style="width:70%;">Zoom Quit Unexpectedly</span><br />
<span class="exText" style="width:70%;" >You start Zoom and after a couple of seconds a Zoom quit unexpectedly message appears. It is not possible to start a meeting or access the settings. No events are written to the application log.<span style="font-size: 11px !Important; width: 10%; height: 5%; color: #993333; padding-left: 20px;">......read more</span></span></a></p>
<p>The post <a rel="nofollow" href="https://webbanshee.net/zoom-quit-unexpectedly/">Zoom Quit Unexpectedly Cannot Start Meeting</a> appeared first on <a rel="nofollow" href="https://webbanshee.net">Webbanshee</a>.</p>
]]></description>
										<content:encoded><![CDATA[<style>.BlueCopy{background: #3084c9;color: #fff;font-weight: 700;margin-top:10px;}</style>
<p>Hello, fellow Zoom users! Yesterday I had a problem where Zoom quit unexpectedly a couple of seconds after I launched the application on a Windows 10 Version 20H2 machine.</p>
<p>Nonetheless, I was able to log in and noticed that the Zoom quit unexpectedly message returned permanently. Starting a meeting was not possible and I could not access the settings.</p>
<p>Updating graphic card drivers had no effect, Zoom kept crashing. The solution was simple once I got some hints from the Zoom log. </p>
<p>I&#8217;ll keep it short:</p>
<p>Scenario: You start Zoom and a couple of seconds after you started it the following message appears:</p>
<div class="wpe-box wpe-box-note3">
<a href="https://webbanshee.net/wp-content/uploads/2021/11/ZoomQuitUnexpectedly.jpg"><img loading="lazy" src="https://webbanshee.net/wp-content/uploads/2021/11/ZoomQuitUnexpectedly.jpg" alt="Zoom Quit Unexpectedly" width="642" height="749" class="aligncenter size-full wp-image-4078" srcset="https://webbanshee.net/wp-content/uploads/2021/11/ZoomQuitUnexpectedly.jpg 642w, https://webbanshee.net/wp-content/uploads/2021/11/ZoomQuitUnexpectedly-257x300.jpg 257w" sizes="(max-width: 642px) 100vw, 642px" /></a>
</div>
<p>You are able to log in but the Zoom quit unexpectedly message reappears and you are not able to start a meeting or get into the settings. No events are written into the application log. </p>
<p>However, I was sure Zoom logs something so I started to google the location of the logs and found <a style="font-weight:bold;text-decoration:none;" href="https://support.zoom.us/hc/en-us/articles/201512326-Troubleshooting-log-for-Windows" rel="noopener noreferrer" target="_blank">this</a>.</p>
<p>You can find the logs under the path below:</p>
<div class="wpe-box wpe-box-note3" Style="font-weight: bold;">
C:\Users\<span style="color:#993333;font-weight:bold;">YourUser</span>\AppData\Roaming\Zoom\logs\
</div>
<p>Open the <span style="font-weight:bold;">crashrpt.xml</span> and focus on the information within the exception tags.<br />
The following lines gave me a hint:</p>
<div class="wpe-box wpe-box-note3" Style="font-weight: bold;">
<a href="https://webbanshee.net/wp-content/uploads/2021/11/ZoomCrashException.png"><img loading="lazy" src="https://webbanshee.net/wp-content/uploads/2021/11/ZoomCrashException.png" alt="Zoom Crash Report" width="482" height="154" class="aligncenter size-full wp-image-4083" srcset="https://webbanshee.net/wp-content/uploads/2021/11/ZoomCrashException.png 482w, https://webbanshee.net/wp-content/uploads/2021/11/ZoomCrashException-300x96.png 300w" sizes="(max-width: 482px) 100vw, 482px" /></a>
</div>
<p>This is the base for the next Google query. Search for:</p>
<div class="wpe-box wpe-box-note3" Style="font-weight: bold; color:#993333;">
quartz.dll 0xc0000005
</div>
<p>Soon or later you will find this <a style="font-weight:bold;" href="https://community.zoom.com/t5/Meetings/Access-Violation-Error/td-p/7934" rel="noopener noreferrer" target="_blank">article</a> where the comment of <span style="font-weight:bold;">DaedalusWONG</span> will point you to Microsoft Power Toys as the culprit.</p>
<p>A more detailed description of this Power Toys bug can be found <a style="font-weight:bold;" href="https://github.com/microsoft/PowerToys/issues/13984" rel="noopener noreferrer" target="_blank">here</a>.</p>
<p>Indeed, I have Power Toys version v0.49.1 installed.</p>
<p>Open Power Toys as an admin and disable Video Conference Mute:</p>
<div class="wpe-box wpe-box-note3">
<a href="https://webbanshee.net/wp-content/uploads/2021/11/PowerToysMute.png"><img loading="lazy" src="https://webbanshee.net/wp-content/uploads/2021/11/PowerToysMute.png" alt="Disabel Video Conference Mute Power Toys" width="997" height="519" class="aligncenter size-full wp-image-4086" srcset="https://webbanshee.net/wp-content/uploads/2021/11/PowerToysMute.png 997w, https://webbanshee.net/wp-content/uploads/2021/11/PowerToysMute-300x156.png 300w, https://webbanshee.net/wp-content/uploads/2021/11/PowerToysMute-768x400.png 768w" sizes="(max-width: 997px) 100vw, 997px" /></a>
</div>
<p>Disabling Video Conference Mute solved the problem straight away.</p>
<p>I hope this compiled information helps when you run into this problem and need a fast solution.<br />
&nbsp;<br />
Stay healthy!<br />
&nbsp;<br />
&nbsp;<br />
Have an ASUS router and want to install Entware on it?<br />
<a href="https://webbanshee.net/install-entware-asus-router-rt-ac58u/"><button class="BlueCopy">Install Entware on an ASUS router</button></a></p>
<p>The post <a rel="nofollow" href="https://webbanshee.net/zoom-quit-unexpectedly/">Zoom Quit Unexpectedly Cannot Start Meeting</a> appeared first on <a rel="nofollow" href="https://webbanshee.net">Webbanshee</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://webbanshee.net/zoom-quit-unexpectedly/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4068</post-id>	</item>
		<item>
		<title>ADFS Server Core Token Signing Certificate</title>
		<link>https://webbanshee.net/adfs-server-core-token-signing-certificate/</link>
					<comments>https://webbanshee.net/adfs-server-core-token-signing-certificate/#respond</comments>
		
		<dc:creator><![CDATA[WebBanshee]]></dc:creator>
		<pubDate>Wed, 27 Oct 2021 10:38:03 +0000</pubDate>
				<category><![CDATA[Serverside]]></category>
		<category><![CDATA[ADFS]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[ServerCore]]></category>
		<guid isPermaLink="false">https://webbanshee.net/?p=4027</guid>

					<description><![CDATA[<style>.key{background:#444444;padding-left: 5px;padding-right: 5px;padding-top: 2px;padding-bottom: 2px;color:#fefefe;border-radius: 3px;font-size: 14px;}</style>
<p><a class="ex-link" href="https://webbanshee.net/adfs-server-core-token-signing-certificate/"><img style="border-radius:8px;" src="https://webbanshee.net/wp-content/uploads/2021/10/ADFS-Server-Core.svg"/><span class="exTeaser" style="width:70%;">ADFS Server Core Token Signing Certificate</span><br />
<span class="exText" style="width:70%;" >With ADFS running on Server Core the method of the yearly renewal of the Token Signing Certificate has changed to PowerShell only. I have just finished the renewal of the Token Signing Certificate via Powershell in our test environment. In this post, I will sum up the steps.<span style="font-size: 11px !Important; width: 10%; height: 5%; color: #993333; padding-left: 20px;">......read more</span></span></a></p>
<p>The post <a rel="nofollow" href="https://webbanshee.net/adfs-server-core-token-signing-certificate/">ADFS Server Core Token Signing Certificate</a> appeared first on <a rel="nofollow" href="https://webbanshee.net">Webbanshee</a>.</p>
]]></description>
										<content:encoded><![CDATA[<style>
.num{margin-top:2px!Important; margin-right:10px;} h2 {font-weight: bold;text-decoration:none;font-size: 20px!Important;} .see {overflow-x: scroll!Important; overflow-y: hidden;white-space:nowrap;} .wpe-box-note3 {color:#333;}
</style>
<p>Hi there, we have upgraded our servers. ADFS servers are running on Windows Server 2019 Core now. Therewith the method of the yearly renewal of the Token Signing Certificate has changed to PowerShell only.</p>
<p>I have just finished the renewal of the Token Signing Certificate via Powershell in our test environment. In this post, I will sum up the steps.</p>
<p>In case you want to renew the Token Signing certificate via GUI on an appropriate server see this post: <a href="https://webbanshee.net/adfs-token-signing-certificate/">Renew ADFS Token Signing Certificate</a></p>
<p>Let&#8217;s start with a short description of relevant ADFS properties: <span style="font-weight:bold;">[Get-ADFSProperties | fl *cert*]</span></p>
<div class="wpe-box wpe-box-alert" style="background: #F9F6D9!Important; text-align:justify;">
<h4><span style="text-decoration: underline; color: #993333;"><strong>CertficateGenerationThreshold :</strong></span></h4>
<p>Has by default a value of 20 ( days ). That means that 20 days before the current primary ADFS Token Signing Certificate expires, a secondary certificate will be generated ( this will be the new cert after the current one expires ). You can check if the secondary certificate has already been created withe the following commands: </p>
<div class="wpe-box wpe-box-note3" style="color:#232366;">
<span style="font-weight:bold;">Get-AdfsCertificate -CertificateType Token-Signing</span><br />
<span style="font-weight:bold;">Get-AdfsCertificate -CertificateType Token-Decrypting</span>
</div>
<p>When the secondary certificate exists the ouput should list minimum two certificates. Focus on the certificate which has the attribute <span style="font-weight:bold;">IsPrimary</span> set to <span style="font-weight:bold;">False</span>. Verify that the <span style="font-weight:bold;">Not Before:</span> date is correct. </p>
<h4><span style="text-decoration: underline; color: #993333;"><strong>AutoCertificateRollover :</strong></span></h4>
<p>The default value of this attribute should be set to $True and should only be changed to $False for the time when the automatically created secondary certificate will be assigned as the primary ADFS certificate. When you manually renew the Token Signing Certificate this should always be set to $False. Otherwise, the secondary certificate will be promoted as the primary certificate automatically. Web logins to application servers will not be possible until the new certificate has not been introduced on the affected application servers.  </p>
<h4><span style="text-decoration: underline; color: #993333;"><strong>CertificatePromotionThreshold :</strong></span></h4>
<p>This attribute is important and should be monitored before the upcoming expiration of the current ADFS Token Signing Certificate. It defines after how many days ( counting from the creation date of the secondary ADFS certificate ) the new certificate will be defined automatically as primary.<br />
If the value of this attribute is set to 15 it means that the secondary certificate will be assigned as primary automatically after 15 days.<br />
Based on the example above the servers should be updated with the thumbprint of the new certificate maximum of 15 days ( better earlier ) after the creation of the secondary ADFS Token Signing Certificate.</p>
<h4><span style="text-decoration: underline; color: #993333;"><strong>CertificateRolloverInterval :</strong></span></h4>
<p>Defines the interval in minutes at which ADFS checks if a new certificate needs to be generated. The default value is 720. If you change the values above accordingly to their meaning and your needs you can lower this value to 5 minutes for instance to generate the secondary certificate if it has not been generated yet. Set it back to default afterward.</p>
<p>Microsoft describes these properties <a href="https://social.technet.microsoft.com/wiki/contents/articles/16156.ad-fs-2-0-understanding-autocertificaterollover-threshold-properties.aspx" rel="noopener noreferrer" target="_blank">here</a>.
</div>
<p><br />
With that being said we are good to go. Log on to your ADFS Server Core.</p>
<h2><img src="https://webbanshee.net/wp-content/uploads/2019/01/round_1.svg" alt="1 - ADFS Server Core" class="num"  role="img" />Query the secondary Token Signing and Decrypting certificates</h2>
<div class="wpe-box wpe-box-note3" Style="font-weight:bold;margin-bottom: 10px;">
Get-AdfsCertificate -CertificateType Token-Signing | where {$_.IsPrimary -eq $False}<br />
Get-AdfsCertificate -CertificateType Token-Decrypting   | where {$_.IsPrimary -eq $False}
</div>
<p>Note the thumbprints. You will need them later.</p>
<h2><img src="https://webbanshee.net/wp-content/uploads/2019/01/round_2.svg" alt="2 -" class="num"  role="img" />Export the secondary Token Signing Certificate</h2>
<p>Export the certificate to a location you can reach from the application servers. I usually export the cert to a local folder on the ADFS server.</p>
<div class="wpe-box wpe-box-note3 see" Style="font-weight:bold;margin-bottom: 20px;">
$certRefs=Get-AdfsCertificate -CertificateType Token-Signing | where {$_.IsPrimary -eq <span style="font-weight:bold; color:#993333;">$False</span>}<br />
$certBytes=$certRefs[0].Certificate.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Cert)<br />
[System.IO.File]::WriteAllBytes(<span style="font-weight:bold; color:#993333;">&#8220;C:\PathToExportFolder\CertName.cer&#8221;</span>, $certBytes)
</div>
<h2><img src="https://webbanshee.net/wp-content/uploads/2019/01/round_3.svg" alt="3 -" class="num"  role="img" />Import the certificate from your ADFS Server Core to all Exchange servers</h2>
<p>The certificate will be imported to the Trusted Root Certification Authority of LocalMachine:</p>
<div class="wpe-box wpe-box-note3 see" Style="font-weight:bold;margin-bottom: 10px;">
Import-Certificate -FilePath <span style="font-weight:bold; color:#993333;">\\ADFSServerName\c`$\PathToExportFolderOnADFSServer\CertName.cer</span> -CertStoreLocation Cert:\LocalMachine\Root
</div>
<p>You can check that the certificate has been imported successfully via remote MMC from a GUI server:</p>
<div class="wpe-box wpe-box-note3">
<span style="color:#232366;font-weight:bold;">MMC > Add/Remove Snap-in > Certificates > Computername > This snap-in will manage: Another Computer > Enter the <span style="color:#993333;font-weight:bold;">ServerName</span> where you just have imported the certificate.</span></p>
<p><span style="color:#232366;font-weight:bold;">Navigate to <span style="color:#993333;font-weight:bold;">ServerName</span>\Trusted Root Certification Authorities > Certificates and verify that the imported ADFS Signing certificate is there.</span>
</div>
<p>Of course you can check it with PowerShell as well:</p>
<div class="wpe-box wpe-box-note3" style="font-weight:bold;">
Set-Location -Path cert:\LocalMachine\root<br />
Get-ChildItem | where {$_.subject -like &#8220;*ADFS*&#8221;} | fl
</div>
<h2><img src="https://webbanshee.net/wp-content/uploads/2019/01/round_4.svg" alt="4 -" class="num"  role="img" />Promote the new secondary certificate to primary on ADFS Server Core</h2>
<div class="wpe-box wpe-box-alert" style="background: #F9F6D9!Important;color:#993333;font-weight:bold; text-align:justify;">
After this logins to web services on the involved application servers using ADFS will not be possible until the new certificate has been introduced on the application servers! ( E.g. Exchange OWA )
</div>
<p>Set AutoCertificationRollover to False to be able to promote your secondary certificate to primary:</p>
<div class="wpe-box wpe-box-note3" style="font-weight:bold;">
Set-ADFSProperties -AutoCertificateRollover <span style="color:#993333;font-weight:bold;">$False</span>
</div>
<p>Query the thumbprint of the new Token Signing and Decrypting certificates:</p>
<div class="wpe-box wpe-box-note3" style="font-weight:bold;">
Get-AdfsCertificate -CertificateType Token-Signing | where {$_.IsPrimary -eq $False}<br />
Get-AdfsCertificate -CertificateType Token-Decrypting   | where {$_.IsPrimary -eq $False}
</div>
<p>Note the thumbprint of both certificates.</p>
<p>Promote both secondary certificates ( Token Signing and Decrypting ) to primary:</p>
<div class="wpe-box wpe-box-note3 see" style="font-weight:bold;">
Set-AdfsCertificate -IsPrimary -CertificateType &#8220;Token-Signing&#8221; -Thumbprint <span style="color:#993333;font-weight:bold;">ThumbprintGoesHere</span><br />
Set-AdfsCertificate -IsPrimary -CertificateType &#8220;Token-Decrypting&#8221; -Thumbprint <span style="color:#993333;font-weight:bold;">ThumbprintGoesHere</span>
</div>
<div class="wpe-box wpe-box-alert" style="background: #F9F6D9!Important;text-align:justify;">
<span style="color:#993333;font-weight:bold;">However, I got an error here stating that I need to add the certificate first. When I tried to add the Token Signing certificate on ADFS Server Core:</span></p>
<div class="wpe-box wpe-box-note3" style="margin-bottom: 10px;">
<span style="color:#181818;font-weight:bold;">Add-AdfsCertificate -CertificateType Token-Signing | where {$_.IsPrimary -eq $False}</span>
</div>
<p><span style="color:#993333;font-weight:bold;">The output was a message stating the certificate is already added.</span></p>
<p><span style="color:#993333;font-weight:bold;">I think you need to wait a little bit after you set AutoCertificateRollover to True. Several tries later it succeeded. To be honest I could not identify the cause &#8211; I just assume it could have been the elapsed time after I set AutoCertificateRollover to True.</span>
</div>
<p>Verify that the new certificates have the primary status:</p>
<div class="wpe-box wpe-box-note3" style="margin-bottom: 10px;">
<span style="font-weight:bold;">Get-AdfsCertificate -CertificateType Token-Signing | where {$_.IsPrimary -eq <span style="color:#993333;font-weight:bold;">$True</span>}</span><br />
<span style="font-weight:bold;">Get-AdfsCertificate -CertificateType Token-Decrypting   | where {$_.IsPrimary -eq <span style="color:#993333;font-weight:bold;">$True</span>}</span>
</div>
<p>Switch AutoCertificateRollover back to True:</p>
<div class="wpe-box wpe-box-note3" style="margin-bottom: 10px;">
<span style="font-weight:bold;">Set-ADFSProperties -AutoCertificateRollover</span> <span style="color:#993333;font-weight:bold;">$True</span>
</div>
<p>Check it:</p>
<div class="wpe-box wpe-box-note3">
<span style="font-weight:bold;">Get-ADFSProperties | fl *cert*</span></p>
<p>AutoCertificateRollover should be True!
</p></div>
<h2><img src="https://webbanshee.net/wp-content/uploads/2019/01/round_5.svg" alt="5 -" class="num"  role="img" />Introduce the new Token Signing Certificate to the Exchange organization</h2>
<p>It is enough to fire the following command once from an Exchange Server within your organization:</p>
<div class="wpe-box wpe-box-note3" style="margin-bottom: 15px;">
<span style="font-weight:bold;">Set-OrganizationConfig -AdfsSignCertificateThumbprint</span> <span style="font-weight:bold;color:#993333;">ADFSTokenSigningCertThumbprint</span>
</div>
<p>Verify the AdfsSignCertificateThumbprint:</p>
<div class="wpe-box wpe-box-note3" style="margin-bottom: 15px;">
<span style="font-weight:bold;">Get-OrganizationConfig | select adfs*</span>
</div>
<p>Restart IIS:</p>
<div class="wpe-box wpe-box-note3" style="margin-bottom: 15px;">
<span style="font-weight:bold;">iisreset /noforce</span>
</div>
<p>Or Restart IIS remotely:</p>
<div class="wpe-box wpe-box-note3" style="margin-bottom: 15px;">
<span style="font-weight:bold;">invoke-command -computername <span style="font-weight:bold;color:#993333;">&#8220;ServerName&#8221;</span> -scriptblock {iisreset /noforce}</span>
</div>
<p>Now try to login via web frontend to your application servers. ( try an Outlook on the Web login ) </p>
<p>That&#8217;s it <img loading="lazy" src="https://webbanshee.net/wp-content/uploads/2017/11/Smiley.svg" alt="ADFS Server Core Smiley" width="24" height="24" class="alignnone size-thumbnail wp-image-1478" style="margin-top: 0px; margin-left:8px;" role="img" /></p>
<p>Stay healthy!<br />
&nbsp;</p>
<p>The post <a rel="nofollow" href="https://webbanshee.net/adfs-server-core-token-signing-certificate/">ADFS Server Core Token Signing Certificate</a> appeared first on <a rel="nofollow" href="https://webbanshee.net">Webbanshee</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://webbanshee.net/adfs-server-core-token-signing-certificate/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4027</post-id>	</item>
		<item>
		<title>Mailbox Locked Mailbox Move Issue</title>
		<link>https://webbanshee.net/mailbox-locked-mailbox-move/</link>
					<comments>https://webbanshee.net/mailbox-locked-mailbox-move/#respond</comments>
		
		<dc:creator><![CDATA[WebBanshee]]></dc:creator>
		<pubDate>Tue, 25 May 2021 07:58:02 +0000</pubDate>
				<category><![CDATA[Serverside]]></category>
		<category><![CDATA[2013]]></category>
		<category><![CDATA[2016]]></category>
		<category><![CDATA[2019]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[MailboxMove]]></category>
		<category><![CDATA[Migration]]></category>
		<guid isPermaLink="false">https://webbanshee.net/?p=3970</guid>

					<description><![CDATA[<style>.key{background:#444444;padding-left: 5px;padding-right: 5px;padding-top: 2px;padding-bottom: 2px;color:#fefefe;border-radius: 3px;font-size: 14px;}</style>
<p><a class="ex-link" href="https://webbanshee.net/mailbox-locked-mailbox-move/"><img style="border-radius:8px;" src="https://webbanshee.net/wp-content/uploads/2021/05/MailboxLocked_WB_net.svg"/><span class="exTeaser" style="width:70%;">Cannot move mailbox. Mailbox locked message appears: </span><br />
<span class="exText" style="width:70%;" >Informational: The request has been paused temporarily because the mailbox is locked. The Microsoft Exchange Mailbox Replication service will attempt to continue processing the request ...<span style="font-size: 11px !Important; width: 10%; height: 5%; color: #993333; padding-left: 20px;">......read more</span></span></a></p>
<p>The post <a rel="nofollow" href="https://webbanshee.net/mailbox-locked-mailbox-move/">Mailbox Locked Mailbox Move Issue</a> appeared first on <a rel="nofollow" href="https://webbanshee.net">Webbanshee</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;">
<style><span style="display: inline-block; width: 0px; overflow: hidden; line-height: 0;" data-mce-type="bookmark" class="mce_SELRES_start">﻿</span>h2 {font-weight: bold;text-decoration:none;font-size: 18px!Important;}h3 {font-weight: bold;text-decoration:none;font-size: 18px!Important;} h5{margin-bottom: 5px;} .wp-image-2045,.wp-image-2051,.wp-image-2050,.wp-image-2049,.wp-image-2056, .wp-image-2055 {margin-top:2px!Important;margin-right:6px;} .wpe-box-alert {background-color:#f9f6d9!important;border: 1px solid #aaa895;text-align: justify;} .wpe-box-error1 {background-color:#ffebe8!important;border: 1px solid #c00;text-align: justify;} .wpe-box-alert ul li {list-style:square;padding-bottom: 10px;} .wpe-box-note99 ul li {list-style:square; padding-bottom:10px;}</style>
</p>
<p style="text-align: justify;">In this post, I would like to share how I got around a Mailbox Locked Mailbox Move issue. After we have successfully moved several hundred mailboxes to their new location some issues occurred with a few mailboxes.</p>
<p style="text-align: justify;">Moves for those mailboxes could not be started with the <a href="https://webbanshee.net/stalled-move-request/">-priority switch</a> due to the fact that the target location wasn&#8217;t on-premise.</p>
<p style="text-align: justify;">As a result, some of those boxes just stalled. Restarting the Mailbox Replication Service on the relevant source server did the trick. The stalled move requests could be reinitiated. Only one mailbox remained.</p>
<p style="text-align: justify;">However, the remaining mailbox was locked. I tried to move the mailbox to another mailbox database but received the same error as with the move-request:</p>
<div class="wpe-box wpe-box-alert"><span style="color: #2c2c2c; font-weight:bold;">Informational: The request has been paused temporarily because the mailbox is locked. The Microsoft Exchange Mailbox Replication service will attempt to continue processing the request after &#8230;</span></p>
<p><a href="https://webbanshee.net/wp-content/uploads/2021/05/MailboxLockedInfo.jpg"><img loading="lazy" class="aligncenter size-full wp-image-4006" src="https://webbanshee.net/wp-content/uploads/2021/05/MailboxLockedInfo.jpg" alt="Mailbox Locked Mailbox Move" width="502" height="61" srcset="https://webbanshee.net/wp-content/uploads/2021/05/MailboxLockedInfo.jpg 502w, https://webbanshee.net/wp-content/uploads/2021/05/MailboxLockedInfo-300x36.jpg 300w" sizes="(max-width: 502px) 100vw, 502px" /></a></div>
<p style="text-align: justify;">It seemed like the mailbox had a locked flag ( or something similar ) set in the information store of the source server that mounts the mailbox database for this mailbox. If so, I would have to restart the information store or reboot the server to wipe this flag. Not the first choice for a production server.</p>
<p>I never had this kind of mailbox locked mailbox move issue before.<br />
So I started to google and fortunately found this article on <a href="https://dirteam.com/bas/2019/04/08/exchange-migration-couldnt-switch-the-mailbox-into-sync-source-mode/" target="_blank" rel="noopener noreferrer">dirteam.com</a>.</p>
<p style="text-align: justify;">The article made me confident that it is most probably locked in the information store on the source server. Switching the mounted mailbox database where the locked mailbox resides to another server just did it. Simple as that. Thank you, DirTeam!</p>
<h4>Here the short procedure to solve the mailbox locked mailbox move issue:</h4>
<div class="wpe-box wpe-box-note3"><span style="font-weight: bold;">Check which mailbox database hosts the locked mailbox:</span><br />
<span style="font-weight: bold; color: #181818;">get-mailbox -Identity</span><span style="font-weight: bold; color: #993333;">&#8220;MailboxName&#8221;</span><span style="font-weight: bold; color: #181818;"> | select PrimarySmtpAddress, database</span></p>
<p><span style="font-weight: bold;">Note the database-name and display servers hosting the copies of this mailbox db:</span><br />
<span style="font-weight: bold; color: #181818;">Get-MailboxDatabaseCopyStatus</span> <span style="font-weight: bold; color: #993333;">&#8220;DatabaseName&#8221;</span></p>
<p><span style="font-weight: bold;">Mount the mailbox database on another server within the DAG:</span><br />
<span style="font-weight: bold; color: #181818;">Move-ActiveMailboxDatabase</span><span style="font-weight: bold; color: #993333;"> &#8220;DatabaseName&#8221;</span><span style="font-weight: bold; color: #181818;"> -ActivateOnServer</span> <span style="font-weight: bold; color: #993333;">&#8220;ServerHostingCopy&#8221;</span></p>
</div>
<p>After the mailbox database was mounted on another server I was able to start and complete the move of the last mailbox successfully.</p>
<p>Have a nice day!<br />
&nbsp;<br />
&nbsp;<br />
If you run into other issues with move requests this could also be of interest:</p>
<p><a class="wpe-button wpe-button-blue" href="https://webbanshee.net/tag/mailboxmove/">Mailbox Moves</a><br />
&nbsp;</p>
<p>The post <a rel="nofollow" href="https://webbanshee.net/mailbox-locked-mailbox-move/">Mailbox Locked Mailbox Move Issue</a> appeared first on <a rel="nofollow" href="https://webbanshee.net">Webbanshee</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://webbanshee.net/mailbox-locked-mailbox-move/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3970</post-id>	</item>
		<item>
		<title>Exchange 2019 CU9 with KB5001779</title>
		<link>https://webbanshee.net/exchange-2019-cu9-with-kb5001779/</link>
					<comments>https://webbanshee.net/exchange-2019-cu9-with-kb5001779/#respond</comments>
		
		<dc:creator><![CDATA[WebBanshee]]></dc:creator>
		<pubDate>Thu, 22 Apr 2021 05:46:46 +0000</pubDate>
				<category><![CDATA[Serverside]]></category>
		<category><![CDATA[2016]]></category>
		<category><![CDATA[2019]]></category>
		<category><![CDATA[CU]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Patch]]></category>
		<guid isPermaLink="false">https://webbanshee.net/?p=3974</guid>

					<description><![CDATA[<style>.key{background:#444444;padding-left: 5px;padding-right: 5px;padding-top: 2px;padding-bottom: 2px;color:#fefefe;border-radius: 3px;font-size: 14px;}</style>
<p><a class="ex-link" href="https://webbanshee.net/exchange-2019-cu9-with-kb5001779/"><img style="border-radius:8px;" src="https://webbanshee.net/wp-content/uploads/2020/08/CUInstallExchange_200.svg"/><span class="exTeaser" style="width:70%;">Microsoft released another security update in April for Exchange 2019 CU9 and Exchange 2016 CU20.</span><br />
<span class="exText" style="width:70%;" >KB5001779 can break processes initiated by CMDlets you run from a 3rd party or self-developed application against Exchange.<span style="font-size: 11px !Important; width: 10%; height: 5%; color: #993333; padding-left: 20px;">......read more</span></span></a></p>
<p>The post <a rel="nofollow" href="https://webbanshee.net/exchange-2019-cu9-with-kb5001779/">Exchange 2019 CU9 with KB5001779</a> appeared first on <a rel="nofollow" href="https://webbanshee.net">Webbanshee</a>.</p>
]]></description>
										<content:encoded><![CDATA[<style>h2 {font-weight: bold;text-decoration:none;font-size: 18px!Important;}h3 {font-weight: bold;text-decoration:none;font-size: 18px!Important;} h5{margin-bottom: 5px;} .wp-image-2045,.wp-image-2051,.wp-image-2050,.wp-image-2049,.wp-image-2056, .wp-image-2055 {margin-top:2px!Important;margin-right:6px;} .wpe-box-alert {background-color:#f9f6d9!important;border: 1px solid #aaa895;text-align: justify;} .wpe-box-error1 {background-color:#ffebe8!important;border: 1px solid #c00;text-align: justify;} .wpe-box-alert ul li {list-style:square;padding-bottom: 10px;} .wpe-box-note99 ul li {list-style:square; padding-bottom:10px;} .entry-content img {border-radius:8px;}</style>
<p style="text-align: justify;">Microsoft released another security update in April for Exchange 2019 CU9 and Exchange 2016 CU20. Here are our experiences on installing <strong>Exchange 2019 CU9 with KB5001779</strong>. We also installed <strong>Exchange 2016 CU20 with KB5001779</strong> on our Exchange 2016 servers.</p>
<p style="text-align: justify;">If you run a mixed environment consisting of Exchange 2019 and Exchange 2016 servers you may want to check the schema requirements before. You can find information on that in my post from March:</p>
<p><a class="wpe-button wpe-button-blue" href="https://webbanshee.net/exchange-2019-cu8-and-exchange-2016-cu19/">Exchange 2019 CU8 and Exchange 2016 CU19.</a></p>
<p style="text-align: justify;">First, I want to mention installing the CUs went well and smoothly. Updating from Exchange 2019 CU8 and Exchange 2016 CU19 required less time than upgrading from Exchange 2019 CU5 and Exchange 2016 CU16 to the mentioned CUs. Also installing security update KB5001779 took only about 30-40 minutes.</p>
<p>These were the good things. What are the backlashes?</p>
<p><strong>KB5001779 can break processes initiated by CMDlets you run from a 3rd party or self-developed application against Exchange.</strong></p>
<p>To be more specific quoting Microsoft:</p>
<div class="wpe-box wpe-box-error1" style="margin-bottom: 15px; font-weight: bold; text-align: justify;">After application of the Exchange Server April security update CMDlets executed against the Exchange Management Console using an invoked runspace might fail with the following error message:<br />
<em><span style="font-weight: bold; color: #993333;">The syntax is not supported by this runspace. This can occur if the runspace is in no-language mode.</span></em><br />
This behavior is expected; please change any code using .AddScript() to use .AddCommand() for continued compatibility.</div>
<p>This Microsoft article was quite helpful in terms of what to expect:</p>
<p><a class="wpe-button wpe-button-red" style="border: none;" href="https://techcommunity.microsoft.com/t5/exchange-team-blog/released-april-2021-exchange-server-security-updates/ba-p/2254617" target="_blank" rel="noopener noreferrer">April 2021 Exchange Server Security Updates</a></p>
<h2>Tasks before installing Exchange 2019 CU9 with KB5001779 and Exchange 2016 CU19 KB5001779:</h2>
<div class="wpe-box wpe-box-alert">
<ul>
<li>
<h5>Backup your web.config files where you have modified parameters or have added new keys.</h5>
<p>As we experienced it still only the web.config file in the OWA directory takes over parameters and keys you have modified before. To be safe I recommend backup every web.config file you have ever touched/modified. So you can easily reapply the changes you have made.</li>
<li><strong>Disable Check for publisher&#8217;s certificate revocation in IE.</strong></li>
<li><strong>Make sure you have enough free space on the install drive.</strong></li>
<li><strong>Take a look at the <a style="font-weight: bold;" href="https://docs.microsoft.com/en-us/exchange/plan-and-deploy/supportability-matrix?view=exchserver-2019" target="_blank" rel="noopener noreferrer">supportability matrix</a> if you need to upgrade your .NET version.</strong></li>
<li><strong>Check Auth methods on service directories like Powershell, OWA, and ECP and note the output.</strong></li>
<li><strong>Switch mailbox databases and put the server in maintenance mode.</strong></li>
</ul>
</div>
<h4>Order of install:</h4>
<div class="wpe-box wpe-box-note3">
<ul>
<li><strong>Install the regular Windows patches ( if necessary )</strong></li>
<li><strong>Install Exchange 2019 CU9 or Exchange 2016 CU20</strong></li>
<li><strong>Install the April security update KB5001779 from an elevated Command Prompt</strong></li>
</ul>
</div>
<h3>Sources:</h3>
<div class="wpe-box wpe-box-note3">
<h5>Exchange 2016 CU20:</h5>
<ul>
<li style="list-style-type: none;">
<ul>
<li><a style="color: #993333; font-weight: bold;" href="https://www.microsoft.com/en-us/download/details.aspx?id=102896" target="_blank" rel="noopener noreferrer">Download Exchange 2016 CU20 here</a>.</li>
<li><a style="color: #993333; font-weight: bold;" href="https://www.microsoft.com/en-us/download/details.aspx?id=103002" target="_blank" rel="noopener noreferrer">Download Exchange 2016 April security update KB5001779 here.</a></li>
</ul>
</li>
</ul>
<div style="width: 1px; height: 18px;"></div>
<h5>Exchange 2019 CU9:</h5>
<ul>
<li><a style="color: #993333; font-weight: bold;" href="https://www.microsoft.com/en-us/download/details.aspx?id=102900" target="_blank" rel="noopener noreferrer">Download Exchange 2019 CU9 here</a>.</li>
<li><a style="color: #993333; font-weight: bold;" href="https://www.microsoft.com/en-us/download/details.aspx?id=103004" target="_blank" rel="noopener noreferrer">Download Exchange 2019 April security update KB5001779 here.</a>.</li>
</ul>
</div>
<h2>Experiences after installing Exchange 2019 CU9 with KB5001779 and Exchange 2016 CU20 KB5001779:</h2>
<div class="wpe-box wpe-box-alert">
<p><strong>Cumulative Updates CU9 and CU20:</strong></p>
<ul style="margin-top: 10px;">
<li>
<div class="wpe-box wpe-box-note3" style="margin-bottom: 5px;"><strong>We had mailtips disabled. Mailtips were enabled afterward.</strong></div>
</li>
<li>
<div class="wpe-box wpe-box-note3">
<p><strong>The web.config files in the following directories have been overwritten. Changes needed to be reapplied.</strong></p>
<h5>Active Sync &#8211; [ We have an increased attachment size ] :</h5>
<p>C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\sync<br />
C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\sync</p>
<h5>ECP &#8211; [ We have additional keys in place. ] :</h5>
<p>C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\exchweb\ews</p>
<p>Anyway, I always check the OWA web.config as well:</p>
<h5>OWA &#8211; [ We have additional keys in place ] :</h5>
<p>C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\Owa</p>
</div>
</li>
<li>
<div class="wpe-box wpe-box-note3" style="margin-bottom: 5px;"><strong>Virtual directories for additional OWA and ECP we have in place needed to be recreated.</strong></div>
</li>
<li>
<div class="wpe-box wpe-box-error1" style="margin-bottom: 5px;">
<h4 style="text-decoration: underline;">Problems with KB5001779:</h4>
<p style="text-align: justify;"><span style="font-weight: bold;">As mentioned the security update breaks CMDlets you run from an external application against Exchange. For example provisioning mailboxes. Although we have read the Microsoft statements and have tested it we ran into this issue.</span></p>
<p style="text-align: justify;"><span style="font-weight: bold;">Since building a new release for our front-end application took a little bit more time than a change window grants I uninstalled KB5001779 on that Exchange server that the application uses for provisioning. Our development team has released a Hot-Fix since.<br />
</span></p>
<h4 style="text-decoration: underline;">Here is how to get rid of KB5001779:</h4>
<p style="text-align: justify;"><span style="font-weight: bold;">Since our Exchange 2019 servers are Core Servers I could not do it via GUI &#8211; Installed Updates. It would have been possible to do it via our management server and the Windows Admin Center. In the end, the local way was more sympathetic to me and I have uninstalled the patch via the uninstall string in the registry. You can find the string here:<br />
</span></p>
<div class="wpe-box wpe-box-note3" style="margin-bottom: 10px;"><strong>HKEY_LOCAL_MACHINE\SOFTWARE\Micorsoft\Windows\CurrrentVersion\Uninstall\Patch</strong></div>
<p style="text-align: justify;"><strong>Copy the value of the uninstall string and paste it into an elevated command prompt, press enter and follow the uninstall wizard. The process took about 30-40 minutes. If the ISO of the Exchange CU isn&#8217;t mounted anymore then you will be asked to insert the Exchange Server source disk. Browse to the required file and continue. Restart the server after the patch has been uninstalled.<br />
</strong></p>
</div>
</li>
</ul>
</div>
<p>In case you need information on other CUs take a look into the <a class="wpe-button wpe-button-blue" href="https://webbanshee.net/tag/cu/">CU Archives</a></p>
<p>&#8230; or find a general description here: <a class="wpe-button wpe-button-blue" href="https://webbanshee.net/cu-install-exchange-2016/">CU Install Exchange</a></p>
<p>Stay safe!</p>
<p>The post <a rel="nofollow" href="https://webbanshee.net/exchange-2019-cu9-with-kb5001779/">Exchange 2019 CU9 with KB5001779</a> appeared first on <a rel="nofollow" href="https://webbanshee.net">Webbanshee</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://webbanshee.net/exchange-2019-cu9-with-kb5001779/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3974</post-id>	</item>
		<item>
		<title>Exchange 2019 CU8 and Exchange 2016 CU19</title>
		<link>https://webbanshee.net/exchange-2019-cu8-and-exchange-2016-cu19/</link>
					<comments>https://webbanshee.net/exchange-2019-cu8-and-exchange-2016-cu19/#respond</comments>
		
		<dc:creator><![CDATA[WebBanshee]]></dc:creator>
		<pubDate>Thu, 25 Mar 2021 08:12:09 +0000</pubDate>
				<category><![CDATA[Serverside]]></category>
		<category><![CDATA[2016]]></category>
		<category><![CDATA[2019]]></category>
		<category><![CDATA[CU]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Patch]]></category>
		<guid isPermaLink="false">https://webbanshee.net/?p=3934</guid>

					<description><![CDATA[<style>.key{background:#444444;padding-left: 5px;padding-right: 5px;padding-top: 2px;padding-bottom: 2px;color:#fefefe;border-radius: 3px;font-size: 14px;}</style>
<p><a class="ex-link" href="https://webbanshee.net/exchange-2019-cu8-and-exchange-2016-cu19/"><img style="border-radius:8px;" src="https://webbanshee.net/wp-content/uploads/2020/08/CUInstallExchange_200.svg"/><span class="exTeaser" style="width:70%;">Exchange 2019 CU8 and Exchange 2016 CU19 install</span><br />
<span class="exText" style="width:70%;" >Altogether our environment consists of Exchange 2016 and Exchange 2019 servers. Read about schema versions and experiences in this post. <span style="font-size: 11px !Important; width: 10%; height: 5%; color: #993333; padding-left: 20px;">......read more</span></span></a></p>
<p>The post <a rel="nofollow" href="https://webbanshee.net/exchange-2019-cu8-and-exchange-2016-cu19/">Exchange 2019 CU8 and Exchange 2016 CU19</a> appeared first on <a rel="nofollow" href="https://webbanshee.net">Webbanshee</a>.</p>
]]></description>
										<content:encoded><![CDATA[<style>h2 {font-weight: bold;text-decoration:none;font-size: 18px!Important;}h3 {font-weight: bold;text-decoration:none;font-size: 18px!Important;} h5{margin-bottom: 5px;} .wp-image-2045,.wp-image-2051,.wp-image-2050,.wp-image-2049,.wp-image-2056, .wp-image-2055 {margin-top:2px!Important;margin-right:6px;} .wpe-box-alert {background-color:#f9f6d9!important;border: 1px solid #aaa895;text-align: justify;} .wpe-box-error1 {background-color:#ffebe8!important;border: 1px solid #c00;text-align: justify;} .wpe-box-alert ul li {list-style:square;padding-bottom: 10px;} .wpe-box-note99 ul li {list-style:square; padding-bottom:10px;} .entry-content img {border-radius:8px;}</style>
<div>
<p style="text-align: justify;">Hello fellow Exchange Admins! I know I am late on this. This post is for the records to have all CUs we installed covered. Anyway, we started to install Exchange 2019 CU8 and Exchange 2016 CU19 on the 4th of march straight after the Microsoft out of band session regarding Hafnium.</p>
<p style="text-align: justify;padding-bottom:20px;">Altogether our environment consists of Exchange 2016 and Exchange 2019 servers. Therefore we needed to apply the highest schema prior to installing Exchange 2019 CU8 and Exchange 2016 CU19 in this mixed environment.</p>
<p>Accordingly, we ran <strong>/prepareschema</strong>,<strong>/preparead</strong>,<strong>/preparedomain</strong> from an Exchange 2019 server. That was the first server in our environment we upgraded.</p>
<p>In order to determine your current schema version use the commands below:</p>
<div class="wpe-box wpe-box-note3">
<div style="overflow: scroll; white-space:nowrap;">
<span style="font-weight:bold;font-size:17px;text-decoration:underline;color:#993333;">Forest Range Upper:</span><br />
<span style="font-weight:bold;">Get-ADObject &#8220;CN=ms-Exch-Schema-Version-Pt,$((Get-ADRootDSE).schemaNamingContext)&#8221; -Property Rangeupper</span></p>
<p><span style="font-weight:bold;font-size:17px;text-decoration:underline;color:#993333;">Forest Object Version:</span><br />
<span style="font-weight:bold;">Get-ADObject (dir &#8220;AD:\CN=Microsoft Exchange,CN=Services,$((Get-ADRootDSE).configurationNamingContext)&#8221;).DistinguishedName -Property objectVersion</span></p>
<p><span style="font-weight:bold;font-size:17px;text-decoration:underline;color:#993333;">Domain Object Version:</span><br />
<span style="font-weight:bold;">Get-ADObject &#8220;CN=Microsoft Exchange System Objects,$((Get-ADRootDSE).defaultNamingContext)&#8221; -Property objectVersion</span>
</div>
</div>
<p>After you have determined your current schema versions check the minimum schema version required to install Exchange 2019 CU8 or Exchange 2016 CU19 from <a style="color:#993333; font-weight:bold;" href="https://eightwone.com/references/schema-versions/" rel="noopener noreferrer" target="_blank">this handy list on eightwone.com</a>.</p>
<h2>Tasks before installing Exchange 2019 CU8 and Exchange 2016 CU19:</h2>
<div class="wpe-box wpe-box-alert">
<ul>
<li>
<h5>Backup your web.config files where you have modified parameters or have added new keys.</h5>
<p>As we experienced it still only the web.config file in the OWA directory takes over parameters and keys you have modified before. To be safe I recommend backup every web.config file you have ever touched/modified. So you can easily reapply the changes you have made.
</li>
<li><strong>Disable Check for publisher&#8217;s certificate revocation in IE.</strong></li>
<li><strong>Make sure you have enough free space on the install drive.</strong></li>
<li><strong>Take a look at the <a style="font-weight:bold;" href="https://docs.microsoft.com/en-us/exchange/plan-and-deploy/supportability-matrix?view=exchserver-2019" rel="noopener noreferrer" target="_blank">supportability matrix</a> if you need to upgrade your .NET version.</strong></li>
<li><strong>Check Auth methods on service directories like Powershell, OWA, and ECP and note the output.</strong></li>
<li><strong>Switch mailbox databases and put the server in maintenance mode.</strong></li>
</ul>
</div>
<h4>Order of install:</h4>
<div class="wpe-box wpe-box-note3">
<ul>
<li><strong>Install the regular Windows patches ( if necessary )</strong></li>
<li><strong>Install Exchange 2019 CU8 or Exchange 2016 CU19</strong></li>
<li><strong>Install the Hafnium patch KB5000871 from an elevated Command Prompt</strong></li>
</ul>
</div>
<h3>Sources:</h3>
<div class="wpe-box wpe-box-note3">
<ul>
<h5>Exchange 2016 CU19:</h5>
<li><a style="color:#993333; font-weight:bold;" href="https://www.microsoft.com/en-us/download/details.aspx?id=102532" rel="noopener noreferrer" target="_blank">Download Exchange 2016 CU19 here</a>.</li>
<li><a style="color:#993333; font-weight:bold;" href="https://www.microsoft.com/en-us/download/details.aspx?id=102772" rel="noopener noreferrer" target="_blank">Download Exchange 2016 Hafnium patch KB5000871 here.</a></li>
<div style="width:1px; height:18px;"></div>
<h5>Exchange 2019 CU8:</h5>
<li><a style="color:#993333; font-weight:bold;" href="https://www.microsoft.com/Licensing/servicecenter/default.aspx" rel="noopener noreferrer" target="_blank">Download Exchange 2019 CU8 here</a>.<span style="font-weight:bold;"> [Can only be downloaded via volume license center.]</span></li>
<li><a style="color:#993333; font-weight:bold;" href="https://www.microsoft.com/en-us/download/details.aspx?id=102770" rel="noopener noreferrer" target="_blank">Download Exchange 2019 Hafnium patch KB5000871 here.</a>.</li>
</ul>
</div>
<h2>Experiences after Exchange 2019 CU8 and Exchange 2016 CU19 has been installed:</h2>
<div class="wpe-box wpe-box-alert">
<ul style="margin-top: 10px;">
<li>
<div class="wpe-box wpe-box-note3" style="margin-bottom: 5px;"><strong>We had mailtips disabled. Mailtips were enabled afterward.</strong></div>
</li>
<li>
<div class="wpe-box wpe-box-note3">
<p><strong>The web.config files in the following directories have been overwritten. Changes needed to be reapplied.</strong></p>
<h5>Active Sync &#8211; [ We have an increased attachment size ] :</h5>
<p>C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\sync<br />
C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\sync</p>
<h5>ECP &#8211; [ We have additional keys in place. ] :</h5>
<p>C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\exchweb\ews</p>
<p>Anyway, I always check the OWA web.config as well:</p>
<h5>OWA &#8211; [ We have additional keys in place ] :</h5>
<p>C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\Owa</p>
</div>
</li>
<li><strong>Virtual directories for additional OWA and ECP we have in place needed to be recreated.</strong></li>
</ul>
<ul  style="margin-top:10px;">
<li>
<div class="wpe-box wpe-box-error1" style="margin-bottom:5px;">
<h4>Problems with Exchange 2019 CU8 and Exchange 2016 CU19:</h4>
<p><span style="font-weight:bold;">As mentioned above we started to upgrade our Exchange 2019 servers first. After the first server was upgraded customers reported that delegated users lost their access rights on shared mailboxes. This was a minor issue since only a few customers were affected and could be solved by reapplying those access rights.</span></p>
<p><span style="font-weight:bold;">Another issue that started after we had the CU in place was time-outs from a 3rd party archiving software. Nothing fatally critical but from time to time some mailboxes could not be archived because the process ran into a time out. On the next run, those mailboxes were archived but new ones ran into a time-out.</span></p>
<p><span style="font-weight:bold;">However, in the event log of the patched servers, we could find the event IDs Microsoft mentions <a style="color:#993333; font-weight:bold;" href="https://support.microsoft.com/en-us/topic/event-ids-1003-1309-and-4999-are-logged-after-installing-exchange-server-2019-cu8-1295c555-d590-4a06-a53a-c14a0f363ee3" rel="noopener noreferrer" target="_blank">in this article</a>. Microsoft states that upgrading to Exchange 2019 CU9 will solve the problem.<br />
As soon as we upgrade to Exchange 2019 CU9 I will update this post.</span></p>
</div>
</li>
</ul>
<p>&nbsp;
</p></div>
<p>In case you need information on other CUs take a look into the <a class="wpe-button wpe-button-blue" href="https://webbanshee.net/tag/cu/">CU Archives</a></p>
<p>&#8230; or find a general description here:  <a class="wpe-button wpe-button-blue" href="https://webbanshee.net/cu-install-exchange-2016/">CU Install Exchange</a></p>
<p>Stay safe!<br />
&nbsp;</p>
<p>The post <a rel="nofollow" href="https://webbanshee.net/exchange-2019-cu8-and-exchange-2016-cu19/">Exchange 2019 CU8 and Exchange 2016 CU19</a> appeared first on <a rel="nofollow" href="https://webbanshee.net">Webbanshee</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://webbanshee.net/exchange-2019-cu8-and-exchange-2016-cu19/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3934</post-id>	</item>
		<item>
		<title>Mailbox Audit Logging &#8211; Enable and Search Logs</title>
		<link>https://webbanshee.net/mailbox-audit-logging/</link>
					<comments>https://webbanshee.net/mailbox-audit-logging/#respond</comments>
		
		<dc:creator><![CDATA[WebBanshee]]></dc:creator>
		<pubDate>Fri, 12 Mar 2021 07:21:35 +0000</pubDate>
				<category><![CDATA[Serverside]]></category>
		<category><![CDATA[2013]]></category>
		<category><![CDATA[2016]]></category>
		<category><![CDATA[2019]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[MailboxAudit]]></category>
		<category><![CDATA[Powershell]]></category>
		<guid isPermaLink="false">https://webbanshee.net/?p=3656</guid>

					<description><![CDATA[<style>.key{background:#444444;padding-left: 5px;padding-right: 5px;padding-top: 2px;padding-bottom: 2px;color:#fefefe;border-radius: 3px;font-size: 14px;}</style>
<p><a class="ex-link" href="https://webbanshee.net/mailbox-audit-logging/"><img src="https://webbanshee.net/wp-content/uploads/2021/02/MailboxAuditLogging.svg"/><span class="exTeaser" style="width:70%;">Use Mailbox Audit Logging to gather insights about what happens in a certain mailbox. </span><br />
<span class="exText" style="width:70%;" >When a mail went missing without interaction of the mailbox owner Mailbox Audit Logging can provide useful information.<span style="font-size: 11px !Important; width: 10%; height: 5%; color: #993333; padding-left: 20px;">......read more</span></span></a></p>
<p>The post <a rel="nofollow" href="https://webbanshee.net/mailbox-audit-logging/">Mailbox Audit Logging &#8211; Enable and Search Logs</a> appeared first on <a rel="nofollow" href="https://webbanshee.net">Webbanshee</a>.</p>
]]></description>
										<content:encoded><![CDATA[<style>h2 {font-weight: bold;text-decoration:none;font-size: 22px!Important;}h3 {font-weight: bold;text-decoration:none;font-size: 18px!Important;}h4 {font-weight: bold;text-decoration:none;font-size: 16px!Important;}.wp-image-2045,.wp-image-2051,.wp-image-2050,.wp-image-2049,.wp-image-2056, .wp-image-2055 {margin-top:2px!Important;margin-right:6px;}.red{background:#E86275;padding-left: 5px;padding-right: 5px;padding-top: 2px;padding-bottom: 2px;color:#fefefe;border-radius: 3px;font-size: 14px;} .wpe-button-blue {background:#1072C1!Important; border: none!Important;} .txtred {color:#993333;font-weight:bold;} .txtbold {font-weight:bold;}</style>
<p style="text-align: justify;">Did you ever receive inquiries about strange mailbox behavior like users state that mails have been deleted without any interaction of the mailbox owner? In cases like this, you are happy to enable Mailbox Audit Logging on the affected mailbox.</p>
<p style="text-align: justify;">This post is about how to enable Mailbox Audit Logging on a certain mailbox and configure the auditing parameters to provide the most relevant insights. Let&#8217;s get to the point straight away:</p>
<p>&nbsp;</p>
<h2><img class="alignnone size-full wp-image-2045" src="https://webbanshee.net/wp-content/uploads/2019/01/round_1.svg" alt="1 -" />Enable Mailbox Audit Logging on a mailbox</h2>
<h3>Check the audit status on a certain mailbox:</h3>
<div class="wpe-box wpe-box-note3">
<p><span style="font-weight: bold;">get-mailbox -Identity <span style="font-weight: bold; color: #993333;">MailboxName</span> | select PrimarySmtpAddress, *audit* | fl</span></p>
<p>In the following examples, I will use intern@testlab.local as <span style="font-weight: bold;">-Identity</span><br />
The output shows that Mailbox Audit Logging is not enabled on this mailbox:<br />
<a href="https://webbanshee.net/wp-content/uploads/2021/03/MailboxAuditLoggingDisabled.png"><img loading="lazy" class="aligncenter wp-image-3905 size-full" src="https://webbanshee.net/wp-content/uploads/2021/03/MailboxAuditLoggingDisabled.png" alt="Mailbo Audit Logging Disabled" width="1383" height="92" srcset="https://webbanshee.net/wp-content/uploads/2021/03/MailboxAuditLoggingDisabled.png 1383w, https://webbanshee.net/wp-content/uploads/2021/03/MailboxAuditLoggingDisabled-300x20.png 300w, https://webbanshee.net/wp-content/uploads/2021/03/MailboxAuditLoggingDisabled-1024x68.png 1024w, https://webbanshee.net/wp-content/uploads/2021/03/MailboxAuditLoggingDisabled-768x51.png 768w" sizes="(max-width: 1383px) 100vw, 1383px" /></a></p>
</div>
<h3>Enable Mailbox Audit Logging:</h3>
<div class="wpe-box wpe-box-note3">
<p><span style="font-weight: bold;">get-mailbox -Identity <span style="font-weight: bold; color: #993333;">MailboxName</span> | Set-Mailbox -AuditEnabled <span style="font-weight: bold; color: #993333;">$True</span></span></p>
<p>When you check the status again using the first command it will show AuditEnabled as True now.<br />
Operations audited by default are shown as well:<br />
<a href="https://webbanshee.net/wp-content/uploads/2021/03/MailboxAuditLoggingEnabled.png"><img loading="lazy" class="aligncenter size-full wp-image-3910" src="https://webbanshee.net/wp-content/uploads/2021/03/MailboxAuditLoggingEnabled.png" alt="Mailbox Audit Logging Enabled" width="1389" height="93" srcset="https://webbanshee.net/wp-content/uploads/2021/03/MailboxAuditLoggingEnabled.png 1389w, https://webbanshee.net/wp-content/uploads/2021/03/MailboxAuditLoggingEnabled-300x20.png 300w, https://webbanshee.net/wp-content/uploads/2021/03/MailboxAuditLoggingEnabled-1024x69.png 1024w, https://webbanshee.net/wp-content/uploads/2021/03/MailboxAuditLoggingEnabled-768x51.png 768w" sizes="(max-width: 1389px) 100vw, 1389px" /></a></p>
<p>If your output is truncated with ellipses (&#8230;) <a class="wpe-button wpe-button-blue" href="https://webbanshee.net/expand-powershell-output/" target="_blank" rel="noopener noreferrer">change the $FormatEnumerationLimit value.</a></p>
</div>
<h3>Define operations that should be audited:</h3>
<p>Depending on what circumstances make a mailbox audit logging necessary you can change the predefined audit operations to more relevant ones. Find a list of actions logged by mailbox audit logging <a style="font-weight: bold; color: #993333;" href="https://docs.microsoft.com/en-us/exchange/policy-and-compliance/mailbox-audit-logging/mailbox-audit-logging?view=exchserver-2019#mailbox-actions-logged-by-mailbox-audit-logging" target="_blank" rel="noopener noreferrer">here.</a></p>
<p>Usually, I completely change the actions for AuditOwner. <strong>AuditOwner = MailboxOwner</strong><br />
To do so use the following command:</p>
<div class="wpe-box wpe-box-note3"><span style="font-weight: bold;">Set-Mailbox <span style="font-weight: bold; color: #993333;">MailboxName</span> -Audit<span style="font-weight: bold; color: #993333;">Owner &#8220;Create, SoftDelete, HardDelete, Update, Move, MoveToDeletedItems,MailboxLogin&#8221;</span></span><br />
<a href="https://webbanshee.net/wp-content/uploads/2021/03/MailboxAuditLogging.png"><img loading="lazy" src="https://webbanshee.net/wp-content/uploads/2021/03/MailboxAuditLogging.png" alt="Mailbox Audit Loggint" width="1320" height="113" class="aligncenter size-full wp-image-3929" srcset="https://webbanshee.net/wp-content/uploads/2021/03/MailboxAuditLogging.png 1320w, https://webbanshee.net/wp-content/uploads/2021/03/MailboxAuditLogging-300x26.png 300w, https://webbanshee.net/wp-content/uploads/2021/03/MailboxAuditLogging-1024x88.png 1024w, https://webbanshee.net/wp-content/uploads/2021/03/MailboxAuditLogging-768x66.png 768w" sizes="(max-width: 1320px) 100vw, 1320px" /></a><br />
Adjust the logged actions according to the list by Microsoft mentioned above.<br />
Use <span style="font-weight: bold;">-AuditAdmin</span> or <span style="font-weight: bold;">-AuditDelegate</span> instead of <span style="font-weight: bold;">-AuditOwner</span> to change logged operations for Admin or Delegates.</p>
</div>
<h2><img class="alignnone size-full wp-image-2051" src="https://webbanshee.net/wp-content/uploads/2019/01/round_2.svg" alt="2 -" />Search Mailbox Audit Logs</h2>
<h3>Define your query:</h3>
<p>The <span style="font-weight: bold;">Search-MailboxAuditLog</span> CMDlet seems only to work out of an Exchange Management Shell. Out of an ISE loaded with an Exchange PS-Snapin, I always get an error. </p>
<p style="text-align: justify;">Undoubtedly the filter for date ranges in connection with the Search-MailboxAuditLog CMDlet is somewhat imprecise. If you want to query a range from 3 days ago until today for instance I recommend setting the end date of the query to the date of tomorrow. Otherwise, it can happen that no results will be shown for the current day or even the day before.</p>
<div class="wpe-box wpe-box-alert5">
<div class="wpe-box wpe-box-note3" style="overflow-x: auto;">
<span style="font-weight: bold;">Search-MailboxAuditLog -Identity <span style="font-weight: bold; color: #993333;">MailboName</span> -StartDate <span style="font-weight: bold; color: #993333;">&#8220;MM/DD/YYYY&#8221;</span> -EndDate <span style="font-weight: bold; color: #993333;">&#8220;MM/DD/YYYY&#8221;</span> -LogonTypes <span style="font-weight: bold; color: #993333;">Owner</span> -ShowDetails | select <span style="font-weight: bold; color: #993333;">lastaccessed, operation, logontype ,logonuserdisplayname,folderpathname,ClientIPAddress,ClientInfoString,ClientMachineName,ClientProcessName,MailboxOwnerUPN,DelegateUserDisplayName,MailboxResolvedOwnerName,SourceItemSubjectslist</span> | sort <span style="font-weight: bold; color: #993333;">lastaccessed</span> |ft -autosize</span>
</div>
<h3>Some notes to the query above:</h3>
<p><span style="font-weight: bold; color:#993333;">-StartDate/-EndDate:</span> The date format can vary depending on the regional settings of your system!<br />
<span style="font-weight: bold; color:#993333;">-LogonTypes:</span> Narrow down your query to logon types you are interested in.</p>
<h3>Selectors:</h3>
<p><span style="font-weight: bold; color:#993333;">Operation:</span> Displays the logged action.<br />
<span style="font-weight: bold; color:#993333;">ClientIpAddress:</span> Shows the IP address of the client respectively the source network outgoing IP address.<br />
<span style="font-weight: bold; color:#993333;">ClientInfoString:</span> Shows client connection types like RPC, ActiveSync, OWA<br />
<span style="font-weight: bold; color:#993333;">ClientProcessName:</span> For example OUTLOOK.exe<br />
<span style="font-weight: bold; color:#993333;">SourceItemSubjectslist:</span> The subject of mails where an action has been logged with.</p>
<p><span style="font-weight: bold;">I recommend to use only relevant selectors when searching an audit log.<br />
Displaying all selectors can make the output confusing or will not fit in at all.</span>
</div>
<p>Stay safe folks!<br />
&nbsp;</p>
<p>The post <a rel="nofollow" href="https://webbanshee.net/mailbox-audit-logging/">Mailbox Audit Logging &#8211; Enable and Search Logs</a> appeared first on <a rel="nofollow" href="https://webbanshee.net">Webbanshee</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://webbanshee.net/mailbox-audit-logging/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3656</post-id>	</item>
		<item>
		<title>Add Secondary IP Address Windows Server</title>
		<link>https://webbanshee.net/add-ip-address-windows-server/</link>
					<comments>https://webbanshee.net/add-ip-address-windows-server/#respond</comments>
		
		<dc:creator><![CDATA[WebBanshee]]></dc:creator>
		<pubDate>Mon, 07 Dec 2020 11:22:19 +0000</pubDate>
				<category><![CDATA[Serverside]]></category>
		<category><![CDATA[2016]]></category>
		<category><![CDATA[2019]]></category>
		<category><![CDATA[IP-Address]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[ServerCore]]></category>
		<guid isPermaLink="false">https://webbanshee.net/?p=3809</guid>

					<description><![CDATA[<style>.key{background:#444444;padding-left: 5px;padding-right: 5px;padding-top: 2px;padding-bottom: 2px;color:#fefefe;border-radius: 3px;font-size: 14px;}</style>
<p><a class="ex-link" href="https://webbanshee.net/add-ip-address-windows-server/"><img src="https://webbanshee.net/wp-content/uploads/2020/12/Add_Remove_IPaddress.svg"/><span class="exTeaser" style="width:70%;">Add or remove an IP address with PowerShell. Includes a script at the end of the post. Fell free to use.</span><br />
<span class="exText" style="width:70%;" >If you want to add a secondary IP Address without using the Change Adapter Options in the GUI ( especially on Windows Core servers ) you can achieve this in a simple way via PowerShell.<span style="font-size: 11px !Important; width: 10%; height: 5%; color: #993333; padding-left: 20px;">......read more</span></span></a></p>
<p>The post <a rel="nofollow" href="https://webbanshee.net/add-ip-address-windows-server/">Add Secondary IP Address Windows Server</a> appeared first on <a rel="nofollow" href="https://webbanshee.net">Webbanshee</a>.</p>
]]></description>
										<content:encoded><![CDATA[<style>.bckgr {background:#ccc;} .see {overflow-x:scroll!Important;overflow-y:hidden;white-space: nowrap;Background:#FDFDF4;border-left: 16px solid #7C98E2; border-top-left-radius:30px; padding-top:15px;padding-left:15px;padding-bottom:10px;scroll-behavior: smooth;}.MsoNormal {background:transparent!Important;} .code-bg {font-weight:bold; margin-top: -5px;} .BlueCopy:hover {opacity: 0.85;} h2 {font-weight: bold;text-decoration:none;font-size: 20px!Important;}h3 {font-weight: bold;text-decoration:none;font-size: 18px!Important;}h4 {font-weight: bold;text-decoration:none;font-size: 16px!Important;}.wp-image-2045,.wp-image-2051,.wp-image-2050,.wp-image-2049,.wp-image-2056, .wp-image-2055 {margin-top:2px!Important;margin-right:6px;} .wpe-button-blue {background: #1072C1!Important; border: none!Important;}.blue{background:#6666cc;padding-left: 5px;padding-right: 5px;padding-top: 2px;padding-bottom: 2px;color:#fefefe;border-radius: 3px;font-size: 14px;}</style>
<p style="text-align: justify;">If you want to add a secondary IP Address without using the Change Adapter Options in the GUI ( especially on Windows Core servers ) you could use <span class="blue">sconfig</span> or simply add the IP address with PowerShell.</p>
<p style="text-align: justify;">In my case, I wanted to add a secondary IP address to a certain interface on some Windows Server Core servers. Unfortunately, an Invalid Index error was thrown when I chose the appropriate interface under sconfig &#8211; Network Settings:</p>
<div class="wpe-box wpe-box-note3" style="margin-top: 50px;"><a href="https://webbanshee.net/wp-content/uploads/2020/12/Invalid_Index.png"><img loading="lazy" class="aligncenter size-full wp-image-3817" src="https://webbanshee.net/wp-content/uploads/2020/12/Invalid_Index.png" alt="Invalid Index Network Settings" width="623" height="130" srcset="https://webbanshee.net/wp-content/uploads/2020/12/Invalid_Index.png 623w, https://webbanshee.net/wp-content/uploads/2020/12/Invalid_Index-300x63.png 300w" sizes="(max-width: 623px) 100vw, 623px" /></a></div>
<p style="text-align: justify;">However, I faced this error a couple of months ago already when I wanted to <a class="wpe-button wpe-button-blue" href="https://webbanshee.net/disable-ipv6-on-server-core/" rel="noopener noreferrer">Disable IPv6</a> in my test lab.</p>
<p style="text-align: justify;">Because this time it was production servers I didn&#8217;t want to change any settings while adding secondary IP addresses to the servers. The only option was to add a secondary IP address via PowerShell.</p>
<p>&#8230; and here we go:</p>
<h2>Add Secondary IP Address to Network Interface:</h2>
<h3><img class="alignnone size-full wp-image-2045" src="https://webbanshee.net/wp-content/uploads/2019/01/round_1.svg" alt="1 -" />List Network Interfaces with name and Interface Index</h3>
<div class="wpe-box wpe-box-note3">
<p><strong>Get-NetAdapter</strong></p>
<p><a href="https://webbanshee.net/wp-content/uploads/2020/12/Get-NetAdapter.png"><img loading="lazy" class="aligncenter size-full wp-image-3820" src="https://webbanshee.net/wp-content/uploads/2020/12/Get-NetAdapter.png" alt="List Network Interfaces" width="588" height="102" srcset="https://webbanshee.net/wp-content/uploads/2020/12/Get-NetAdapter.png 588w, https://webbanshee.net/wp-content/uploads/2020/12/Get-NetAdapter-300x52.png 300w" sizes="(max-width: 588px) 100vw, 588px" /></a></p>
</div>
<h3><img class="alignnone size-full wp-image-2051" src="https://webbanshee.net/wp-content/uploads/2019/01/round_2.svg" alt="2 -" />Display existent IPs on chosen Network Interface</h3>
<div class="wpe-box wpe-box-note3">To list IPv4 and IPv6 IP addresses:<br />
<span style="font-weight: bold;">Get-NetAdapter -ifIndex</span><span style="font-weight: bold; color: #993333;">  ifIndex Number</span><span style="font-weight: bold;"> | Get-NetIPAddress | select IPAddress | ft</span><a href="https://webbanshee.net/wp-content/uploads/2020/12/IP_Address_All.png"><img loading="lazy" class="aligncenter size-full wp-image-3821" src="https://webbanshee.net/wp-content/uploads/2020/12/IP_Address_All.png" alt="List IPv4 and IPv6 addresses" width="889" height="90" srcset="https://webbanshee.net/wp-content/uploads/2020/12/IP_Address_All.png 889w, https://webbanshee.net/wp-content/uploads/2020/12/IP_Address_All-300x30.png 300w, https://webbanshee.net/wp-content/uploads/2020/12/IP_Address_All-768x78.png 768w" sizes="(max-width: 889px) 100vw, 889px" /></a>To display only IPv4 addresses:<br />
<span style="font-weight: bold;">Get-NetAdapter -ifIndex</span><span style="font-weight: bold; color: #993333;"> ifIndex Number</span><span style="font-weight: bold;"> | Get-NetIPAddress | where {$_.AddressFamily –eq “IPv4”} | select IPAddress</span><br />
<a href="https://webbanshee.net/wp-content/uploads/2020/12/IP_Address_IPv4.png"><img loading="lazy" class="aligncenter size-full wp-image-3828" src="https://webbanshee.net/wp-content/uploads/2020/12/IP_Address_IPv4.png" alt="List IPv4 addresses" width="899" height="82" srcset="https://webbanshee.net/wp-content/uploads/2020/12/IP_Address_IPv4.png 899w, https://webbanshee.net/wp-content/uploads/2020/12/IP_Address_IPv4-300x27.png 300w, https://webbanshee.net/wp-content/uploads/2020/12/IP_Address_IPv4-768x70.png 768w" sizes="(max-width: 899px) 100vw, 899px" /></a></p>
</div>
<h3><img class="alignnone size-full wp-image-2050" src="https://webbanshee.net/wp-content/uploads/2019/01/round_3.svg" alt="3 -" />Add new IP address</h3>
<div class="wpe-box wpe-box-note3"><span style="font-weight: bold;">New-NetIPAddress –IPAddress </span><span style="font-weight: bold; color: #993333;">&#8220;IpAddress goes here&#8221;</span><span style="font-weight: bold;"> –PrefixLength 24 –InterfaceIndex</span><span style="font-weight: bold; color: #993333;"> ifIndex Number</span><br />
<a href="https://webbanshee.net/wp-content/uploads/2020/12/Add_New_IP_Address.png"><img loading="lazy" class="aligncenter size-full wp-image-3819" src="https://webbanshee.net/wp-content/uploads/2020/12/Add_New_IP_Address.png" alt="Add secondary IP address" width="727" height="402" srcset="https://webbanshee.net/wp-content/uploads/2020/12/Add_New_IP_Address.png 727w, https://webbanshee.net/wp-content/uploads/2020/12/Add_New_IP_Address-300x166.png 300w" sizes="(max-width: 727px) 100vw, 727px" /></a><br />
<span style="margin-top: -10px;">The command adds the IP address to the ActiveStore and the Persistent Store.</span><br />
You can read more about the PolicyStore values <a href="https://docs.microsoft.com/en-us/powershell/module/nettcpip/new-netipaddress?view=win10-ps#:~:text=-PolicyStore">here</a>.</div>
<h3><img class="alignnone size-full wp-image-2050" src="https://webbanshee.net/wp-content/uploads/2019/01/round_4.svg" alt="4 -" />Verify that add a secondary IP address was successful</h3>
<div class="wpe-box wpe-box-note3"><span style="font-weight: bold;">Get-NetAdapter -ifIndex</span><span style="font-weight: bold; color: #993333;"> ifIndex Number</span><span style="font-weight: bold;"> | Get-NetIPAddress | where {$_.AddressFamily –eq “IPv4”} | select IPAddress</span><br />
<a href="https://webbanshee.net/wp-content/uploads/2020/12/IPv4_Address_added.png"><img loading="lazy" class="aligncenter size-full wp-image-3818" src="https://webbanshee.net/wp-content/uploads/2020/12/IPv4_Address_added.png" alt="Add Secondary IP Address done!" width="898" height="93" srcset="https://webbanshee.net/wp-content/uploads/2020/12/IPv4_Address_added.png 898w, https://webbanshee.net/wp-content/uploads/2020/12/IPv4_Address_added-300x31.png 300w, https://webbanshee.net/wp-content/uploads/2020/12/IPv4_Address_added-768x80.png 768w" sizes="(max-width: 898px) 100vw, 898px" /></a></div>
<p>Thats all. You don&#8217;t need to specify a default Gateway since this has most likely be done already with the initial IP address.</p>
<h2>Remove IP Address from Network Interface:</h2>
<h3><img class="alignnone size-full wp-image-2045" src="https://webbanshee.net/wp-content/uploads/2019/01/round_1.svg" alt="1 -" />List Network Interfaces with name and Interface Index</h3>
<div class="wpe-box wpe-box-note3">
<p><strong>Get-NetAdapter</strong></p>
<p><a href="https://webbanshee.net/wp-content/uploads/2020/12/Get-NetAdapter.png"><img loading="lazy" class="aligncenter size-full wp-image-3820" src="https://webbanshee.net/wp-content/uploads/2020/12/Get-NetAdapter.png" alt="Add Secondary IP Address list" width="588" height="102" srcset="https://webbanshee.net/wp-content/uploads/2020/12/Get-NetAdapter.png 588w, https://webbanshee.net/wp-content/uploads/2020/12/Get-NetAdapter-300x52.png 300w" sizes="(max-width: 588px) 100vw, 588px" /></a></p>
</div>
<h3><img class="alignnone size-full wp-image-2051" src="https://webbanshee.net/wp-content/uploads/2019/01/round_2.svg" alt="2 -" />Display existent IP addresses that can be removed on chosen Network Interface</h3>
<div class="wpe-box wpe-box-note3">We focus here only on IPv4 addresses. See point <img class="alignnone size-full wp-image-2051" style="padding-left: 5px!Important;" src="https://webbanshee.net/wp-content/uploads/2019/01/round_2.svg" alt="2 -" /> above to display IPv6 as well.<br />
<span style="font-weight: bold;">Get-NetAdapter -ifIndex</span><span style="font-weight: bold; color: #993333;"> ifIndex Number</span><span style="font-weight: bold;"> | Get-NetIPAddress | where {$_.AddressFamily –eq “IPv4”} | select IPAddress</span><br />
<a href="https://webbanshee.net/wp-content/uploads/2020/12/IP_address_to_remove.png"><img loading="lazy" class="aligncenter size-full wp-image-3835" src="https://webbanshee.net/wp-content/uploads/2020/12/IP_address_to_remove.png" alt="add secondary IP address remove" width="904" height="90" srcset="https://webbanshee.net/wp-content/uploads/2020/12/IP_address_to_remove.png 904w, https://webbanshee.net/wp-content/uploads/2020/12/IP_address_to_remove-300x30.png 300w, https://webbanshee.net/wp-content/uploads/2020/12/IP_address_to_remove-768x76.png 768w" sizes="(max-width: 904px) 100vw, 904px" /></a><br />
<strong>Copy IP address to remove from the output.</strong></div>
<h3><img class="alignnone size-full wp-image-2050" src="https://webbanshee.net/wp-content/uploads/2019/01/round_3.svg" alt="3 -" />Remove IP address</h3>
<div class="wpe-box wpe-box-note3">Insert copied IP address in the command below:<br />
<span style="font-weight: bold;">Get-NetIPAddress –IPAddress </span><span style="font-weight: bold; color: #993333;">IPAddressToRemove</span><span style="font-weight: bold;"> –InterfaceIndex</span><span style="font-weight: bold; color: #993333;"> ifIndex Number </span><span style="font-weight: bold;">| Remove-NetIPAddress</span>You will need to confirm it for both PolicyStores.<br />
Otherwise you could use the command with <strong>-Confirm:$false</strong></p>
</div>
<h3><img class="alignnone size-full wp-image-2050" src="https://webbanshee.net/wp-content/uploads/2019/01/round_4.svg" alt="4 -" />add secondary IP address verify</h3>
<div class="wpe-box wpe-box-note3"><span style="font-weight: bold;">Get-NetAdapter -ifIndex</span><span style="font-weight: bold; color: #993333;"> ifIndex Number</span><span style="font-weight: bold;"> | Get-NetIPAddress | where {$_.AddressFamily –eq “IPv4”} | select IPAddress</span><br />
<a href="https://webbanshee.net/wp-content/uploads/2020/12/IP_Address_IPv4.png"><img loading="lazy" class="aligncenter size-full wp-image-3828" src="https://webbanshee.net/wp-content/uploads/2020/12/IP_Address_IPv4.png" alt="Add secondary IP address IPv4 addresses" width="899" height="82" srcset="https://webbanshee.net/wp-content/uploads/2020/12/IP_Address_IPv4.png 899w, https://webbanshee.net/wp-content/uploads/2020/12/IP_Address_IPv4-300x27.png 300w, https://webbanshee.net/wp-content/uploads/2020/12/IP_Address_IPv4-768x70.png 768w" sizes="(max-width: 899px) 100vw, 899px" /></a></div>
<p>I have compiled the above steps in a script to make it more convenient:</p>
<p><a class="wpe-button wpe-button-blue" href="https://webbanshee.net/powershell-script-addremove-ip/" rel="noopener noreferrer">Script to Add/Remove IP Address</a></p>
<p>The post <a rel="nofollow" href="https://webbanshee.net/add-ip-address-windows-server/">Add Secondary IP Address Windows Server</a> appeared first on <a rel="nofollow" href="https://webbanshee.net">Webbanshee</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://webbanshee.net/add-ip-address-windows-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3809</post-id>	</item>
		<item>
		<title>Remote PowerShell Session to Server Core</title>
		<link>https://webbanshee.net/remote-powershell-session/</link>
					<comments>https://webbanshee.net/remote-powershell-session/#respond</comments>
		
		<dc:creator><![CDATA[WebBanshee]]></dc:creator>
		<pubDate>Tue, 22 Sep 2020 14:59:13 +0000</pubDate>
				<category><![CDATA[Serverside]]></category>
		<category><![CDATA[2016]]></category>
		<category><![CDATA[2019]]></category>
		<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[ServerCore]]></category>
		<guid isPermaLink="false">https://webbanshee.net/?p=3619</guid>

					<description><![CDATA[<style>.key{background:#444444;padding-left: 5px;padding-right: 5px;padding-top: 2px;padding-bottom: 2px;color:#fefefe;border-radius: 3px;font-size: 14px;} .txtbold {font-weight:bold;}</style>
<p><a class="ex-link" href="https://webbanshee.net/remote-powershell-session/"><img src="https://webbanshee.net/wp-content/uploads/2020/08/RemotePowerShell_vint.svg" /><span class="exTeaser" style="width: 70%;">Connect via a Remote PowerShell Session to another server.</span><br />
<span class="exText" style="width: 70%;">Use the following commands to establish, enter, or remove a Remote PowerShell Session: <span class="txtbold">New-PSSession, Enter-PSSession, Remove-PSSession </span><span style="font-size: 11px !Important; width: 10%; height: 5%; color: #993333; padding-left: 20px;">......read more</span></span></a></p>
<p>The post <a rel="nofollow" href="https://webbanshee.net/remote-powershell-session/">Remote PowerShell Session to Server Core</a> appeared first on <a rel="nofollow" href="https://webbanshee.net">Webbanshee</a>.</p>
]]></description>
										<content:encoded><![CDATA[<style>h2 {font-weight: bold;text-decoration:none;font-size: 20px!Important;}h3 {font-weight: bold;text-decoration:none;font-size: 18px!Important;}h4 {font-weight: bold;text-decoration:none;font-size: 16px!Important;}.wp-image-2045,.wp-image-2051,.wp-image-2050,.wp-image-2049,.wp-image-2056, .wp-image-2055 {margin-top:2px!Important;margin-right:6px;}.red{background:#E86275;padding-left: 5px;padding-right: 5px;padding-top: 2px;padding-bottom: 2px;color:#fefefe;border-radius: 3px;font-size: 14px;} .wpe-button-blue {background:#1072C1!Important; border: none!Important;} .txtred {color:#993333;font-weight:bold;} .txtbold {font-weight:bold;}.entry-title {color: #fefefe;font-size: 30px;font-weight: 400;margin-bottom: 10px;padding-left: 10px;background: #353535;border-top-left-radius: 5px;border-bottom-left-radius: 5px;}</style>
<p style="text-align: justify;">Hello Folks, this is just a simple post on how to open and enter a Remote PowerShell Session from one server to another. A lot of tasks on different servers can be accomplished in a convenient way from one server.</p>
<p style="text-align: justify;">For instance if you want to <a class="wpe-button wpe-button-blue" href="https://webbanshee.net/change-input-language-on-server-core-login-screen/" rel="noopener noreferrer">Change the Keyboard Layout</a> on the login screen of a new Server Core installation.</p>
<p style="text-align: justify;">We will use the cmdlets below to open, enter, exit, and remove a Remote PowerShell session.</p>
<h3 style="margin-top: 30px;">Remote PowerShell Prerequisites:</h3>
<div class="wpe-box wpe-box-download" style="background: #eaf7da!Important;">To receive PowerShell remote commands <strong>PS-Remoting</strong> must be enabled on the computer. PS-Remoting is enabled by default. Further the <strong>WinRM Service</strong> needs to be started.</div>
<p>If you want to go for sure firstly check the PS-Remoting state of the remote computer with:</p>
<div class="wpe-box wpe-box-note3"><span style="font-weight: bold;">Test-WSMan -ComputerName</span><span style="color: #993333; font-weight: bold;"> NameOfRemoteComputer</span></div>
<p>Afterward, verify the state of the WinRM service on the remote computer that it is running:</p>
<div class="wpe-box wpe-box-note3"><span style="font-weight: bold;">Get-Service WinRM -ComputerName</span><span style="color: #993333; font-weight: bold;"> NameOfRemoteComputer</span><span style="font-weight: bold;"> | Select MachineName,Name,Status</span></div>
<h3 style="margin-top: 30px;">Remote PowerShell Session Cmdlets:</h3>
<div class="wpe-box wpe-box-alert" style="background: #F9F6D9!Important;"><strong>Get-PSSession</strong> &#8211; [Shows current sessions]<br />
<strong>New-PSSession</strong> &#8211; [Create a new persistent connection to the target host]<br />
<strong>Enter-PSSession</strong> &#8211; [Enter a session as interactive session]<br />
<strong>Exit-PSSession</strong> &#8211; [Exit session. The session will still be alive in the background]<br />
<strong>Disconnect-PSSession</strong> &#8211; [Disconnect from the session]<br />
<strong>Connect-PSSession</strong> &#8211; [connect to a disconnected session]<br />
<strong>Remove-PSSession</strong> &#8211; [Remove an earlier created persistent session]</div>
<p>Ok, here we go &#8230;</p>
<h2><img class="alignnone size-full wp-image-2045" src="https://webbanshee.net/wp-content/uploads/2019/01/round_1.svg" alt="1 -" />Create a Remote PowerShell Session with New-PSSession:</h2>
<div class="wpe-box wpe-box-note3">
<p><span class="txtbold">New-PSSession -Name <span class="txtred">NameOfSession</span> -ComputerName</span><span class="txtred"> NameOfRemoteComputer</span><span class="txtbold"> -Credential</span><span class="txtred"> Domain\Username</span>.</p>
<p>In case you don&#8217;t want to give the remote PowerShell session a name it will be named WinRM*</p>
</div>
<h2><img class="alignnone size-full wp-image-2051" src="https://webbanshee.net/wp-content/uploads/2019/01/round_2.svg" alt="2 -" />Check the newly created session with Get-PSSession:</h2>
<div class="wpe-box wpe-box-note3"><span class="txtbold">Get-PSSession</p>
<p></span>The output will show the state of the session:<br />
<a href="https://webbanshee.net/wp-content/uploads/2020/09/Get-PSSession.png"><img loading="lazy" class="aligncenter size-full wp-image-3639" src="https://webbanshee.net/wp-content/uploads/2020/09/Get-PSSession.png" alt="Get Remote PowerShell Session" width="756" height="71" srcset="https://webbanshee.net/wp-content/uploads/2020/09/Get-PSSession.png 756w, https://webbanshee.net/wp-content/uploads/2020/09/Get-PSSession-300x28.png 300w" sizes="(max-width: 756px) 100vw, 756px" /></a>I gave my session the name &#8220;ServerCore&#8221;. It connects to an Exchange 2019 server running on Server 2019 Core with hostname &#8220;exchange2019&#8221;</p>
<p>If you have more sessions you can go for the computer name:<br />
<span class="txtbold">Get-PSSession -ComputerName</span><span class="txtred"> NameOfRemoteComputer</p>
<p></span>&#8230; or explicit for the session name:<br />
<span class="txtbold">Get-PSSession -Name</span><span class="txtred"> NameOfSession</p>
<p></span>&#8230; and also for the Id:<br />
<span class="txtbold">Get-PSSession -Name</span><span class="txtred"> ID</span></div>
<h2><img class="alignnone size-full wp-image-2050" src="https://webbanshee.net/wp-content/uploads/2019/01/round_3.svg" alt="3 -" />Enter a session directly as an interactive session with Enter-PSSession:</h2>
<div class="wpe-box wpe-box-note3" style="text-align: justify;"><span class="txtbold">Enter-PSSession -ComputerName </span><span class="txtred">NameOfRemoteComputer</span><br />
<span class="txtbold">Enter-PSSession -name</span> <span class="txtred">NameOfSession</span>.<br />
&nbsp;<br />
As a result, PowerShell switches to the entered interactive session:<br />
&nbsp;<br />
<a href="https://webbanshee.net/wp-content/uploads/2020/09/Enter-PSSession.png"><img loading="lazy" class="aligncenter size-full wp-image-3643" src="https://webbanshee.net/wp-content/uploads/2020/09/Enter-PSSession.png" alt="Enter PowerShell Session" width="425" height="41" srcset="https://webbanshee.net/wp-content/uploads/2020/09/Enter-PSSession.png 425w, https://webbanshee.net/wp-content/uploads/2020/09/Enter-PSSession-300x29.png 300w" sizes="(max-width: 425px) 100vw, 425px" /></a><br />
You can perform tasks on the target server via PowerShell from the localhost within this session now.<br />
Enter-PSSession does not require a session that has been created with New-PSSession before.</div>
<p>Find more on how to run Remote Commands from a Remote PowerShell Session <span class="txtbold txtred"><a style="font-weight: bold;" href="https://docs.microsoft.com/en-us/powershell/scripting/learn/remoting/running-remote-commands?view=powershell-7" target="_blank" rel="noopener noreferrer">here</a>.</span></p>
<h2><img class="alignnone size-full wp-image-2049" src="https://webbanshee.net/wp-content/uploads/2019/01/round_4.svg" alt="4 -" />Exit an interactive session with Exit-PSSession:</h2>
<div class="wpe-box wpe-box-note3">Within the remote PowerShell type:<br />
<span class="txtbold">Exit-PSSession</p>
<p></span>Instead of Exit-PSSession, you can just type <strong>Exit</strong> as well. It will have the same effect.</p>
<p>Thereafter, the session remains open but you have left the interactive session into the localhost&#8217;s PowerShell:</p>
<p><a href="https://webbanshee.net/wp-content/uploads/2020/09/OpenedPSSession.png"><img loading="lazy" class="aligncenter size-full wp-image-3645" src="https://webbanshee.net/wp-content/uploads/2020/09/OpenedPSSession.png" alt="Open Remote PowerShell Sessions" width="744" height="68" srcset="https://webbanshee.net/wp-content/uploads/2020/09/OpenedPSSession.png 744w, https://webbanshee.net/wp-content/uploads/2020/09/OpenedPSSession-300x27.png 300w" sizes="(max-width: 744px) 100vw, 744px" /></a></div>
<h2><img class="alignnone size-full wp-image-2049" src="https://webbanshee.net/wp-content/uploads/2019/01/round_5.svg" alt="5 -" />Disconnect a session with Disconnect-PSSession:</h2>
<div class="wpe-box wpe-box-note3" style="text-align: justify;">You can disconnect a remote PowerShell session which has been created with New-PSSession.<br />
But you can&#8217;t disconnect an interactive session that has been initiated with Enter-PSSession.</p>
<p>To disconnect a session run the command below from your localhost&#8217;s PowerShell:<br />
<span class="txtbold"><br />
Disconnect-PSSession -name </span><span class="txtred"><span class="txtred">NameOfSession</span></span>&nbsp;</p>
<p>&#8230;or disconnect it based on the ID:<br />
<span class="txtbold">Disconnect-PSSession -Id </span><span class="txtred"><span class="txtred">ID</span></span>&nbsp;</p>
<p>Further, you can disconnect all remote session for a certain remote host based on ComputerName:<br />
<span class="txtbold">Disconnect-PSSession -Id </span><span class="txtred"><span class="txtred">ComputerName</span></span>&nbsp;</p>
<p>Following you get an output like this:<br />
<a href="https://webbanshee.net/wp-content/uploads/2020/09/Disconnect-PSSession.png"><img loading="lazy" class="aligncenter size-full wp-image-3647" src="https://webbanshee.net/wp-content/uploads/2020/09/Disconnect-PSSession.png" alt="Disconnect Remote PowerShell Session" width="756" height="80" srcset="https://webbanshee.net/wp-content/uploads/2020/09/Disconnect-PSSession.png 756w, https://webbanshee.net/wp-content/uploads/2020/09/Disconnect-PSSession-300x32.png 300w" sizes="(max-width: 756px) 100vw, 756px" /></a></p>
<p>You can later reconnect by using the Connect-PSSession cmdlet.</p>
</div>
<h2><img class="alignnone size-full wp-image-2049" src="https://webbanshee.net/wp-content/uploads/2019/01/round_6.svg" alt="6 -" />Reconnect a disconnected PowerShell session:</h2>
<div class="wpe-box wpe-box-note3">As shown below you can reconnect an existing session that has been created with New-PSSession:</p>
<p><span class="txtbold">Connect-PSSession -name </span><span class="txtred">NameOfSession</span>&#8230; or you connect it with its ID:<br />
<span class="txtbold">Connect-PSSession -Id </span><span class="txtred">ID</span>&#8230; as well as with ComputerName:<br />
<span class="txtbold">Connect-PSSession -Id </span><span class="txtred">Computername</span></div>

<h2 class="entry-title" style="font-size: 30px!Important;">Remote PowerShell Session to Exchange Server</h2>
<h2>To connect with a Remote PowerShell Session to Exchange use:</h2>
<div class="wpe-box wpe-box-note3"><span class="txtbold"><span class="txtred">$UserCred</span> = Get-Credential</p>
<p><span class="txtred">$ExSession</span> = New-PSSession -ConfigurationName Microsoft.Exchange –Name <span class="txtred">ExchangeSession</span> -ConnectionUri <span class="txtred">&#8220;http://RemoteExchangeFQDN/powershell&#8221;</span> -Credential <span class="txtred">$UserCred</span> -Authentication Kerberos</p>
<p>Import-PSSession <span class="txtred">$ExSession</span></span></div>
<h3>You can verify the session with name <span class="txtbold"><span class="txtred">ExchangeSession</span></span> you just openend with <span class="txtbold">Get-PSSession</span>:</h3>
<div class="wpe-box wpe-box-note3"><a href="https://webbanshee.net/wp-content/uploads/2020/10/Get-PSSession-Exchange.png"><img loading="lazy" class="aligncenter size-full wp-image-3664" src="https://webbanshee.net/wp-content/uploads/2020/10/Get-PSSession-Exchange.png" alt="Get Remote PowerShell Session Exchange" width="771" height="89" srcset="https://webbanshee.net/wp-content/uploads/2020/10/Get-PSSession-Exchange.png 771w, https://webbanshee.net/wp-content/uploads/2020/10/Get-PSSession-Exchange-300x35.png 300w, https://webbanshee.net/wp-content/uploads/2020/10/Get-PSSession-Exchange-768x89.png 768w" sizes="(max-width: 771px) 100vw, 771px" /></a><br />
<span style="display: block; margin-top: -20px;">The Exchange CMDLets will be available now.</span></div>
<h3>The same can be done from an Exchange Management Shell to connect through a Remote PowerShell session to another Exchange Server:</h3>
<div class="wpe-box wpe-box-note3"><span class="txtbold">Open an Exchange Management Shell</span></p>
<p>If you are on a Server Core type <span class="txtbold">LaunchEMS</span> into the command window.</p>
<p><span class="txtbold">Use the CMDlets from above</span></div>
<p>That&#8217;s all.  <img loading="lazy" class="" src="https://webbanshee.net/wp-content/uploads/2018/10/smiley.png" alt="smiley :)" width="25" height="25" /><br />
&nbsp;<br />
&nbsp;<br />
To display the output of a PowerShell command completely without ellipses take a look here:</p>
<p><a class="wpe-button wpe-button-red" href="https://webbanshee.net/expand-powershell-output/">Expand PowerShell Output</a><br />
&nbsp;</p>
<p>The post <a rel="nofollow" href="https://webbanshee.net/remote-powershell-session/">Remote PowerShell Session to Server Core</a> appeared first on <a rel="nofollow" href="https://webbanshee.net">Webbanshee</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://webbanshee.net/remote-powershell-session/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3619</post-id>	</item>
	</channel>
</rss>
