<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	Comments on: How To Change UserPrincipalName with PowerShell	</title>
	<atom:link href="https://thesysadminchannel.com/change-userprincipalname-with-powershell/feed/" rel="self" type="application/rss+xml" />
	<link>https://thesysadminchannel.com/change-userprincipalname-with-powershell/</link>
	<description>Documenting My Life as a System Administrator</description>
	<lastBuildDate>Wed, 10 Jul 2024 16:28:42 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>
		By: Bobby		</title>
		<link>https://thesysadminchannel.com/change-userprincipalname-with-powershell/#comment-31659</link>

		<dc:creator><![CDATA[Bobby]]></dc:creator>
		<pubDate>Wed, 10 Jul 2024 16:28:42 +0000</pubDate>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=3511#comment-31659</guid>

					<description><![CDATA[What if I don&#039;t want to filter to a specific OU.]]></description>
			<content:encoded><![CDATA[<p>What if I don&#8217;t want to filter to a specific OU.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: klone12		</title>
		<link>https://thesysadminchannel.com/change-userprincipalname-with-powershell/#comment-20018</link>

		<dc:creator><![CDATA[klone12]]></dc:creator>
		<pubDate>Sun, 29 Oct 2023 00:44:32 +0000</pubDate>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=3511#comment-20018</guid>

					<description><![CDATA[Try this instead:
get-aduser -Properties * -Filter &#039;(Enabled -eq &quot;True&quot;) -and (UserPrincipalName -like &quot;*contoso.local*&quot; )&#039; &#124; `
 % { $newUPN = $_.UserPrincipalName -replace &quot;contoso.local&quot;,&quot;contoso.com&quot; ;  
     write-host &quot;Before Change: &quot; $_.UserPrincipalName 
     write-host &quot;After    Change: &quot;$newUPN
     write-host 

     Set-ADUser $_.samaccountname -UserPrincipalName $newUPN -Confirm:$false -Verbose 
}]]></description>
			<content:encoded><![CDATA[<p>Try this instead:<br />
get-aduser -Properties * -Filter &#8216;(Enabled -eq &#8220;True&#8221;) -and (UserPrincipalName -like &#8220;*contoso.local*&#8221; )&#8217; | `<br />
 % { $newUPN = $_.UserPrincipalName -replace &#8220;contoso.local&#8221;,&#8221;contoso.com&#8221; ;<br />
     write-host &#8220;Before Change: &#8221; $_.UserPrincipalName<br />
     write-host &#8220;After    Change: &#8220;$newUPN<br />
     write-host </p>
<p>     Set-ADUser $_.samaccountname -UserPrincipalName $newUPN -Confirm:$false -Verbose<br />
}</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Joseph		</title>
		<link>https://thesysadminchannel.com/change-userprincipalname-with-powershell/#comment-7304</link>

		<dc:creator><![CDATA[Joseph]]></dc:creator>
		<pubDate>Fri, 06 Jan 2023 15:58:47 +0000</pubDate>
		<guid isPermaLink="false">https://thesysadminchannel.com/?p=3511#comment-7304</guid>

					<description><![CDATA[Nice. I am going to use that the next time Angelina Jolie stops by the office, hopefully without Brad ... That would put a damper on things]]></description>
			<content:encoded><![CDATA[<p>Nice. I am going to use that the next time Angelina Jolie stops by the office, hopefully without Brad &#8230; That would put a damper on things</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
