Task 03: Security Groups Applied to Nodes
DOCUMENT CATEGORY: Implementation Runbook
SCOPE: Azure Local post-deployment node configuration
PURPOSE: Add domain security groups to local Administrators and Remote Management Users on every cluster node to enforce least-privilege RBAC MASTER REFERENCE: Active Directory Security Groups
Status: Active
Add domain Active Directory security groups to the local Administrators and Remote Management Users groups on each cluster node. This enforces least-privilege access so domain identities inherit consistent cluster permissions without using shared local accounts.
This task is optional but strongly recommended for production environments. Without it, cluster node access relies on individual local accounts or Domain Admins only — neither of which provides the scoped, auditable access model required for production operations.
Security Group Requirements
The following groups must exist in Active Directory before running this task (created in Phase 01 Task 02). Groups are the entries of identity.active_directory.security_groups[] in infrastructure.yml. Each entry's local_groups lists the local groups of every node it goes into. An entry with no local_groups is not applied to the nodes. For example:
Example name | local_groups on every node | Purpose |
|---|---|---|
sg-iic-azl-01-admins | Administrators | Full admin access to cluster nodes |
sg-iic-azl-01-operations | Remote Management Users, Remote Desktop Users | PowerShell remoting and RDP; no full admin |
sg-iic-azl-01-readonly | Remote Desktop Users, Performance Monitor Users, Event Log Readers | View only; cannot change configuration |
sg-iic-azl-01-hyperv-admins | Hyper-V Administrators, Remote Management Users | VM management through PowerShell remoting |
sg-iic-azl-01-storage-admins | Administrators | CSV and Storage Spaces Direct management |
The script handles the "already a member" condition gracefully — re-running on a node where groups are already applied is safe and will not produce errors.
Values from infrastructure.yml
The values for this task come from infrastructure.yml (schema 5). Every key, with its type, default and example, is in the variables reference.
Execution Options
- Local Users and Groups
- Orchestrated Script
Local Users and Groups (lusrmgr.msc)
When to use: Single node verification, confirming group membership, or manual remediation on one node
Prerequisites
- RDP or console access to each cluster node
- Domain credentials with local admin rights
Procedure
Repeat the following steps on every cluster node:
-
Connect to the node via RDP or console
-
Open Local Users and Groups:
- Press
Win + R, typelusrmgr.msc, press Enter - Navigate to Groups
- For each group that has
local_groups, add the AD group to the corresponding local group:
AD Group (identity.active_directory.security_groups[].name) | Local Group (local_groups) |
|---|---|
sg-iic-azl-01-admins | Administrators |
sg-iic-azl-01-operations | Remote Management Users, Remote Desktop Users |
sg-iic-azl-01-readonly | Remote Desktop Users, Performance Monitor Users, Event Log Readers |
sg-iic-azl-01-hyperv-admins | Hyper-V Administrators, Remote Management Users |
sg-iic-azl-01-storage-admins | Administrators |
For each entry: double-click the local group → Add... → enter <domain-netbios>\<AD group name> → Check Names → OK
- Repeat on all remaining cluster nodes
Validation
- Every AD group with
local_groupsis present in its local groups on every node - PSRemoting works for a member of a group in
Remote Management Users:Enter-PSSession -ComputerName <node> - RDP works for a member of a group in
Remote Desktop Users
PowerShell
When to use: Run the task with the script below, from the place its help names (a management workstation, or the node itself).
Script
| Script | What it does |
|---|---|
scripts/deploy/04-cluster-deployment/phase-06-post-deployment/task-03-security-groups-applied-to-nodes/powershell/Invoke-ApplySecurityGroups-Orchestrated.ps1 | Adds the AD security groups to the local groups of every cluster node, from identity.active_directory.security_groups[].local_groups of infrastructure.yml. Skips entries with no local_groups. |
The login is -Credential, else the LCM account of the file (identity.active_directory.lcm_user, the password a secret reference). The script never prompts: with neither, or without the domain or the LCM user name, it stops with exit code 2.
Requires: PowerShell 7.
Run
./Invoke-ApplySecurityGroups-Orchestrated.ps1 -InfrastructureFile ./infrastructure.yml -WhatIf
./Invoke-ApplySecurityGroups-Orchestrated.ps1 -InfrastructureFile ./infrastructure.yml
Validation Summary
| Check | Command | Expected Result |
|---|---|---|
Administrators membership | Get-LocalGroupMember -Group 'Administrators' | Where-Object ObjectClass -eq 'Group' | The groups whose local_groups name Administrators (for example sg-iic-azl-01-admins) listed on every node |
Remote Management Users | Get-LocalGroupMember -Group 'Remote Management Users' | Where-Object ObjectClass -eq 'Group' | The groups whose local_groups name it (for example sg-iic-azl-01-operations, sg-iic-azl-01-hyperv-admins) listed on every node |
Remote Desktop Users | Get-LocalGroupMember -Group 'Remote Desktop Users' | Where-Object ObjectClass -eq 'Group' | The groups whose local_groups name it (for example sg-iic-azl-01-operations, sg-iic-azl-01-readonly) listed on every node |
Hyper-V Administrators | Get-LocalGroupMember -Group 'Hyper-V Administrators' | Where-Object ObjectClass -eq 'Group' | The groups whose local_groups name it (for example sg-iic-azl-01-hyperv-admins) listed on every node |
| PSRemoting test | Enter-PSSession -ComputerName <node> -Credential <ops-user> | Session opens without error |
Troubleshooting
| Issue | Cause | Resolution |
|---|---|---|
| Security group not listed in local group membership | GPO not applied or AD replication delay | Run gpupdate /force on the node; verify AD group exists: Get-ADGroup -Identity <groupname> |
| PSRemoting test fails with access denied | User not in Remote Management Users group | Add the user's group to Remote Management Users: Add-LocalGroupMember -Group "Remote Management Users" -Member "<domain>\<group>" |
| Group membership shows SID instead of name | Domain controller unreachable for name resolution | Verify DC connectivity: Test-ComputerSecureChannel; check DNS resolution to domain controllers |
Alternatives
The procedures in this task use the methods shown in the tabs above. The toolkit is PowerShell 7 only and has no Bash scripts. A few tasks that act on Azure also have an Azure CLI script written in PowerShell. The script status page of the toolkit lists which task has which script.
Navigation
| Previous | Up | Next |
|---|---|---|
| Task 02: Cluster Quorum | Phase 06 Index | Task 04: SSH Connectivity |
Version Control
| Version | Date | Author | Changes |
|---|---|---|---|
| 1.0.0 | 2025-03-25 | Azure Local Cloud | Initial release |