Skip to content

Latest commit

 

History

History
509 lines (459 loc) · 31.2 KB

Saritasa.WebDeploy.md

File metadata and controls

509 lines (459 loc) · 31.2 KB

Saritasa.WebDeploy

Initialize-WebDeploy

Synopsis

Configure Web Deploy default settings.

Syntax

Initialize-WebDeploy [[-Credential] <PSCredential>] [[-MsdeployPath] <String>] [[-MsdeployPort] <Int32>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
Credential Credentials to be used for authorization. false false
MsdeployPath Provide to override folder location of Microsoft Web Deploy utility. false false
MsdeployPort Provide to override default MS Deploy port. false false 0

Note

Leave -Credential empty for NTLM. For NTLM support execute on server: Set-ItemProperty HKLM:Software\Microsoft\WebManagement\Server WindowsAuthenticationEnabled 1 Restart-Service WMSVC https://blogs.msdn.microsoft.com/carlosag/2011/12/13/using-windows-authentication-with-web-deploy-and-wmsvc/

Invoke-PackageBuild

Synopsis

Package a project.

Syntax

Invoke-PackageBuild [-ProjectPath] <String> [-PackagePath] <String> [[-Configuration] <String>] [[-Platform] <String>] [[-Precompile] <Boolean>] [[-BuildParams] <String[]>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
ProjectPath Path to project file. true false
PackagePath Path to where the resulting package should be saved. true false
Configuration Target build configuration. false false Release
Platform Target build platform. false false AnyCPU
Precompile Whether or not project should be precompiled before packaging. false false True
BuildParams Any additional parameters to be passed to MSBuild utility. false false

Examples

EXAMPLE 1

Invoke-PackageBuild src/WebApp.csproj WebApp.zip -BuildParams ('/p:AspnetMergePath="C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools"')

Invoke-WebDeployment

Synopsis

Invokes a web deployment process.

Syntax

Invoke-WebDeployment [-PackagePath] <String> [-ServerHost] <String> [-SiteName] <String> [-Application] <String> [-AllowUntrusted] [[-MSDeployParams] <String[]>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
PackagePath Path to package to be deployed. To generate the package the Invoke-PackageBuild command can be used. true false
ServerHost Hostname of target machine. true false
SiteName Web site name. true false
Application Application name. true false
AllowUntrusted When specified, untrusted SSL connections are allowed. Otherwise, untrusted SSL connections are not allowed. false false False
MSDeployParams Any additional parameters to be passed to MSDeploy utility. false false

Invoke-WebSiteDeployment

Synopsis

Deploys ASP.NET web site (app without project) to remote server. It's similar to Sync-WebContent, but creates IIS application.

Syntax

Invoke-WebSiteDeployment [-Path] <String> [-ServerHost] <String> [-SiteName] <String> [-Application] <String> [-AllowUntrusted] [[-MSDeployParams] <String[]>] [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
Path Folder path to be deployed. true false
ServerHost Hostname of target machine. true false
SiteName Web site name. true false
Application Application name. true false
AllowUntrusted When specified, untrusted SSL connections are allowed. otherwise, untrusted SSL connections are not allowed. false false False
MSDeployParams Any additional parameters to be passed to MSDeploy utility. false false

Start-AppPool

Synopsis

Starts the application pool for specified application on a remote machine.

Syntax

Start-AppPool [-ServerHost] <String> [-SiteName] <String> [-Application] <String> [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
ServerHost Hostname of target machine. true false
SiteName Web site name. true false
Application Application name. true false

Note

The recycleApp provider should be delegated to WDeployAdmin.

Stop-AppPool

Synopsis

Stops the application pool for specified application on a remote machine.

Syntax

Stop-AppPool [-ServerHost] <String> [-SiteName] <String> [-Application] <String> [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
ServerHost Hostname of target machine. true false
SiteName Web site name. true false
Application Application name. true false

Note

The recycleApp provider should be delegated to WDeployAdmin.

Sync-IisApp

Synopsis

Copies IIS app content from local server to remote server.

Syntax

Sync-IisApp [-SiteName] <String> [-Application] <String> [-ServerHost] <String> [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
SiteName Web site name. true false
Application Application name. true false
ServerHost DestinationServer Hostname of target machine. true false

Sync-WebContent

Synopsis

Synchronizes web site file structure between local and remote servers.

Syntax

Sync-WebContent -ContentPath <String> -ServerHost <String> -SiteName <String> -Application <String> [<CommonParameters>]

Sync-WebContent -ContentPath <String> -ServerHost <String> -SiteName <String> -AutoDestination [<CommonParameters>]

Parameters

Name Alias Description Required? Pipeline Input Default Value
ContentPath Folder path on local machine to be synchronized. true false
ServerHost DestinationServer Hostname of target machine. true false
SiteName Web site name. true false
Application Application name. true false
AutoDestination If set, the destination will be specified automatically. true false False