New-PveAccessTicket
Create or verify authentication ticket.
API: POST /access/ticket, Proxmox VE API viewer
Syntax
Section titled “Syntax”New-PveAccessTicket [-PveTicket <PveTicket>] [-NewFormat <bool>] [-Otp <string>] -Password <SecureString> [-Path <string>] [-Privs <string>] [-Realm <string>] [-TfaChallenge <string>] -Username <string> [<CommonParameters>]Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
-PveTicket |
PveTicket |
No | Ticket data connection. |
-NewFormat |
bool |
No | This parameter is now ignored and assumed to be 1. |
-Otp |
string |
No | One-time password for Two-factor authentication. |
-Password |
SecureString |
Yes | The secret password. This can also be a valid ticket. |
-Path |
string |
No | Verify ticket, and check if user have access ‘privs’ on ‘path’. |
-Privs |
string |
No | Verify ticket, and check if user have access ‘privs’ on ‘path’. |
-Realm |
string |
No | You can optionally pass the realm using this parameter. Normally the realm is simply added to the username <username>@<realm>. |
-TfaChallenge |
string |
No | The signed TFA challenge string the user wants to respond to. |
-Username |
string |
Yes | User name. |
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.