Set-VBORestAPISettings
Short Description
Modifies REST API settings.
Syntax
|
Set-VBORestAPISettings [-EnableService] [-AuthTokenLifeTime <Int32>] [-HTTPSPort <Int32>] [-CertificateFilePath <String>] [-CertificatePassword <SecureString>] [-EnableSwaggerUI] [-EnableOperatorAuthenticationOnly] [<CommonParameters>] |
Detailed Description
This cmdlet modifies REST API settings that are used by Veeam Backup for Microsoft 365 REST API Service. For TLS connections, Veeam Backup for Microsoft 365 REST API uses a TLS certificate.
To modify settings, you need to enter the necessary parameters with new values. The parameters that you omit will remain unchanged.
Note |
|
This cmdlet accepts the SecureString type. Use Microsoft PowerShell standard capabilities to convert your password into the SecureString. |
Parameters
|
Parameter |
Description |
Type |
Required |
Position |
Accept Pipeline Input |
|---|---|---|---|---|---|
|
AuthTokenLifeTime |
Specifies the lifetime value for the authentication token (minutes). Default: 60 |
|
False |
Named |
False |
|
CertificateFilePath |
Specifies a path to the TLS certificate file. |
|
False |
Named |
False |
|
CertificatePassword |
Specifies a password for the TLS certificate. |
|
False |
Named |
False |
|
EnableOperatorAuthenticationOnly |
Defines that Veeam Backup for Microsoft 365 will use REST API only for authentication of restore operators to Restore Portal. Default: False |
|
False |
Named |
False |
|
EnableService |
Defines that the cmdlet will start Veeam Backup for Microsoft 365 REST API Service. Default: False |
|
False |
Named |
False |
|
EnableSwaggerUI |
Defines that the cmdlet will enable access to the swagger website and usage of Swagger UI. Default: False |
|
False |
Named |
False |
|
HTTPSPort |
Specifies a port number for server-client communication over HTTPS protocol. Default: 4443 |
|
False |
Named |
False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About Common Parameters section of Microsoft Learn.
Output Object
The cmdlet returns the VBORestAPISettings object that contains REST API settings.
Examples
Modifying REST API Settings
This example shows how to modify REST API settings:
- Set authentication token lifetime to 4800 minutes.
- Locate the TLS certificate file and specify the certificate password.
|
$plainpassword = "Password1234plain" $securepassword = $plainpassword | ConvertTo-SecureString -AsPlainText -Force Set-VBORestAPISettings -EnableService -AuthTokenLifeTime 4800 -CertificateFilePath "C:\Certificates" -CertificatePassword $securepassword |
Perform the following steps:
- Assign your certificate password to the
$plainpasswordvariable. - Run the
ConvertTo-SecureStringcmdlet with the$plainpasswordvariable to turn the password into theSecureStringtype. Save the result to the$securepasswordvariable. - Run the
Set-VBORestAPISettingscmdlet. Specify the following settings:- Provide the
EnableServiceparameter. - Specify the
AuthTokenLifeTimeparameter value. - Specify the
CertificateFilePathparameter value. - Set the
$securepasswordvariable as theCertificatePasswordparameter value.
- Provide the
Related Commands