Skip to content

Sources command

Manages the list of sources located in the user scope configuration file or a specified configuration file. The user scope configuration file is located at %appdata%\.dpm\dpm.Config.

Usage

bat
dpm  sources <operation> -Name <name> -Source <source>

where <operation> is one of List, Add, Remove, Enable, Disable, or Update, <name> is the name of the source, and <source> is the source's URL. You can operate on only one source at a time.

Options

OptionDescription
configFileThe DPM configuration file to apply. If not specified, %AppData%\.dpm\dpm.Config is used.
formatApplies to the list action and can be Detailed (the default) or Short.
helpDisplays help information for the command.
passwordSpecifies the password for authenticating with the source.
userNameSpecifies the user name for authenticating with the source.
verbositySpecifies the amount of detail displayed in the output: normal, quiet, detailed.

NOTE

Make sure to add the sources' password under the same user context as the dpm.exe is later used to access the package source. The password will be stored encrypted in the config file and can only be decrypted in the same user context as it was encrypted. So for example when you use a build server to restore DPM packages the password must be encrypted with the same Windows user under which the build server task will run.

Examples

bat
dpm  sources Add -Name "MyServer" -Source \\myserver\packages

dpm  sources Disable -Name "MyServer"

dpm  sources Enable -Name "dpm.org"

dpm  sources add -name foo.bar -source C:\dpm\local -username foo -password bar -configfile %AppData%\DPM\my.config