Skip to main content

Command Palette

Search for a command to run...

Creating & Connecting to a Windows Server on AWS & Setting Up Active Directory

Project Overview

This project demonstrates the process of launching a Windows Server EC2 instance on AWS, remotely connecting to it via Remote Desktop Protocol (RDP), and configuring Active Directory Domain Services (AD DS) on the cloud-hosted server. Active Directory (AD) is a directory service developed by Microsoft for Windows domain networks, used for authenticating and authorizing users and computers.

Objectives

  • Deploy a Windows Server EC2 instance on AWS

  • Connect securely using RDP

  • Install and configure Active Directory Domain Services (AD DS)

  • Promote the server to a Domain Controller

Tools and Technologies Used

Tool / ServicePurpose
AWS EC2Launch and manage the Windows Server instance
.pem fileUsed to decrypt the default administrator password
Remote Desktop (mstsc)To access the Windows Server GUI
Windows Server ManagerInstall roles and manage AD DS
Active Directory Domain Services (AD DS)Set up domain controller
PowerShell / Server ManagerAdminister and configure services

Step-by-Step Implementation

Step 1: Launch EC2 Instance (Windows Server)

  1. Log into the AWS Management Console

  2. Navigate to EC2 Dashboard > Instances > Launch Instance

  3. Choose an Amazon Machine Image (AMI) such as:

    • Microsoft Windows Server 2019 Base
  4. Choose t2.medium or t2.large (based on performance needs)

  5. Key Pair Settings:

    • Create a new key pair (.pem file) or use an existing one
  6. Configure Network Settings:

    • Ensure port 3389 (RDP) is open to your IP for security
  7. Click Launch Instance

    Step 2: Decrypt Administrator Password

    1. Wait until the instance state is running and the status checks are passed

    2. Go to Instances > Actions > Security > Get Windows Password

    3. Upload your .pem file to decrypt the password

    4. Copy the username (Administrator) and password

Step 3: Connect via Remote Desktop

  1. Open Remote Desktop Connection on your local system:

    • Run → mstsc
  2. Enter your Public IPv4 address from the EC2 dashboard

  3. Use the Administrator username and the decrypted password

  4. You are now connected to the Windows Server GUI

    Step 4: Install Active Directory Domain Services (AD DS)

    1. Launch Server Manager on the Windows Server

    2. Go to Manage > Add Roles and Features

    3. Choose the following:

      • Installation type: Role-based or feature-based

      • Server selection: Your current EC2 instance

      • Role: Check Active Directory Domain Services

    4. Follow through with defaults and click Install

    5. Wait for installation to complete (no reboot yet)

Step 5: Promote the Server to a Domain Controller

  1. In Server Manager, click Notifications flag > Promote this server to a domain controller

  2. Select Add a new forest, enter your root domain name (e.g., corp.example.com)

  3. Choose:

    • Domain Controller capabilities: DNS, GC (Global Catalog)

    • Set the Directory Services Restore Mode (DSRM) password

  4. Proceed with default options, review, and install

  5. Server will automatically reboot

Step 6: Post-Installation Configuration

  1. After reboot, reconnect via RDP

  2. Confirm the server is now a Domain Controller

    • Open Server Manager → Tools → Active Directory Users and Computers
  3. You can now:

    • Add Users and Groups

    • Join other Windows machines to this domain

    • Manage Group Policies

Security Considerations

  • Only open RDP (port 3389) to trusted IPs

  • Regularly update Windows Server

  • Enable CloudWatch monitoring and configure alarms

  • Create regular snapshots and backups

  • Consider implementing Multi-Factor Authentication (MFA) for RDP access

  • Use Security Groups and IAM roles appropriately

Testing & Validation

  • Test domain login with created AD users

  • Confirm DNS settings and replication (if deploying multiple domain controllers)

  • Validate remote management using RSAT (Remote Server Administration Tools)

Outcomes & Benefits

  • Successfully launched a secure, cloud-based Windows Server

  • Configured Active Directory in the cloud

  • Enabled scalable and centralized identity and access management

  • Demonstrated use of cloud infrastructure for enterprise-grade services

Further Enhancements

  • Add additional domain controllers for high availability

  • Set up Active Directory Federation Services (ADFS)

  • Integrate with Azure AD or Hybrid Identity Solutions

  • Implement Group Policy Objects (GPOs) to automate configurations

Conclusion

This project provides a foundational walkthrough for deploying Windows Server infrastructure in the cloud, with Active Directory set up for identity services. By leveraging AWS EC2 and standard Microsoft tools, we can create scalable and secure domain environments suitable for both test labs and enterprise networks.