Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this guide, you will use Azure Policy to configure a machine with LAPS for Azure Arc settings. Note that applying LAPS settings changes local administrator password management behavior, including password backup and rotation. This guide has you create a disposable resource group with a disposable VM to limit the scope of application. Specifically, you will:
- Create an empty resource group
- Import a policy definition and assign it to the resource group
- Create a Windows Server VM in the resource group and observe the results
Preview considerations
- This LAPS for Azure Arc implementation is a preview, and should be used in test environments.
- The policy definition is not built-in to Azure at this time. It must be imported.
- For feedback channels, see the Related resources section at the end of this article.
Prerequisites
Before attempting the steps in this article, ensure that you already have:
- An Azure account where you have access to create a resource group, policy assignments, and a virtual machine.
- If you don't have an Azure account, you can create a free trial.
- Your preferred environment for interacting with Azure, such as:
- [Recommended] Use Azure Cloud Shell (at https://shell.azure.com or your local equivalent)
- OR Use your own machine and shell environment with Azure CLI installed and signed in
- OR Use the Azure portal (at https://portal.azure.com or your local equivalent)
Check that you are signed in to your test environment
- Use the account information in the portal to see your current context.
Step 1: Create a resource group
Tip
The use of "East US" (eastus) as an example location throughout this article is arbitrary. You can choose any available Azure location.
- From the Azure portal, browse to Resource groups
- Select + Create
- Choose a name and region, such as "my-laps-demo-rg" and "East US"
- Proceed to Review + create
Step 2: Import the LAPS policy definition
The preview policy definition is not built-in to Azure at this time. The following steps illustrate importing it as a custom policy definition.
- Download the LAPS policy definition JSON to your computer, and open it in your preferred text editor. In a later step, you will copy and paste the contents of this file.
- In the Azure portal search bar, type Policy and select Policy from the Services results.
- From the Azure Policy overview, navigate to Authoring > Definitions.
- Select + Policy definition, and fill in the resulting form as follows:
- Definition location: <choose your test Azure subscription>
- Name: Configure LAPS for Azure Arc (powered by OSConfig)
- Category: Use existing > Guest configuration
- Policy rule: Delete the prefilled content, then paste in the JSON from the file in step 1
Step 3: Assign the policy to your test resource group
- From the Policy definition page, select Assign policy
- Basics tab:
- Scope: Select your test resource group (for example, my-laps-demo-rg)
- Take care not to select the entire subscription or the wrong resource group
- Policy definition: Configure LAPS for Azure Arc (powered by OSConfig)
- Assignment name: Configure LAPS for Azure Arc (powered by OSConfig)
- Scope: Select your test resource group (for example, my-laps-demo-rg)
- Parameters tab:
- Review the available LAPS parameters (password length, backup directory, etc.). The defaults align with Microsoft security best practices.
- If you are testing with an Arc-enabled machine as opposed to an Azure VM, be sure to change "Include Arc connected servers" to true.
- Remediation tab:
- Choose the option to create a managed identity, and choose "system managed"
- Review + create tab:
- Select Create
Step 4: Create a test Windows Server VM
Tip
LAPS for Azure Arc requires Windows Server 2025 or Windows Server 2022 (23H2 and later). This example uses Windows Server 2025. For information on compatible versions, see What is LAPS for Azure Arc?.
- Create a Windows Server virtual machine with the following choices:
- Virtual machine name: my-laps-demo-vm-01
- Resource group: The resource group created earlier, e.g., my-laps-demo-rg
- Image: Windows Server 2025 Datacenter - x64 Gen2
- VM size: Your choice, but note that smaller B-series VM sizes such as Standard_B2s can be a cost-effective option for testing
- Administrator account: Set a username and password (you will use this to RDP into the VM)
- After VM creation, update the VM to work with Machine Configuration:
- Add a system assigned identity, if not already present
- Add the Machine Configuration extension (labeled in portal as Azure Automanage Machine Configuration)
Tip
The managed identity and Machine Configuration extension steps were performed manually in this guide to provide a linear experience. At scale, these can be satisfied using the Deploy prerequisites to enable Guest Configuration policies on virtual machines built-in policy initiative.
Important
Take a break before proceeding
Several steps will now happen automatically. Each of these steps can take a few minutes. Accordingly, please wait at least 15 minutes before proceeding.
Step 5: Observe results
- Navigate to the Azure Policy overview page
- Click "Compliance" in the left navigation
- Click on the policy assignment you created, e.g., Configure LAPS for Azure Arc (powered by OSConfig)
- Review:
- Count of machines by compliance state
- List of machines with compliance state for each
- To see per-setting details:
- In the list of machines (shown under Resource compliance) select the name of your test machine
- Click on View resource to go to the machine overview page
- In the left navigation, find and select Configuration management
- In the list of configurations, select the LAPS configuration
- Use the filter drop-down to Select all to see both compliant and non-compliant settings
Step 6: Verify LAPS locally on the test VM
Connect to your VM via RDP or Azure Bastion
Open an elevated PowerShell window and run:
Invoke-LapsPolicyProcessing Reset-LapsPassword -VerboseOpen Event Viewer and navigate to Applications and Services Logs > Microsoft-Windows-LAPS
Verify that events indicate successful LAPS configuration and password management
For more details on local verification (including Arc-connected machines), see Verifying LAPS configuration locally.
Clean up resources
To avoid ongoing charges, consider deleting the resource group used in this article. For example, the Azure CLI command would be az group delete --name "my-laps-demo-rg".
Related content
- What is LAPS for Azure Arc? — Overview, settings reference, and supported operating systems
- For support with problems, contact Microsoft Support
- To provide feedback or discuss feature requests, contact: linux_sec_config_mgmt@service.microsoft.com