DLM Automation

Switch from SQL CI Publish command to PowerShell

This page shows you how to create a PowerShell script using the DLM Automation cmdlets that's equivalent to the SQL CI Publish command.

The SQL CI Publish command takes the database NuGet package created by the Build command and publishes it to a NuGet feed.

This example uses the Publish command in SQL CI to publish the database package to a NuGet feed that requires an API key:

Command line example

sqlCI.exe Publish /package="C:\packages\WidgetShop.1.0.nupkg" /nugetFeedUrl=http://nugetfeedmachinename:8081/nuget/ /nugetFeedApiKey=ed6d7c98-9847-4599-b5a8-323f215b5c89

Here's the equivalent example using the DLM Automation PowerShell cmdlets:

PowerShell example

$package = "C:\packages\WidgetShop.1.0.nupkg"
Publish-DlmDatabasePackage $package -NuGetFeedUrl "http://nugetfeedmachinename:8081/nuget/" -NuGetApiKey "ed6d7c98-9847-4599-b5a8-323f215b5c89"

The example above uses the Publish-DlmDatabasePackage cmdlet.

In the DLM Automation PowerShell module, you can also use the Publish-DlmDatabasePackage cmdlet to send schema and documentation information to the DLM Dashboard.

See Sending information to DLM Dashboard


Didn't find what you were looking for?