<?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/"
	>

<channel>
	<title>Azure Active Directory | KC's Blog</title>
	<atom:link href="https://www.kjctech.net/tag/azure-active-directory/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.kjctech.net</link>
	<description></description>
	<lastBuildDate>Sat, 16 Mar 2024 06:47:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://i0.wp.com/www.kjctech.net/wp-content/uploads/2016/12/cropped-KC-Logo.png?fit=32%2C32&#038;ssl=1</url>
	<title>Azure Active Directory | KC's Blog</title>
	<link>https://www.kjctech.net</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">24634607</site>	<item>
		<title>In-Place Upgrading A Windows Server 2012 Domain Controller to Windows Server 2019 or 2022</title>
		<link>https://www.kjctech.net/in-place-upgrading-a-windows-server-2012-domain-controller-to-windows-server-2019-or-2022/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=in-place-upgrading-a-windows-server-2012-domain-controller-to-windows-server-2019-or-2022</link>
					<comments>https://www.kjctech.net/in-place-upgrading-a-windows-server-2012-domain-controller-to-windows-server-2019-or-2022/#comments</comments>
		
		<dc:creator><![CDATA[Kent Chen]]></dc:creator>
		<pubDate>Sat, 16 Mar 2024 06:47:11 +0000</pubDate>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Azure Active Directory]]></category>
		<guid isPermaLink="false">https://www.kjctech.net/?p=5146</guid>

					<description><![CDATA[<p>Generally speaking, in-place upgrading from one server version to another usually goes almost perfectly, given that the upgrade path is supported. You can just mount an ISO image and go with it. But when the server you are upgrading is a domain controller. There are other things to consider before going ahead. Pre-upgrade First, if you have Azure (Entra) AD [&#8230;]</p>
The post <a href="https://www.kjctech.net/in-place-upgrading-a-windows-server-2012-domain-controller-to-windows-server-2019-or-2022/">In-Place Upgrading A Windows Server 2012 Domain Controller to Windows Server 2019 or 2022</a> first appeared on <a href="https://www.kjctech.net">KC's Blog</a>.]]></description>
										<content:encoded><![CDATA[<p>Generally speaking, in-place upgrading from one server version to another usually goes almost perfectly, given that the upgrade path is supported. You can just mount an ISO image and go with it. But when the server you are upgrading is a domain controller. There are other things to consider before going ahead.</p>



<h3 class="wp-block-heading">Pre-upgrade</h3>



<p>First, if you have Azure (Entra) AD Connect installed on the server, an in-place upgrade will mess things up quite badly. <a href="https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/how-to-upgrade-previous-version" target="_blank" rel="noopener" title="">What Microsoft suggests</a> is to use the Swing migration to set the original server in stage mode and temporarily move the Azure (Entra) AD Connect to a different server.</p>



<p>You will also need to prepare the AD schema before the in-place upgrade. Mount the Windows Server 2019 or 2022 Installation ISO media, go to the <strong><em>support\adprep</em></strong> folder and run the following commands.</p>



<pre class="wp-block-preformatted">adprep /forestprep
adprep /domainprep</pre>



<p>Once done, run the following PowerShell cmdlet to confirm the result about the schema version you are about to upgrade to.</p>



<pre class="wp-block-preformatted">Get-ADObject (Get-ADRootDSE).schemaNamingContext -Property objectVersion</pre>



<p>Here is the schema version value table for your reference.</p>



<pre class="wp-block-preformatted">Windows Server 2012 R2 - 69
Windows Server 2016 - 87
Windows Server 2019 - 88
Windows Server 2022 - 88</pre>



<h3 class="wp-block-heading">The actual upgrade</h3>



<p>Now, it is good to go with the in-place upgrade. The actual process will be quite straightforward and should be done fairly quickly.</p>



<h3 class="wp-block-heading">Post-upgrade</h3>



<p>Everything should be up and running right away, including DNS, AD services as well as group policy setups. Two things might require your attention.</p>



<p>The DHCP server might need to be re-authorized to be used again.</p>



<p>Also, if you are using the SMTP services from the legacy IIS 6, you might need to re-configure everything. The settings were wiped out during one of my upgrades. It&#8217;s a good idea to document the setup before doing the upgrade.</p>



<h4 class="wp-block-heading">References:</h4>



<ul class="wp-block-list">
<li><a href="https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/how-to-upgrade-previous-version" target="_blank" rel="noopener" title="">Microsoft Entra Connect: Upgrade from a previous version to the latest</a></li>



<li><a href="https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/deploy/upgrade-domain-controllers" target="_blank" rel="noopener" title="">Upgrade domain controllers to a newer version of Windows Server</a></li>
</ul>The post <a href="https://www.kjctech.net/in-place-upgrading-a-windows-server-2012-domain-controller-to-windows-server-2019-or-2022/">In-Place Upgrading A Windows Server 2012 Domain Controller to Windows Server 2019 or 2022</a> first appeared on <a href="https://www.kjctech.net">KC's Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://www.kjctech.net/in-place-upgrading-a-windows-server-2012-domain-controller-to-windows-server-2019-or-2022/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5146</post-id>	</item>
		<item>
		<title>How To Connect-MsolService without Login Prompt</title>
		<link>https://www.kjctech.net/how-to-connect-msolservice-without-login-prompt/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-connect-msolservice-without-login-prompt</link>
					<comments>https://www.kjctech.net/how-to-connect-msolservice-without-login-prompt/#comments</comments>
		
		<dc:creator><![CDATA[Kent Chen]]></dc:creator>
		<pubDate>Thu, 19 Nov 2020 07:29:39 +0000</pubDate>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Azure Active Directory]]></category>
		<category><![CDATA[Microsoft 365]]></category>
		<guid isPermaLink="false">https://www.kjctech.net/?p=4531</guid>

					<description><![CDATA[<p>To use PowerShell to manage Microsoft 365 services, you need to initiate a connection to Azure Active Directory first and then run the cmdlets it provides. Connect-MsolService It prompts a normal Microsoft login screen for you to sign in. When you are using PowerShell window, one connection should last until you close the window. But if you are using PowerShell [&#8230;]</p>
The post <a href="https://www.kjctech.net/how-to-connect-msolservice-without-login-prompt/">How To Connect-MsolService without Login Prompt</a> first appeared on <a href="https://www.kjctech.net">KC's Blog</a>.]]></description>
										<content:encoded><![CDATA[<p>To use PowerShell to manage Microsoft 365 services, you need to initiate a connection to Azure Active Directory first and then run the cmdlets it provides.</p>



<pre class="wp-block-preformatted">Connect-MsolService</pre>



<p>It prompts a normal Microsoft login screen for you to sign in. When you are using PowerShell window, one connection should last until you close the window. But if you are using PowerShell ISE or tools like Visual Studio Code to program a block of code to run it&#8217;s so inconvenient it pops up every time.</p>



<p>One way to make it easy is to use the <a href="https://docs.microsoft.com/en-us/dotnet/api/system.management.automation.pscredential?view=powershellsdk-7.0.0" target="_blank" rel="noreferrer noopener">PSCredential</a> object. Use something like below at the beginning of your code, you should be able to bypass the login prompt during your code development.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: powershell; title: Code example:; notranslate">
$username = &#039;name@domain.come&#039;
$pwd = ConvertTo-SecureString &#039;realpassword&#039; -asplaintext -force;
$cred = New-Object -TypeName PSCredential -argumentlist $username, $pwd

Connect-MsolService -Credential $cred
##put more msonline codes below
</pre></div>


<p>You may consider removing it after you are done your coding though. Hard coded credentials in the code base is never a good practice.</p>The post <a href="https://www.kjctech.net/how-to-connect-msolservice-without-login-prompt/">How To Connect-MsolService without Login Prompt</a> first appeared on <a href="https://www.kjctech.net">KC's Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://www.kjctech.net/how-to-connect-msolservice-without-login-prompt/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4531</post-id>	</item>
	</channel>
</rss>
