Skip to content

Set-PveAccessTfa

Add a TFA entry for a user.

API: PUT /access/tfa/{userid}/{id}, Proxmox VE API viewer

Set-PveAccessTfa
[-PveTicket <PveTicket>]
[-Description <string>]
[-Enable <bool>]
-Id <string>
[-Password <SecureString>]
-Userid <string>
[<CommonParameters>]
Parameter Type Required Description
-PveTicket PveTicket No Ticket data connection.
-Description string No A description to distinguish multiple entries from one another.
-Enable bool No Whether the entry should be enabled for login.
-Id string Yes A TFA entry id.
-Password SecureString No The current password of the user performing the change.
-Userid string Yes Full User ID, in the name@realm format.

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.

A PveResponse: the data returned by Proxmox VE is in .Response.data, the outcome in .IsSuccessStatusCode. See Results and Errors.