Preparing to use Windows PowerShell cmdlets with Data Protection for SQL Server

Data Protection for SQL Server includes a set of Windows PowerShell cmdlets to help you manage Data Protection for SQL Server components in your environment.

About this task

You can issue cmdlets that are provided with Data Protection for SQL Server in Windows environments.

Data Protection for SQL Server cmdlets help support a seamless management environment and greatly improve remote management and automation capabilities. You can aggregate cmdlets together to form commands and use the large volume of existing cmdlets from other vendors.

Before you use the cmdlets, complete the following steps.

Procedure

  1. Log on to the system as an administrator.
  2. From a Windows PowerShell command prompt, issue the following command:
    set-executionpolicy remotesigned
  3. Import the Windows PowerShell modules from the FlashCopyManager folder:
    • FmModuleSQL.dll
    • FmModuleMMC.dll
    From the Windows PowerShell command prompt, use your administrator credentials to import modules as follows:
    1. Browse to the FlashCopyManager folder.
    2. Enter the following commands:
      import-module .\FmModuleSQL.dll
      import-module .\FmModuleMMC.dll
    3. (Optional) To use the cmdlets in these modules any time that you start Windows PowerShell, add the following lines to your profile:
        $path = (get-itemproperty -path "HKLM:\SOFTWARE\IBM\TDPSql\
      currentversion\mmc" -ea SilentlyContinue).path
      if ($null -ne $path)
      {
      dir "$path\fmmodule*.dll" | select -expand fullname | import-module
      -force -Global
      }

What to do next

For information about creating, running, monitoring, and troubleshooting scripts with cmdlets, see Windows PowerShell 3.0 or later documentation. For more information about Windows PowerShell cmdlets, consistent naming patterns, parameters, arguments, and syntax, see this web page as a starting point:Microsoft TechNet: Getting Started with Windows PowerShell .