
<?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>Server Rename Archives - TECHNIG</title>
	<atom:link href="https://www.technig.com/tag/server-rename/feed/" rel="self" type="application/rss+xml" />
	<link>https://168.138.42.164/tag/server-rename/</link>
	<description>Gateway for IT Experts and Tech Geeks</description>
	<lastBuildDate>Thu, 12 May 2022 10:37:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>

<image>
	<url>https://www.technig.com/wp-content/uploads/2020/04/32x32.png</url>
	<title>Server Rename Archives - TECHNIG</title>
	<link>https://168.138.42.164/tag/server-rename/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">162720667</site>	<item>
		<title>Install Active Directory On Windows Server 2022 Using PowerShell</title>
		<link>https://www.technig.com/install-active-directory-on-windows-server-2022-using-powershell/</link>
					<comments>https://www.technig.com/install-active-directory-on-windows-server-2022-using-powershell/#respond</comments>
		
		<dc:creator><![CDATA[Mashallah Haidarzada]]></dc:creator>
		<pubDate>Sat, 14 May 2022 18:00:00 +0000</pubDate>
				<category><![CDATA[MCSA]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Active Directory Installation]]></category>
		<category><![CDATA[Assign IPv4 in PowerShell]]></category>
		<category><![CDATA[Create a Domain]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Server Rename]]></category>
		<category><![CDATA[Windows PowerShell]]></category>
		<category><![CDATA[Windows Server 2022]]></category>
		<guid isPermaLink="false">https://technig.com/?p=17821</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"><img width="1036" height="577" src="https://www.technig.com/wp-content/uploads/2022/04/screenshot_20220429_200235.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Install Active Directory Using PowerShell" decoding="async" fetchpriority="high" srcset="https://www.technig.com/wp-content/uploads/2022/04/screenshot_20220429_200235.png 1036w, https://www.technig.com/wp-content/uploads/2022/04/screenshot_20220429_200235-300x167.png 300w, https://www.technig.com/wp-content/uploads/2022/04/screenshot_20220429_200235-1024x570.png 1024w, https://www.technig.com/wp-content/uploads/2022/04/screenshot_20220429_200235-768x428.png 768w" sizes="(max-width: 1036px) 100vw, 1036px" /></div>
<p>Using PowerShell to install Active Directory Domain Services (AD-DS) on Windows Server 2022 helps you install it quickly. It is better to rename your server and assign a static IP address before installing the active directory. Assign Static IPv4 and Rename Server Using PowerShell It is important to assign a static IP address to a [&#8230;]</p>
<p>The post <a href="https://www.technig.com/install-active-directory-on-windows-server-2022-using-powershell/">Install Active Directory On Windows Server 2022 Using PowerShell</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"><img width="1036" height="577" src="https://www.technig.com/wp-content/uploads/2022/04/screenshot_20220429_200235.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Install Active Directory Using PowerShell" decoding="async" loading="lazy" srcset="https://www.technig.com/wp-content/uploads/2022/04/screenshot_20220429_200235.png 1036w, https://www.technig.com/wp-content/uploads/2022/04/screenshot_20220429_200235-300x167.png 300w, https://www.technig.com/wp-content/uploads/2022/04/screenshot_20220429_200235-1024x570.png 1024w, https://www.technig.com/wp-content/uploads/2022/04/screenshot_20220429_200235-768x428.png 768w" sizes="(max-width: 1036px) 100vw, 1036px" /></div>
<p>Using PowerShell to install Active Directory Domain Services (AD-DS) on Windows Server 2022 helps you install it quickly. It is better to rename your server and assign a static IP address before installing the active directory.</p>



<h2 class="wp-block-heading">Assign Static IPv4 and Rename Server Using PowerShell</h2>



<p>It is important to assign a static IP address to a server computer because dynamic addresses change after some time and it can cause problems. Another important thing is to rename your server before installing the active directory. It will take a long process to rename your server after you install the active directory. Follow the steps below to assign an IPv4 and rename the server.</p>



<p><strong>1. </strong>Run PowerShell as administrator. If you are using GUI versions of Windows Server, press <strong>Win+R</strong> to open the <strong>Run</strong> and type <strong>PowerShell</strong> then hit <strong>Ctrl+Shift+Enter</strong>. If you are using the core version of Windows Server, type PowerShell in the command prompt and hit Enter. The <strong>PS</strong> sign will be added at the beginning of your command which means PowerShell is open. Then execute the command <code>Start-Process PowerShell -Verb Runas</code> to run PowerShell as administrator.</p>



<p><strong>2.</strong> Type the <code>Get-NetConnectioProfile</code> to find the <strong>InterfaceIndex</strong> number.</p>



<div class="wp-block-image"><figure class="alignleft size-full"><img decoding="async" width="976" height="391" src="https://technig.com/wp-content/uploads/2022/04/Get-Netconnection-Profile.png" alt="PowerShell command &quot;get-netconnectionprofile&quot;" class="wp-image-17822" srcset="https://www.technig.com/wp-content/uploads/2022/04/Get-Netconnection-Profile.png 976w, https://www.technig.com/wp-content/uploads/2022/04/Get-Netconnection-Profile-300x120.png 300w, https://www.technig.com/wp-content/uploads/2022/04/Get-Netconnection-Profile-768x308.png 768w" sizes="(max-width: 976px) 100vw, 976px" /><figcaption>Running the Get-NetConnectionProfile command in Windows PowerShell.</figcaption></figure></div>



<p><strong>3.</strong> InterfaceIndex number for every network adapter is different. When you got the proper InterfaceIndex type the command <code>New-NetIPAddress -InterfaceIndex 6 -IPAddress 192.168.0.2 -PrefixLength 24 -DefaultGateway 192.168.0.1</code> and press Enter key to assign an IPv4 address. This is the network setting for this lab, you should assign an Ip address according to your own network setting.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img decoding="async" width="1024" height="188" src="//i0.wp.com/technig.com/wp-content/uploads/2022/04/Set-Ip-address-through-PowerShell-1-1024x188.png" alt="" class="wp-image-17824" srcset="https://www.technig.com/wp-content/uploads/2022/04/Set-Ip-address-through-PowerShell-1-1024x188.png 1024w, https://www.technig.com/wp-content/uploads/2022/04/Set-Ip-address-through-PowerShell-1-300x55.png 300w, https://www.technig.com/wp-content/uploads/2022/04/Set-Ip-address-through-PowerShell-1-768x141.png 768w, https://www.technig.com/wp-content/uploads/2022/04/Set-Ip-address-through-PowerShell-1.png 1062w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure></div>



<p>Click to know more about <a href="https://technig.com/configure-ip-address-using-powershell/" target="_blank" rel="noreferrer noopener">How To Configure IP Address With PowerShell?</a></p>



<p><strong>4.</strong> Type the <code>Rename-Computer -NewName "SKO-DC01"</code> command. SKO-DC01 is the name that I assigned to my server, you can type any name instead of that. Your server will be renamed after you restart it.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="189" src="https://technig.com/wp-content/uploads/2022/04/Computer-Rename-PwerShell-1024x189.png" alt="Rename Windows Server 2022 with PowerShell." class="wp-image-17825" srcset="https://www.technig.com/wp-content/uploads/2022/04/Computer-Rename-PwerShell-1024x189.png 1024w, https://www.technig.com/wp-content/uploads/2022/04/Computer-Rename-PwerShell-300x56.png 300w, https://www.technig.com/wp-content/uploads/2022/04/Computer-Rename-PwerShell-768x142.png 768w, https://www.technig.com/wp-content/uploads/2022/04/Computer-Rename-PwerShell.png 1054w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Rename a server using Windows PowerShell.</figcaption></figure></div>



<p>Now that you have configured your Computer Name and IP address, you can install Active Directory on Windows Server 2022 Using PowerShell.</p>



<h2 class="wp-block-heading">Add AD-DS Role And Create a Domain Using PowerShell</h2>



<p>To create a domain controller on Windows Server 2022, you have to install AD-DS (Active Directory Domain Services) role and DNS Server role, it is faster using PowerShell instead of Server Manager. When you installed AD-DS and DNS Server properly, then you can create a domain controller. Follow the steps below to add the AD-DS role and create a domain in Windows Server 2022.</p>



<p><strong>1. </strong>Run PowerShell as administrator. Execute the <code>Get-windowsFeature</code> command in Windows PowerShell. Find the name of <strong>Active Directory Domain Services</strong> for PowerShell commands. In this Server it is <strong>AD-Domain-Services</strong> and it is available for installation.</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="969" height="511" src="https://technig.com/wp-content/uploads/2022/04/Get-WindowsFeature-command.png" alt="Windows Server 2022 Features" class="wp-image-17827" srcset="https://www.technig.com/wp-content/uploads/2022/04/Get-WindowsFeature-command.png 969w, https://www.technig.com/wp-content/uploads/2022/04/Get-WindowsFeature-command-300x158.png 300w, https://www.technig.com/wp-content/uploads/2022/04/Get-WindowsFeature-command-768x405.png 768w" sizes="(max-width: 969px) 100vw, 969px" /><figcaption>List of Windows Server 2022 features list in Windows PowerShell.</figcaption></figure></div>



<p><strong>2.</strong> Type <code>Install-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools</code> command and hit Enter key.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="187" src="https://technig.com/wp-content/uploads/2022/04/Install-Active-Directory-1024x187.png" alt="Install Active Directory with management tools." class="wp-image-17828" srcset="https://www.technig.com/wp-content/uploads/2022/04/Install-Active-Directory-1024x187.png 1024w, https://www.technig.com/wp-content/uploads/2022/04/Install-Active-Directory-300x55.png 300w, https://www.technig.com/wp-content/uploads/2022/04/Install-Active-Directory-768x140.png 768w, https://www.technig.com/wp-content/uploads/2022/04/Install-Active-Directory.png 1124w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Install Active Directory and its management tools.</figcaption></figure></div>



<p><strong>3.</strong> Once the installation is finished, you have to import <strong>ADDS Deployment module</strong> manually by executing the command <code>Import-Module ADDSDeployment</code>. If this is the first domain controller, you must add a new forest by executing the command <code>Install-ADDSForest</code>. Type the <strong>Domain Name </strong>and <strong>DSRM password</strong>. Your domain name should be in this format (a name .lab, .com, or .anything you want). When you see a message that your server will be restarted, type <strong>Y</strong> to restart your server.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="361" src="https://technig.com/wp-content/uploads/2022/04/Set-Domain-Name-and-DSRM-password-1024x361.png" alt="Install Active Directory Domain Services using PowerShell" class="wp-image-17829" srcset="https://www.technig.com/wp-content/uploads/2022/04/Set-Domain-Name-and-DSRM-password-1024x361.png 1024w, https://www.technig.com/wp-content/uploads/2022/04/Set-Domain-Name-and-DSRM-password-300x106.png 300w, https://www.technig.com/wp-content/uploads/2022/04/Set-Domain-Name-and-DSRM-password-768x271.png 768w, https://www.technig.com/wp-content/uploads/2022/04/Set-Domain-Name-and-DSRM-password.png 1223w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Set up a domain in Windows Server 2022 using PowerShell.</figcaption></figure></div>



<p>You might receive some warnings, but don&#8217;t worry the Active Directory Domain Services and DNS Server roles will install. When you receive an error that DNS Server is not installed properly, you can install DNS Server manually and then try again. Check this to know <a href="https://technig.com/install-dns-using-server-manager-and-powershell/" target="_blank" rel="noreferrer noopener">how to install DNS server using PowerShell</a>.</p>



<p>Check this article to know more about the <a href="https://social.technet.microsoft.com/wiki/contents/articles/52765.windows-server-2019-step-by-step-setup-active-directory-environment-using-powershell.aspx" target="_blank" rel="noreferrer noopener">Active Directory</a>.</p>
<p>The post <a href="https://www.technig.com/install-active-directory-on-windows-server-2022-using-powershell/">Install Active Directory On Windows Server 2022 Using PowerShell</a> appeared first on <a href="https://www.technig.com">TECHNIG</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.technig.com/install-active-directory-on-windows-server-2022-using-powershell/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">17821</post-id>	</item>
	</channel>
</rss>
