| name | gcloud-active-directory |
| description | Managed Service for Microsoft AD via gcloud (`gcloud active-directory`). Manage Managed Microsoft AD resources — domains, operations, peerings. |
gcloud active-directory — Managed Service for Microsoft AD
Overview
gcloud active-directory manages Google Cloud's Managed Service for Microsoft Active Directory (Managed Microsoft AD): highly available, hardened Microsoft AD domains running on Google-managed Windows domain controllers. Reach for it when you need real Active Directory (Kerberos, LDAP, Group Policy, domain join) for Windows workloads on Google Cloud without operating the underlying DCs, patching, or backups yourself. You provide a domain name, a reserved IP range, and authorized VPC networks; Google manages topology, multi-region HA, schema, and trusts to your on-premises or other AD forests.
Quick reference — common workflows
1. Enable the API and create a domain
Domain creation can take up to ~60 minutes; use --async plus operations to track it, or omit it to block until done.
gcloud services enable managedidentities.googleapis.com
gcloud active-directory domains create ad.example.com \
--region=us-central1 \
--reserved-ip-range="10.172.0.0/24" \
--authorized-networks=projects/my-project/global/networks/my-network \
--enable-audit-logs
gcloud active-directory domains describe ad.example.com
2. Add a region (multi-region HA) and peer another VPC
gcloud active-directory domains update ad.example.com \
--add-region=us-east1
gcloud active-directory domains update ad.example.com \
--add-authorized-networks=projects/my-project/global/networks/second-network
3. Reset the delegated admin password
gcloud active-directory domains reset-admin-password ad.example.com
4. Create and validate a trust to another AD forest
gcloud active-directory domains trusts create ad.example.com \
--target-domain-name=onprem.corp.com \
--target-dns-ip-addresses=10.177.0.2 \
--type=FOREST \
--direction=BIDIRECTIONAL \
--async
gcloud active-directory domains trusts validate-state ad.example.com \
--target-domain-name=onprem.corp.com
5. Cross-project VPC access with peerings
gcloud active-directory peerings create my-peering \
--domain=projects/domain-project/locations/global/domains/ad.example.com \
--authorized-network=projects/network-project/global/networks/my-network
gcloud active-directory peerings list
gcloud active-directory peerings describe my-peering
6. Back up and restore a domain
gcloud active-directory domains backups create my-backup \
--domain=ad.example.com --async
gcloud active-directory domains backups list --domain=ad.example.com
gcloud active-directory domains restore ad.example.com \
--backup=my-backup --async
gcloud active-directory operations list
Command groups
| Group | Reference file | Commands | Description |
|---|
active-directory domains | domains.md | 21 | Manage Managed Microsoft AD domains, plus backups and trusts subgroups |
active-directory operations | operations.md | 3 | Track and cancel long-running domain operations |
active-directory peerings | peerings.md | 5 | Authorize VPC networks in other projects to use a domain |
See index.md for a one-line index of all 29 GA commands.
Common flags & tips
beta / alpha
gcloud beta active-directory adds domain subcommands that have no GA equivalent:
gcloud beta active-directory domains migration — check-permissions, enable, disable for on-prem AD migration workflows.
gcloud beta active-directory domains sql-integrations — describe and list for Cloud SQL + Managed AD integration.
Commands such as extend-schema, describe-ldaps-settings, update-ldaps-settings, reset-admin-password, restore, and the backups and trusts subgroups exist in both GA and beta. No gcloud alpha active-directory surface is published.
Official documentation