{"id":202,"date":"2025-10-05T16:08:01","date_gmt":"2025-10-05T16:08:01","guid":{"rendered":"https:\/\/carlostech.com\/?p=202"},"modified":"2025-11-03T23:14:47","modified_gmt":"2025-11-03T23:14:47","slug":"active-directory-implementation-using-azure","status":"publish","type":"post","link":"https:\/\/carlostech.com\/?p=202","title":{"rendered":"Active Directory Lab 1 &#8211; Azure"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Project Summary<\/h2>\n\n\n\n<p>This project demonstrates the deployment and configuration of Active Directory Domain Services within Microsoft Azure&#8217;s cloud infrastructure. This will provide the foundation for detailed and complicated AD scenarios in the future.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<h3 class=\"wp-block-heading\">Infrastructure Architecture<\/h3>\n<\/blockquote>\n\n\n\n<p><strong>Primary Domain Controller (Azure VM)<\/strong><\/p>\n\n\n\n<p>Using Azure&#8217;s GUI we configured our DC as: <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Operating System:<\/strong> Windows Server 2019 Datacenter.<\/li>\n\n\n\n<li><strong>Azure Region:<\/strong> East US (selected for optimal latency and cost-efficiency).<\/li>\n\n\n\n<li><strong>Security Tier:<\/strong> Standard (lab environment; production would require premium security features)<\/li>\n\n\n\n<li><strong>Redundancy:<\/strong> Single instance (lab configuration; a production environment requires multi-zone redundancy or even regional &#8211; as you should never have a single point of failure in your critical infrastructure).<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"836\" src=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-68-1024x836.png\" alt=\"\" class=\"wp-image-206\" srcset=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-68-1024x836.png 1024w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-68-300x245.png 300w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-68-768x627.png 768w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-68-1140x930.png 1140w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-68.png 1147w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>As this server is located within an Azure datacenter and not on-premises, we have to remote in. The two main ways to accomplish this: SSH (port 22) which only provides secure CLI access or RDP (port 3389) which provides a graphical user interface &#8211; Azure recommends using RDP.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1520\" height=\"818\" src=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-70.png\" alt=\"\" class=\"wp-image-212\" srcset=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-70.png 1520w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-70-300x161.png 300w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-70-1024x551.png 1024w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-70-768x413.png 768w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-70-1140x614.png 1140w\" sizes=\"auto, (max-width: 1520px) 100vw, 1520px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>We have two machines in this project: the server hosting our AD services and our client management workstation that has RSAT installed to remotely manage AD (which is best practice, as explained later).<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"865\" src=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-69-1024x865.png\" alt=\"\" class=\"wp-image-207\" srcset=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-69-1024x865.png 1024w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-69-300x253.png 300w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-69-768x648.png 768w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-69.png 1118w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Since these are two different machines, we must ensure that they are in the same network\/LAN or else they would not be able to talk to each other. Of course, if you use a router\/gateway, then they would be able to speak to each other if they are in different subnets \u2013 but that&#8217;s for our Network Projects. <\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<h3 class=\"wp-block-heading\">Network Architecture<\/h3>\n<\/blockquote>\n\n\n\n<p><strong>Virtual Network Configuration:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Address Space:<\/strong> 10.0.0.0\/24 (private IPs).<\/li>\n\n\n\n<li><strong>Subnet Mask:<\/strong> \/24 (255.255.255.0) (IPv4 addresses are 32 bits in total, 24 are being used for the network, 8 are being used for the host bits).<\/li>\n\n\n\n<li><strong>Available Host Addresses:<\/strong> 254 usable addresses (256 total minus network and broadcast addresses).<\/li>\n\n\n\n<li><strong>IP Address Allocation:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Domain Controller: 10.0.0.4 (provided by Azure DHCP).<\/li>\n\n\n\n<li>Client Workstation: 10.0.0.5 (provided by Azure DHCP).<\/li>\n\n\n\n<li>A public IP for each machine that has been blurred (this is what hosts outside our network identify us as &#8211; more on this in a Network Project). <\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Gateway Configuration:<\/strong> Azure-managed default gateway.<\/li>\n\n\n\n<li><strong>DHCP Services:<\/strong> Azure-provided (production environments typically use a dedicated server providing the DHCP role)<\/li>\n<\/ul>\n\n\n\n<p><strong>Network Security Considerations:<\/strong> Azure Virtual Network provides Layer 3 isolation by default. In production environments, Network Security Groups (NSGs) would be configured to restrict traffic flow between subnets.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Active Directory Implementation<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">Domain Configuration<\/h3>\n\n\n\n<p><strong>Domain Specifications:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Forest Functional Level:<\/strong> Windows Server 2016 (this is the minimum server version required, can be updated in the future &#8211; should have the server running the version(s) still receiving updates for maximum security.<\/li>\n\n\n\n<li><strong>Domain Name:<\/strong> carlostech.local <\/li>\n\n\n\n<li><strong>NetBIOS Name:<\/strong> CARLOSTECH (for legacy systems)<\/li>\n\n\n\n<li><strong>DNS Integration:<\/strong> Integrated DNS zones for lookups (allows for auto replication to all domain controllers and multiple DCs can update DNS records).<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"989\" height=\"693\" src=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-71.png\" alt=\"\" class=\"wp-image-213\" srcset=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-71.png 989w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-71-300x210.png 300w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-71-768x538.png 768w\" sizes=\"auto, (max-width: 989px) 100vw, 989px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Using the Server Manager application, we are adding the AD role to our server, making it a Domain Controller.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"918\" height=\"520\" src=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-72.png\" alt=\"\" class=\"wp-image-214\" srcset=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-72.png 918w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-72-300x170.png 300w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-72-768x435.png 768w\" sizes=\"auto, (max-width: 918px) 100vw, 918px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"579\" src=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-73-1024x579.png\" alt=\"\" class=\"wp-image-216\" srcset=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-73-1024x579.png 1024w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-73-300x170.png 300w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-73-768x434.png 768w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-73.png 1075w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Domain Controllers are the authoritative servers for AD. The changes you make here replicate to other domain controllers where clients\/hosts receive these updates through authentication and Group Policy.  It\u2019s therefore vital to have redundant DC\u2019s for fault tolerance. Note that in this project, we did not utilize redundancy because it is an isolated lab. However, Azure AD Domain Services automatically provides you with two DCs when you utilize their managed services. The domain we configured was \u201ccarlostech.local\u201d, which means this is the domain I want all the users, computers and servers to join to. We are using .local in the domain because this is a local project that will not propagate to the Internet.\n<ul class=\"wp-block-list\">\n<li>We created a new forest because we are starting from scratch.<\/li>\n\n\n\n<li>AD domains need a forest as they cannot exist outside of one and a forest does not exist without domains either. <\/li>\n\n\n\n<li>AD automatically names the forest after the &#8220;root domain&#8221; we configured when you first configure it. <\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Typically, you do NOT use .local, you would use carlostech.com and create subdomains such as local.carlostech.com, mail.carlostech.com, etc. because:\n<ul class=\"wp-block-list\">\n<li>You could have technical conflicts with various technologies.<\/li>\n\n\n\n<li>If you ever wanted to expand into the cloud, you could have integration issues.<\/li>\n\n\n\n<li>You will not be able to get a public SSL certificate.<\/li>\n\n\n\n<li>It lacks professional appearance and does not follow standardized naming for internet domains.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>The Domain Controller was configured with multiple roles such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Active Directory Domain Services (AD DS):<\/strong> Core directory services (hosting the AD database).<\/li>\n\n\n\n<li><strong>DNS Server Role:<\/strong> Provides name resolution for domain resources.<\/li>\n\n\n\n<li><strong>File and Storage Services:<\/strong> Enables file sharing and storage management.<\/li>\n<\/ul>\n\n\n\n<p><strong><em>Note<\/em>:<\/strong> In production environments, role separation would typically be implemented across multiple servers for security and performance optimization.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Remote Administration Configuration<\/h3>\n\n\n\n<p>Remote Server Administration Tools were deployed on the Windows 10 client workstation to demonstrate secure remote management principles:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"811\" height=\"456\" src=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-74.png\" alt=\"\" class=\"wp-image-219\" srcset=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-74.png 811w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-74-300x169.png 300w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-74-768x432.png 768w\" sizes=\"auto, (max-width: 811px) 100vw, 811px\" \/><\/figure>\n\n\n\n<p><strong>Security Benefits:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Minimizes direct access to domain controllers<\/li>\n\n\n\n<li>Reduces attack surface on critical infrastructure<\/li>\n\n\n\n<li>Implements principle of least privilege access<\/li>\n\n\n\n<li>Enables centralized administration from dedicated management workstations<\/li>\n<\/ul>\n\n\n\n<p><strong>Tools Enabled:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Active Directory Users and Computers (ADUC)<\/li>\n\n\n\n<li>Group Policy Management Console (GPMC)<\/li>\n\n\n\n<li>Active Directory Sites and Services<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"975\" height=\"548\" src=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-75.png\" alt=\"\" class=\"wp-image-220\" srcset=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-75.png 975w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-75-300x169.png 300w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-75-768x432.png 768w\" sizes=\"auto, (max-width: 975px) 100vw, 975px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>We need to synchronize system time across all domain members to ensure proper Kerberos authentication and accurate logging which prevents authentication failures and maintains accurate audit trails.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>So, we have our RSAT installed and our time is synced between the server and our PC. Now, we have to see if both devices are able to communicate. Using the command prompts in our PC and server, we can use the command <strong>&#8220;ipconfig&#8221; <\/strong>command<strong> <\/strong>to see our IP address configurations.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"773\" height=\"435\" src=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-76.png\" alt=\"\" class=\"wp-image-223\" srcset=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-76.png 773w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-76-300x169.png 300w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-76-768x432.png 768w\" sizes=\"auto, (max-width: 773px) 100vw, 773px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This is the output for the client workstation, which was identical with the output for our server except the server&#8217;s IP address was 10.0.0.4. That is the confirmation that we are in the same subnet and have the same gateway.<\/li>\n<\/ul>\n\n\n\n<p><strong><em>Sidenote:<\/em><\/strong> Azure did all the networking by default. But typically in a real network, you would have a DHCP server (utilizing ports 67 and 68), that hand out IP addresses to hosts who ask for one using&nbsp;the DORA process unless you manually configure static IP addresses which you typically only configure on servers and vital infrastructure.<\/p>\n\n\n\n<p>Since we\u2019re on the same subnet, let\u2019s see if our PC can ping the domain carlostech.local<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"784\" height=\"441\" src=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-77.png\" alt=\"\" class=\"wp-image-227\" srcset=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-77.png 784w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-77-300x169.png 300w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-77-768x432.png 768w\" sizes=\"auto, (max-width: 784px) 100vw, 784px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This failed because even though we\u2019re on the same network, I am pinging a domain name and not an actual IP address when we haven&#8217;t configured the workstation to point to a DNS server for DNS queries (typically a DHCP server tells your workstation what DNS server to send queries to).\n<ul class=\"wp-block-list\">\n<li>Humans prefer typing in google.com because it&#8217;s much easier to remember that than the actual IP address. However, network devices only use IP addresses for the actual routing process so DNS (port 53), automatically translates human-readable text to the configured IP address that allows the network to actually speak to each other.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>To fix this, go to Control Panel&nbsp; -&gt; Network and Internet -&gt; Change Adapter Settings -&gt; IPv4 -&gt; and manually add the DNS server. Here, we added our main server\u2019s IP because not only did we add Active Directory services to it, but also DNS and File Shares. Our backup DNS servers will be Google\u2019s at 8.8.8.8.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"725\" height=\"408\" src=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-78.png\" alt=\"\" class=\"wp-image-228\" srcset=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-78.png 725w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-78-300x169.png 300w\" sizes=\"auto, (max-width: 725px) 100vw, 725px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">User Account Management<\/h3>\n\n\n\n<p>To initiate this process, we have to join our PC into the domain we configured. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"722\" height=\"406\" src=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-79.png\" alt=\"\" class=\"wp-image-230\" srcset=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-79.png 722w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-79-300x169.png 300w\" sizes=\"auto, (max-width: 722px) 100vw, 722px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>On the workstation&#8217;s settings, go to &#8220;<strong>Rename this pc (advanced)<\/strong>&#8221; where you can configure the name of this workstation to align with your enterprise&#8217;s naming standard and\/or policy. But the most important part here is to configure the &#8220;<strong>member of: domain<\/strong>&#8221; setting to <strong>carlostech.local.<\/strong><\/li>\n<\/ul>\n\n\n\n<p><strong><em>Note: <\/em><\/strong>This is not the primary method to join a machine into the desired domain. In enterprises, there are various methods: <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Windows Deployment Services which is an automated imaging process.<\/li>\n\n\n\n<li>Microsoft Deployment Toolkit which utilizes task sequences and answer files.<\/li>\n\n\n\n<li>System Center Configuration Manager.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Administrative Account Structure<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Domain Administrator Account:<\/strong> The initial server administrator account (which we created called &#8216;helpdesk&#8217;) was automatically elevated to the &#8216;Domain Admins group&#8217; during Active Directory promotion, providing administrator privileges across all domain-joined systems. This signifies that this account now has local administrator rights on every machine within the &#8216;carlostech.local&#8217; domain, demonstrating the security significance of the Domain Admin group membership.\n<ul class=\"wp-block-list\">\n<li>If an enterprise has several domains under a forest, you could have &#8216;Enterprise Admins&#8217; which have full control across all domains within the forest!<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Logging into my Windows10 PC as an admin, I would use the username: &#8216;<strong>carlostech.local\\helpdesk&#8217;<\/strong>. The reason why I have to include the domain carlostech.local\\ is because I want the virtual machine to authenticate against a domain account and not a local account (which I did create when I first initialized the VM). Without the domain, Windows will assume I am trying to log in with a local account instead and it will fail.<\/li>\n<\/ul>\n\n\n\n<p>With the RSAT downloaded, I can configure the AD server remotely which is proper security posture.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"975\" height=\"548\" src=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-80.png\" alt=\"\" class=\"wp-image-231\" srcset=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-80.png 975w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-80-300x169.png 300w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-80-768x432.png 768w\" sizes=\"auto, (max-width: 975px) 100vw, 975px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click on Group Policy Management. Here, I can set specific policies and rules that can be pushed out to hundreds and thousands of individual objects (computers and\/or users) to enforce security, compliance and enterprise operational standards.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"792\" height=\"446\" src=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-84.png\" alt=\"\" class=\"wp-image-235\" srcset=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-84.png 792w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-84-300x169.png 300w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-84-768x432.png 768w\" sizes=\"auto, (max-width: 792px) 100vw, 792px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In Active Directory Users and Computers, you can right click the empty space and click new user or click the new user button located at the top menu, and manually put in the details as well as give them a password. Then, just right click their user and enable them.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">PowerShell User Provisioning<\/h3>\n\n\n\n<p>You can significantly reduce the time and effort it takes to provision users and even other forms of objects by automating with PowerShell.<\/p>\n\n\n\n<p><strong>Automation Benefits:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Consistent user account creation process<\/li>\n\n\n\n<li>Scalable approach for bulk user provisioning<\/li>\n\n\n\n<li>Reduced manual configuration errors<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"794\" height=\"446\" src=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-85.png\" alt=\"\" class=\"wp-image-242\" srcset=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-85.png 794w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-85-300x169.png 300w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-85-768x431.png 768w\" sizes=\"auto, (max-width: 794px) 100vw, 794px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>PowerShell has a certain syntax that you need to follow. Using the \u2018<strong>get-command\u2019<\/strong>, I can see all the available commands at my disposal and begin from there. Just like Python (a programming language), you would have to import certain modules to get access to commands that aren\u2019t already there. Scrolling down, we see commands for Active Directory already there \u2013 so no need to import the module.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"780\" height=\"439\" src=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-82.png\" alt=\"\" class=\"wp-image-233\" srcset=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-82.png 780w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-82-300x169.png 300w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-82-768x432.png 768w\" sizes=\"auto, (max-width: 780px) 100vw, 780px\" \/><\/figure>\n\n\n\n<p>In our simple script, we are giving every new user the same secure password that they MUST change the moment they log on.<\/p>\n\n\n\n<p>Let&#8217;s dissect this script: <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>I am defining a secure password value: (<strong>$Password)<\/strong> where the system will ask you to type it in, shown by the &#8220;<strong>Read-Host &#8220;Enter password&#8221;<\/strong> commands. The command &#8220;<strong>-AsSecureString&#8221;<\/strong> enforces the password to not be shown in plaintext. \n<ul class=\"wp-block-list\">\n<li>This security measure prevents credentials from being exposed if logs or configuration files are somehow compromised by a malicious actor.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Now, we only have to reference <strong>$Password <\/strong>in future lines. With the <strong>&#8220;New-ADUser -Name &#8220;Peter&#8221; -AccountPassword $Password&#8221;<\/strong> commands, we created the user Peter with the password we just defined.<\/li>\n\n\n\n<li>Lastly, we enabled the account with <strong>-Enabled $true<\/strong> and are forcing Peter to change the password the moment he tries to log on with the <strong>-ChangePasswordAtLogon $true<\/strong> command.\n<ul class=\"wp-block-list\">\n<li>In a future Active Directory project, I will create a Group Policy Object that enforces Peter to create a secure password that aligns with our enterprise&#8217;s security policies.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>To have improved security, create a vault that contains a similar, more concise script that can pull a different, secure password from a pool each time the script is run &#8211; removing the vulnerability of reusing the same password for each user creation.  <\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"664\" height=\"373\" src=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-83.png\" alt=\"\" class=\"wp-image-234\" style=\"width:761px;height:auto\" srcset=\"https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-83.png 664w, https:\/\/carlostech.com\/wp-content\/uploads\/2025\/09\/image-83-300x169.png 300w\" sizes=\"auto, (max-width: 664px) 100vw, 664px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>As you can see, the user Peter was created. Their account is enabled, has the password we securely configured, and whenever they log on, they will be prompted to change their password.<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-16018d1d wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/carlostech.com\/?page_id=1276\">Back to Projects<\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Using Active Directory with Microsoft Azure machines. Showcasing the landscape of Azure, initial installment of Active Directory, and some Powershell automation.  &hellip; <\/p>\n<p><a href=\"https:\/\/carlostech.com\/?p=202\" class=\"awp-btn awp-btn-secondary awp-btn-bubble\"><span class=\"screen-reader-text\">Active Directory Lab 1 &#8211; Azure<\/span><i class=\"fa fa-arrow-right\"><\/i><span class=\"bubble_effect\"><span class=\"circle top-left\"><\/span><span class=\"circle top-left\"><\/span><span class=\"circle top-left\"><\/span><span class=\"button effect-button\"><\/span><span class=\"circle bottom-right\"><\/span><span class=\"circle bottom-right\"><\/span><span class=\"circle bottom-right\"><\/span><\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":242,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[2,3],"class_list":["post-202","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-active-directory","tag-active-directory","tag-powershell"],"_links":{"self":[{"href":"https:\/\/carlostech.com\/index.php?rest_route=\/wp\/v2\/posts\/202","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/carlostech.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/carlostech.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/carlostech.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/carlostech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=202"}],"version-history":[{"count":100,"href":"https:\/\/carlostech.com\/index.php?rest_route=\/wp\/v2\/posts\/202\/revisions"}],"predecessor-version":[{"id":1444,"href":"https:\/\/carlostech.com\/index.php?rest_route=\/wp\/v2\/posts\/202\/revisions\/1444"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/carlostech.com\/index.php?rest_route=\/wp\/v2\/media\/242"}],"wp:attachment":[{"href":"https:\/\/carlostech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/carlostech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=202"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/carlostech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}