DLM Automation

Export-DlmDatabasePackage

Export-DlmDatabasePackage

Exports a DatabasePackage object to disk.

Syntax

Export-DlmDatabasePackage [-InputObject] <DatabasePackage> -Path <Object> [-Force] [<CommonParameters>]

Description

The Export-DlmDatabasePackage cmdlet exports the DatabasePackage object produced by the New-DlmDatabasePackage cmdlet to a specified output folder in NuGet package format.

Parameters

-InputObject <RedGate.DLMAutomation.Compare.Packaging.DatabasePackage>

The DatabasePackage object to be exported.

Aliases None
Required?true
Position?0
Default Value None
Accept Pipeline Inputtrue (ByValue)
Accept Wildcard Charactersfalse

-Path <System.Object>

The path to the folder the package is exported to. If the folder doesn't already exist, it will be created when the package is exported.

Aliases None
Required?true
Position?named
Default Value None
Accept Pipeline Inputfalse
Accept Wildcard Charactersfalse

-Force <System.Management.Automation.SwitchParameter>

Use this parameter to overwrite any existing NuGet package with the same name.

Aliases None
Required?false
Position?named
Default ValueFalse
Accept Pipeline Inputfalse
Accept Wildcard Charactersfalse

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see http://technet.microsoft.com/en-us/library/hh847884.aspx.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • RedGate.DLMAutomation.Compare.Packaging.DatabasePackage

    The DatabasePackage object to be exported.

Return values

The output type is the type of the objects that the cmdlet emits.

  • None

Examples

---------- EXAMPLE 1 ----------

$scriptsFolder = "C:\Work\scripts"
$validatedSchema = $scriptsFolder | Invoke-DlmDatabaseSchemaValidation
$databasePackage = $validatedSchema | New-DlmDatabasePackage -PackageId MyDatabase -PackageVersion 1.0.0
$databasePackage | Export-DlmDatabasePackage -Path "c:\packages"

In this example, the New-DlmDatabasePackage cmdlet creates a DatabasePackage object from a validated database schema. The Export-DlmDatabasePackage cmdlet then exports the package to c:\packages.


Didn't find what you were looking for?