< Back

Publish-RuntimeDependencyPackage

Sat Jan 18, 2020 6:45 pm

NAME Publish-RuntimeDependencyPackage



SYNOPSIS

Publishes the contents of a runtime dependency package to a website. Requires -RunAsAdministrator.





SYNTAX

Publish-RuntimeDependencyPackage [-PackageName] <String> [-PackageVersion] <String> [[-PackageSource] <String>]

[[-Username] <String>] [[-Password] <SecureString>] [-WebrootOutputPath] <String> [-DataOutputPath] <String>

[<CommonParameters>]





DESCRIPTION

Publishes the contents of a runtime dependency package to a website, using Windows PackageManagement

(https://docs.microsoft.com/en-us/powers ... rshell-5.0).



Packages are expected to be NuGet-packages and contain any of the following folders:



- <package>/Webroot

- <package>/Data



All of the above are optional.



The following steps are performed during package publishing:



1. Check if the required package is cached locally.

1.1 If the package isn't found locally, it's installed from a registered package source, or from the

$PackageSource parameter.

2. Copy the contents of the "<package>\\Webroot"-folder to the "<WebrootOutputPath>".

3. Copy the contents of the "<package>\\Data"-folder to the "<DataOutputPath>".





PARAMETERS

-PackageName <String>

The name of the package to install.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-PackageVersion <String>

The exact version of the package to install.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-PackageSource <String>

The URI where the package is located. Can be a file path as well.



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Username <String>

Optional username required to access the package source.



Required? false

Position? 4

Default value [string]::Empty

Accept pipeline input? false

Accept wildcard characters? false



-Password <SecureString>

Optional password required to access the package source.



Required? false

Position? 5

Default value [SecureString]::Empty

Accept pipeline input? false

Accept wildcard characters? false



-WebrootOutputPath <String>

The path where the contents of "<package>\\Webroot" will be copied to.



Required? true

Position? 6

Default value

Accept pipeline input? false

Accept wildcard characters? false



-DataOutputPath <String>

The path where the contents of "<package>\\Data" will be copied to.



Required? true

Position? 7

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



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



PS C:\\>Publish-RuntimeDependencyPackage -Verbose -PackageName "Sitecore.Full" -PackageVersion "8.2.170407"

-PackageSource "http://tund/nuget/nuget/FullSitecore" -WebrootOutputPath "C:\\my-website\\www" -DataOutputPath

"C:\\my-website\\SitecoreDataFolder"















RELATED LINKS