New-PveAccessDomainsSync
Syncs users and/or groups from the configured LDAP to user.cfg. NOTE: Synced groups will have the name ‘name-$realm’, so make sure those groups do not exist to prevent overwriting.
API: POST /access/domains/{realm}/sync, Proxmox VE API viewer
Syntax
Section titled “Syntax”New-PveAccessDomainsSync [-PveTicket <PveTicket>] [-DryRun <bool>] [-EnableNew <bool>] [-Full <bool>] [-Purge <bool>] -Realm <string> [-RemoveVanished <string>] [-Scope <string>] [<CommonParameters>]Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
-PveTicket |
PveTicket |
No | Ticket data connection. |
-DryRun |
bool |
No | If set, does not write anything. |
-EnableNew |
bool |
No | Enable newly synced users immediately. |
-Full |
bool |
No | DEPRECATED: use ‘remove-vanished’ instead. If set, uses the LDAP Directory as source of truth, deleting users or groups not returned from the sync and removing all locally modified properties of synced users. If not set, only syncs information which is present in the synced data, and does not delete or modify anything else. |
-Purge |
bool |
No | DEPRECATED: use ‘remove-vanished’ instead. Remove ACLs for users or groups which were removed from the config during a sync. |
-Realm |
string |
Yes | Authentication domain ID. |
-RemoveVanished |
string |
No | A semicolon-separated list of things to remove when they or the user vanishes during a sync. The following values are possible: ‘entry’ removes the user/group when not returned from the sync. ‘properties’ removes the set properties on existing user/group that do not appear in the source (even custom ones). ‘acl’ removes acls when the user/group is not returned from the sync. Instead of a list it also can be ‘none’ (the default). |
-Scope |
string |
No | Select what to sync. Values: users, groups, both. |
Every parameter also binds by property name from the pipeline, so an object with node and vmid properties (the output of Get-PveGuest, for one) fills -Node and -Vmid. Without -PveTicket the cmdlet uses the last connection, see Connection.
Output
Section titled “Output”A PveResponse: the data returned by Proxmox VE is in .Response.data, the outcome in .IsSuccessStatusCode. See Results and Errors.