Set-VBORestAPISettings

In this article

    Short Description

    Modifies REST API settings.

    Syntax

    Set-VBORestAPISettings [-EnableService [<switchparameter>]] [-AuthTokenLifeTime <int32>] [-HTTPSPort <int32>] [-CertificateFilePath <string>] [-CertificatePassword <securestring>]  [<CommonParameters>]

    Detailed Description

    This cmdlet modifies REST API settings which are used by Veeam Backup for Microsoft 365 RESTful API Service. For SSL connections, Veeam Backup for Microsoft 365 REST API uses SSL certificate.

    To modify settings, you need to enter the necessary parameters with new values. The parameters that you omit will remain unchanged.

    Set-VBORestAPISettings 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

    Accept Wildcard Characters

    EnableService

    Defines that the cmdlet will start Veeam Backup for Microsoft 365 RESTful API Service.

    SwitchParameter

    False

    Named

    False

    False

    AuthTokenLifeTime

    Specifies the lifetime value for the authentication token (minutes).

    Default: 60

    Int32

    False

    Named

    False

    False

    HTTPSPort

    Specifies the port for server-client communication over HTTPS protocol.

    Default: 4443

    Int32

    False

    Named

    False

    False

    CertificateFilePath

    Specifies a path to the SSL certificate file.

    String

    False

    Named

    False

    False

    CertificatePassword

    Specifies a password for the SSL certificate.

    SecureString

    False

    Named

    False

    False

    <CommonParameters>

    This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.

    Examples

    Set-VBORestAPISettingsExample 1. Modifying REST API Settings

    This example shows how to modify REST API settings:

    • Set authentication token lifetime to 4800 minutes.
    • Locate the SSL 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:

    1. Assign your certificate password to the $plainpassword variable.
    2. Run the ConvertTo-SecureString cmdlet with the $plainpassword variable to turn the password into the SecureString type. Save the result to the $securepassword variable.
    3. Run the Set-VBORestAPISettings cmdlet. Specify the following settings:
    • Provide the EnableService parameter.
    • Specify the AuthTokenLifeTime parameter value.
    • Specify the CertificateFilePath parameter value.
    • Set the $securepassword variable as the CertificatePassword parameter value.

    Related Commands

    ConvertTo-SecureString