New-VEPSQLInstanceCredentials
Short Description
Creates a PostgreSQL credential object to authenticate to a PostgreSQL database.
Product: Veeam Backup & Replication
Product Edition: Enterprise, Enterprise Plus, Veeam Universal License
Syntax
This cmdlet provides the following parameter sets:
-
UseLinuxUserParameterSetNew-VEPSQLInstanceCredentials [-UseLinuxUserForPeerAuthentication] [<CommonParameters>]
-
PeerAuthUserParameterSetNew-VEPSQLInstanceCredentials -PeerAuthenticationUser <String> [<CommonParameters>]
-
SqlCredentialsParameterSetNew-VEPSQLInstanceCredentials -SQLCredentials <PSCredential> [<CommonParameters>]
Detailed Description
This cmdlet creates a VEPSQLInstanceCredentials object that specifies authentication credentials for a PostgreSQL database. Use the resulting object with the Start-VEPSQLDatabaseRestoreRestores a backed-up PostgreSQL database. cmdlet to restore a PostgreSQL database.
You can define one of the following PostgreSQL authentication methods:
- Authentication using the current Linux OS user. PostgreSQL authenticates the client as the PostgreSQL role with the same name as the current Linux OS user. This works for peer authentication and also for password authentication if the password of the Linux OS user is the same as the password of the PostgreSQL role.
- Peer authentication using a specified Linux OS user. PostgreSQL authenticates the client as the PostgreSQL role mapped to the specified Linux OS user in the ident map file (
pg_ident.conf). - Password authentication using a SQL user name and password.
Parameters
|
Parameter |
Description |
Type |
Required |
Position |
Accept Pipeline Input |
|---|---|---|---|---|---|
|
PeerAuthenticationUser |
Specifies the name of the Linux OS user for PostgreSQL peer authentication.
PostgreSQL will authenticate the client as the PostgreSQL role mapped to the specified Linux OS user in the ident map file ( |
|
True |
Named |
False |
|
SQLCredentials |
Specifies SQL credentials for PostgreSQL password authentication. The cmdlet will use these credentials to authenticate to the PostgreSQL database.
Accepts the |
|
True |
Named |
False |
|
UseLinuxUserForPeerAuthentication |
Defines that the cmdlet will use the current Linux OS user for PostgreSQL authentication. PostgreSQL will authenticate the client as the PostgreSQL role with the same name as the current Linux OS user. This works for peer authentication and also for password authentication if the password of the Linux OS user is the same as the password of the PostgreSQL role. |
|
True |
Named |
False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About Common Parameters section of Microsoft Docs.
Output Object
The cmdlet returns the VEPSQLInstanceCredentials object that contains PostgreSQL authentication credentials.
Examples
Example 1. Creating Credentials for Current Linux User Peer Authentication
|
This command creates a PostgreSQL credentials object using the current Linux OS user for peer authentication. Save the result to the
|
Example 2. Creating Credentials for Specified Linux User Peer Authentication
|
This command creates a PostgreSQL credentials object using a specified Linux OS user for peer authentication. Save the result to the
|
Example 3. Creating Credentials with SQL User Name and Password
|
This example shows how to create a PostgreSQL credentials object using SQL user name and password for password authentication.
Perform the following steps:
|
Related Commands