Configure Web Deploy default settings.
Initialize-WebDeploy [[-Credential] <PSCredential>] [[-MsdeployPath] <String>] [[-MsdeployPort] <Int32>] [<CommonParameters>]
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 |
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/
Package a project.
Invoke-PackageBuild [-ProjectPath] <String> [-PackagePath] <String> [[-Configuration] <String>] [[-Platform] <String>] [[-Precompile] <Boolean>] [[-BuildParams] <String[]>] [<CommonParameters>]
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 |
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"')
Invokes a web deployment process.
Invoke-WebDeployment [-PackagePath] <String> [-ServerHost] <String> [-SiteName] <String> [-Application] <String> [-AllowUntrusted] [[-MSDeployParams] <String[]>] [<CommonParameters>]
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 |
Deploys ASP.NET web site (app without project) to remote server. It's similar to Sync-WebContent, but creates IIS application.
Invoke-WebSiteDeployment [-Path] <String> [-ServerHost] <String> [-SiteName] <String> [-Application] <String> [-AllowUntrusted] [[-MSDeployParams] <String[]>] [<CommonParameters>]
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 |
Starts the application pool for specified application on a remote machine.
Start-AppPool [-ServerHost] <String> [-SiteName] <String> [-Application] <String> [<CommonParameters>]
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 |
The recycleApp provider should be delegated to WDeployAdmin.
Stops the application pool for specified application on a remote machine.
Stop-AppPool [-ServerHost] <String> [-SiteName] <String> [-Application] <String> [<CommonParameters>]
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 |
The recycleApp provider should be delegated to WDeployAdmin.
Copies IIS app content from local server to remote server.
Sync-IisApp [-SiteName] <String> [-Application] <String> [-ServerHost] <String> [<CommonParameters>]
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 |
Synchronizes web site file structure between local and remote servers.
Sync-WebContent -ContentPath <String> -ServerHost <String> -SiteName <String> -Application <String> [<CommonParameters>]
Sync-WebContent -ContentPath <String> -ServerHost <String> -SiteName <String> -AutoDestination [<CommonParameters>]
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 |