Skip to content

Instantly share code, notes, and snippets.

@RaccoonDev
Created September 30, 2015 11:34
Show Gist options
  • Save RaccoonDev/84242da7f8b183e8e65e to your computer and use it in GitHub Desktop.
Save RaccoonDev/84242da7f8b183e8e65e to your computer and use it in GitHub Desktop.
$msdeploy = "$env:ProgramFiles\IIS\Microsoft Web Deploy V3\msdeploy.exe"
##Get this values from publish profile
$publishUrl=""
$msdeploySite=""
$userName=""
$userPWD=""
$computerNameParams = ",computername=`"https://$publishUrl/msdeploy.axd?site=$msdeploySite`",userName='$userName',password='$userPWD',AuthType='Basic'"
$argList = @(
"-verb:sync",
"-source:package=`"package.zip`"",
("-dest:auto" + $computerNameParams),
"-verbose"
);
Start-Process -FilePath $msdeploy -ArgumentList $argList -NoNewWindow -Verbose -Wait -PassThru;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment