New-PveAccessTfa
Add a TFA entry for a user.
API: POST /access/tfa/{userid}, Proxmox VE API viewer
Syntax
Section titled “Syntax”New-PveAccessTfa [-PveTicket <PveTicket>] [-Challenge <string>] [-Description <string>] [-Password <SecureString>] [-Totp <string>] -Type <string> -Userid <string> [-Value <string>] [<CommonParameters>]Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
-PveTicket |
PveTicket |
No | Ticket data connection. |
-Challenge |
string |
No | When responding to a u2f challenge: the original challenge string. |
-Description |
string |
No | A description to distinguish multiple entries from one another. |
-Password |
SecureString |
No | The current password of the user performing the change. |
-Totp |
string |
No | A totp URI. |
-Type |
string |
Yes | TFA Entry Type. Values: totp, u2f, webauthn, recovery, yubico. |
-Userid |
string |
Yes | Full User ID, in the name@realm format. |
-Value |
string |
No | The current value for the provided totp URI, or a Webauthn/U2F challenge response. |
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.