Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staging #25

Open
wants to merge 3 commits into
base: staging
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions DSCResources/RS_rsWebDeploy/RS_rsWebDeploy.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,22 @@ function Set-TargetResource
Write-Verbose -Message "Calling msdeploy.exe to sync the site content from a zip package"

$appCmd = "$env:PROGRAMFILES\IIS\Microsoft Web Deploy V3\msdeploy.exe"
$appCmd = "& '$appCmd'"

if($Ensure -eq "Present")
{
#sync the given package content into iis inetpub
if($ContentPath.contains("\") -and $ContentPath.contains(":"))
{
#this is the case when iis site content path is specified
$appCmd += "-verb:sync -source:package=$PackagePath -dest:contentPath=$ContentPath"
$params = @("-verb:sync","-source:package=$PackagePath","-dest:contentPath=$ContentPath")
}
else
{
#this is the case when iis site name is specified (no spaces allowed)
$appCmd += "-verb:sync -source:package=$PackagePath -dest:iisApp=$ContentPath"
$params = @("-verb:sync","-source:package=$PackagePath","-dest:iisApp=$ContentPath")
}
Write-Verbose -Message $appCmd
Invoke-Expression $appCmd
Write-Verbose -Message "Appcmd command run: $appCmd $params"
& $appcmd @params

}
else
Expand Down