Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
Azure Connected Machine Agent (also known as Azure Arc) allows you to manage non-Azure machines (such as on-premises or other cloud providers) using Azure's management tools. This is highly beneficial for organizations that have a hybrid environment and want to leverage Azure's management capabilities across all their infrastructure. While Azure Arc is not exclusive to Windows, it is fully compatible with Windows environments. This article will guide you through the process of setting up and managing Azure Connected Machines on a Windows system.
Examples:
1. Prerequisites:
2. Installing the Azure Connected Machine Agent:
Open PowerShell as an Administrator and execute the following commands:
# Download the installation script
Invoke-WebRequest -Uri https://aka.ms/AzureConnectedMachineAgent -OutFile InstallArcAgent.ps1
# Run the installation script
.\InstallArcAgent.ps1
3. Connecting the Machine to Azure:
After the agent is installed, you need to connect your machine to Azure. Use the following PowerShell commands:
# Sign in to your Azure account
Connect-AzAccount
# Register the machine with Azure Arc
$resourceGroupName = "YourResourceGroupName"
$arcMachineName = "YourMachineName"
$location = "YourAzureRegion"
New-AzConnectedMachine -ResourceGroupName $resourceGroupName -Name $arcMachineName -Location $location
4. Verifying the Connection:
You can verify that your machine is connected to Azure by checking the Azure portal:
5. Managing the Connected Machine:
Once connected, you can manage your Windows machine using Azure services such as Azure Policy, Azure Monitor, and more. For example, to apply a policy:
# Assign a built-in policy definition
$policyDefinition = Get-AzPolicyDefinition | Where-Object { $_.Properties.DisplayName -eq "Audit Windows VMs that do not have the specified Windows Event Log enabled" }
$scope = "/subscriptions/YourSubscriptionID/resourceGroups/$resourceGroupName/providers/Microsoft.HybridCompute/machines/$arcMachineName"
New-AzPolicyAssignment -Name "AuditWindowsEventLog" -PolicyDefinition $policyDefinition -Scope $scope