Stop-VESQLRestoreSession

Short Description

Stops an active restore session initiated to perform operations with Microsoft SQL Server databases.

Applies to

Veeam Backup & Replication

Product Edition: Community, Standard, Enterprise, Enterprise Plus, Veeam Universal License

Syntax

Stop-VESQLRestoreSession [-Session] <VESQLRestoreSession> [<CommonParameters>]

Detailed Description

This cmdlet stops an active restore session initiated to perform operations with Microsoft SQL Server databases.

Stop-VESQLRestoreSession Note:

  • The cmdlet stops restore sessions initiated in the PowerShell console only.
  • Restore sessions will not stop automatically if you close the PowerShell console. To stop the restore session, you must run the Stop-VESQLRestoreSession cmdlet.
  • If the restore session you want to stop contains ongoing publishing operations, you will be prompted to unpublish all databases still published in the session. To avoid this interactive prompt, unpublish the databases using the Unpublish-VESQLDatabase cmdlet.

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Session

Specifies a restore session initiated to perform operations with Microsoft SQL Server databases. The cmdlet will stop this session.

Accepts the VESQLRestoreSession object. To get this object, run the Get-VESQLRestoreSession cmdlet.

True

0

True (ByValue)

<CommonParameters>

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

Example

Stopping Restore Session

This example shows how to stop a restore session initiated to perform operations with Microsoft SQL Server databases.

$session = Get-VESQLRestoreSession

Stop-VESQLRestoreSession -Session $session[3]

Perform the following steps:

  1. Run the Get-VESQLRestoreSession cmdlet. Save the result to the $session variable.

The cmdlet will return an array of active restore sessions. Note the ordinal number of the necessary restore session (in our example, it is the fourth restore session in the array).

  1. Run the Stop-VESQLRestoreSession cmdlet. Set the $session variable as the Session parameter value and select the necessary restore session.

Related Commands

Get-VESQLRestoreSession

Page updated 11/7/2024

Page content applies to build 12.3.0.310