Get-VESQLPublishedDatabase
Short Description
Returns published Microsoft SQL Server databases.
Applies to
Veeam Backup & Replication
Product Edition: Community, Standard, Enterprise, Enterprise Plus, Veeam Universal License
Syntax
Get-VESQLPublishedDatabase [-Session] <VESQLRestoreSession> [[-Name] <String[]>] [-ServerName <String[]>][-InstanceName <String[]>] [<CommonParameters>] |
Detailed Description
This cmdlet returns an array of published Microsoft SQL databases.
Note: |
The cmdlet returns Microsoft SQL databases published in the PowerShell console only. The cmdlet does not return Microsoft SQL databases published in the Veeam Backup & Replication console. |
Parameters
Parameter | Description | Type | Required | Position | Accept Pipeline Input |
---|---|---|---|---|---|
Session | Specifies a restore session. The cmdlet will return information about a Microsoft SQL database added to the specified restore session. | Accepts the VESQLRestoreSession object. To get this object, run the Get-VESQLRestoreSession cmdlet. | True | 0 | True (ByValue) |
Name | Specifies an array of names for Microsoft SQL databases. The cmdlet will return information about databases with the specified names. | String[] | False | 1 | False |
ServerName | Specifies an array of target server names. The cmdlet will get Microsoft SQL databases that are published to these servers. | String[] | False | Named | False |
InstanceName | Specifies an array of target instance names. The cmdlet will get Microsoft SQL databases that are published to these instances. | String[] | False | Named | False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.
Output Object
The cmdlet returns the VESQLPublishedDatabase[] object that contains an array of published Microsoft SQL databases.
Examples
Example 1. Getting all Published Microsoft SQL Server Databases
This example shows how to get an array of all published Microsoft SQL Server databases within a restore session.
Perform the following steps:
The cmdlet will return an array of restore sessions. Note the ordinal number of the necessary restore session. In our example, it is the first restore session in the array.
|
Example 2. Getting All Published Microsoft SQL Server Databases with Specific Names Belonging to Specific Instances
This example shows how to get an array of published Microsoft SQL Server databases with specific names belonging to specific instances on the backup file.
Perform the following steps:
The cmdlet will return an array of restore sessions. Note the ordinal number of the necessary restore session. In our example, it is the first restore session in the array.
Save the result to the $database variable to be able to use it with other cmdlets. |
Example 3. Getting All Microsoft SQL Server Databases Published on Specific Servers
This example shows how to get an array of all Microsoft SQL Server databases published on the specified servers.
Perform the following steps:
The cmdlet will return an array of restore sessions. Note the ordinal number of the necessary restore session. In our example, it is the first restore session in the array.
|
Related Commands