There are various ways to connect the Windows Server machines to Azure. You can use the Windows Admin Center, Microsoft PowerShell, and Azure Arc Setup to do the same. In this tutorial, we will explain how you can onboard or connect Windows Server systems to Azure using some easy-to-follow steps.
How to connect Windows Server to Azure
To connect Windows Server machines to Azure, follow any of these methods.
- Using Azure Arc
- Using Windows Admin Center
- Using Microsoft PowerShell
Let us talk about them in detail.
1] Using Azure Arc
You can directly onboard Windows Server machines to Azure Arc using a built-in utility. The wizard automates onboarding, checks prerequisites, and fetches and installs the latest AzCM agent. After completion, you can manage your Windows Server machine in the Azure portal like any other Azure Arc-enabled resource.
If you are using a Windows Server 2022, you will get Azure Arc Setup as an optional component, whereas, for Server 2025 and later, it is a Features on Demand.
Before we go ahead and install Azure Arc, check the following prerequisites.
- Head to learn.microsoft.com and make sure your server is meeting all the requirements.
- Create an Azure account, skip, if you already have one.
- Update the browser that you will be using to its latest version.
After going through these requirements, let us start with the installation process.
The Azure Arc feature is enabled by default on your computer, so we can launch it and start working on it. Go ahead and follow the steps mentioned below to onboard Windows Server machines to Azure.
- Launch Azure Arc Setup from the System tray or from the Start Search menu.
- Click on Next when the Get started page pops up.
- As mentioned earlier, the setup utility will go through all the prerequisites needed for the process. Then you can click on Configure.
- Then, click on Next once the configuration window details appear.
- Sign-in to Azure by selecting the applicable Azure cloud, and then selecting Sign in to Azure. You’ll be asked to provide your sign-in credentials.
- You now have to give the Resource details when asked including the Subscription and Resource group. Once done, click on Next.
- Once done, click on Finish.
- Finally, get inside the Server Manager > Local Server to check the Azure Arc Management field. The machine should say Enabled.
This is how you can configure Azure using Azure Arc.
2] Using Windows Admin Center
We can use the Windows Admin Center to deploy the Connected Machine agent and register your on-premises servers without executing any steps outside of this tool.
It is probably the easiest of the methods as you can get all your deployment needs from a single stop. However, before that go to learn.microsoft.com to prepare your environment.
- First, access your Windows Admin Center and log into your account.
- From the Overview window, select the server you want to configure.
- You then have to navigate to Azure hybrid services > Discover Azure services.
- Now, go to Leverage Azure policies and solution solutions to manage your servers with Azure Arc and click on Set up.
- You will be redirected to Settings\Azure Arc for servers window where you need to click on Get started.
- Once you see the Connect server to Azure window, select Azure subscription, in the Resource group menu, either create a new group or select an existing one from the drop-down list.
- Then, select Azure region where you want to store the metadata of the server from the Region list.
- When connecting through a proxy server, choose the “Use proxy server” option. Provide the proxy server’s IP address or name, and the port number for communication.
- Finally, click on Set up to start the configuration.
The Windows server will connect to Azure, download the Connected Machine agent, install it, and register with Azure Arc-enabled servers. To check the progress, click on Notifications in the menu. After installing the Connected Machine Agent, go to the level panel, select the Events, and check the MsiInstaller events in the Application Event Log.
Read: How to configure DFS in Windows Server?
3] Using Microsoft PowerShell
If you have Microsoft PowerShell installed and configured, you can use it to configure Azure.
To make this happen, you first need to install the Azure management module using PowerShell. To do so, open PowerShell as an admin and run the following command.
Install-Module -Name Az.ConnectedMachine
After installing the module, follow the below instructions.
Run the command – Connect-AzAccount and then sign into your account.
To set up the Connected Machine agent on the target machine, which should be able to communicate directly with Azure, just run the following command.
Connect-AzConnectedMachine -ResourceGroupName myResourceGroup -Name myMachineName -Location <region>
If you want to install a Connected Machine agent on the target machine which can talk via a proxy server, we need to run the following command.
Connect-AzConnectedMachine -ResourceGroupName myResourceGroup -Name myMachineName -Location <region> -Proxy http://<proxyURL>:<proxyport>
Note: Replace all the variables in the command before executing it. Also, go to %ProgramData%\AzureConnectedMachineAgent\Log\himds.log to check the logs in case of failure.
Now, to connect to the remote server machine to Azure using PowerShell, run one of the below commands.
- On Machines that can directly communicate with Azure.
$sessions = New-PSSession -ComputerName myMachineName Connect-AzConnectedMachine -ResourceGroupName myResourceGroup -Location <region> -PSSession $sessions
- On multiple remote machines at the same time; add a list of remote machine names, each separated by a comma
$sessions = New-PSSession -ComputerName myMachineName1, myMachineName2, myMachineName3 Connect-AzConnectedMachine -ResourceGroupName myResourceGroup -Location <region> -PSSession $sessions
If your output says “Successfully Onboarded”, you are all set.
Hopefully, you can configure and onboard Windows Server machines to Azure using the guides mentioned earlier.
Read: How to install JSON-server on Windows computer?
How do I connect my Windows Server to Azure?
There are various ways to connect your server to Azure. If you are a client, you can use an admin to onboard you. They will just add you to a resource group or run a script on your computer to connect it to Azure. If you are an admin, you can use PowerShell, Windows Admin Center, or Azure Arc to get started with Azure. Check out the guides above.
Read: Best Windows Server 2022 Tutorial and Tips
Can you run Windows Server on Azure?
Depending on your Windows Server edition, you can use your licenses to operate Windows Server VMs on Azure more affordably. Azure will cover the OS cost for up to two VMs per license, while you are responsible for paying only the base compute VM costs.