For the complete documentation index, see llms.txt. This page is also available as Markdown.

Grant-PSUAppToken

SINOSSI

Concede un nuovo token dell'app.

SINTASSI

CurrentUser (predefinito)

Grant-PSUAppToken [-Expiry <DateTime>] [-Description <String>] [-ComputerName <String>] [-AppToken <String>]
 [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]
 [<CommonParameters>]

Grant

Grant-PSUAppToken -Identity <Identity> [-Expiry <DateTime>] [-Role <String[]>] [-Description <String>]
 [-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials]
 [-Integrated] [-TrustCertificate] [-Cookies] [<CommonParameters>]

GrantCustom

Grant-PSUAppToken -IdentityName <String> [-Expiry <DateTime>] [-Role <String[]>] [-Description <String>]
 [-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials]
 [-Integrated] [-TrustCertificate] [-Cookies] [<CommonParameters>]

DESCRIZIONE

Concede un nuovo token dell'app. I token dell'app possono essere utilizzati per chiamare l'API di gestione di PowerShell Universal e altre API REST personalizzate.

ESEMPI

Esempio 1

Concede un nuovo token dell'app all'utente MyIdentity che scade tra 30 giorni e fornisce accesso in lettura (Reader).

Esempio 2

Genera un nuovo token dell'app utilizzando la chiave di firma specificata per l'utente MyIdentity.

PARAMETRI

-AppToken

L'AppToken utilizzato per chiamare l'API di gestione di PowerShell Universal. È inoltre possibile chiamare Connect-PSUServer prima di questo cmdlet per impostare l'AppToken per l'intera sessione.

-ComputerName

Specifica il nome del computer o l'URL da chiamare per accedere all'API di gestione di PowerShell Universal. È inoltre possibile utilizzare Connect-PSUServer prima di questo cmdlet per impostare il nome del computer per l'intera sessione.

-Expiry

La data di scadenza del token dell'app.

-Identity

L'oggetto Identity per cui creare il token dell'app. Utilizzi Get-PSUIdentity per recuperare le identità.

-IdentityName

Il nome dell'identità da generare o concedere per il token dell'app.

-Role

Il ruolo da concedere all'identità del token dell'app.

-UseDefaultCredentials

Utilizzare le credenziali predefinite durante la connessione all'API di gestione

-Integrated

Esegue il comando internamente anziché utilizzare l'API di gestione. Funziona solo quando lo script viene eseguito all'interno di PowerShell Universal.

-Credential

Credenziali per accedere all'API di gestione di PowerShell Universal.

-TrustCertificate

Indica se il cmdlet deve ignorare i problemi relativi ai certificati.

-Description

Fornisce la descrizione del token dell'app.

-Cookies

Riutilizza e mantiene i cookie di autenticazione per la sessione PowerShell corrente.

CommonParameters

Questo cmdlet supporta i parametri comuni: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -Verbose, -WarningAction, -WarningVariable e -ProgressAction. Per maggiori informazioni, veda about_CommonParameters.

INPUT

Nessuno

OUTPUT

System.Object

NOTE

COLLEGAMENTI CORRELATI

Get-PSUIdentity

Ultimo aggiornamento

È stato utile?