Skip to content

Instantly share code, notes, and snippets.

View jole78's full-sized avatar

Johan Leino jole78

View GitHub Profile
@jole78
jole78 / EnvironmentSettingsSupport.cs
Created May 9, 2013 20:04
Shows an example of how to enable environment specfic settings in SpecFlow
[Binding]
public class EnvironmentSettingsSupport
{
private static IObjectContainer m_Container;
public EnvironmentSettingsSupport(IObjectContainer container)
{
m_Container = container;
}
@jole78
jole78 / setx-example.bat
Created March 26, 2013 10:56
This example shows how to add the location of msdeploy.exe to the PATH environment variable on windows
setx PATH "%PATH%;C:\Program Files\IIS\Microsoft Web Deploy V3" /m
@jole78
jole78 / New-WDPublishSettings.ps1
Last active December 14, 2015 14:39
Example shows New-WDPublishSettings cmdlet
Add-PSSnapin WDeploySnapin3.0
New-WDPublishSettings `
-ComputerName "virjole-wfe1" `
-EncryptPassword:$true `
-FileName "C:\temp\virjole-wfe1.publishsettings" `
-UserId "hyper-v\wd_remote" `
-Password "pass@word1" `
-AgentType:WMSvc `
-AllowUntrusted:$true
@jole78
jole78 / wd.contentPath
Created February 20, 2013 12:16
Example showing dump operation with contentPath provider with remote site prod.example.com and remote execution of web deploy commands.
msdeploy.exe
-verb:dump
-source:contentPath=prod.example.com,
computerName=https://virjole-wfe1:8172/msdeploy.axd,
getCredentials='VIRJOLE Remote Admin',
authType=Basic
-allowUntrusted
@jole78
jole78 / wd.contentPath
Last active December 13, 2015 23:58
Example showing dump operation with the contentPath provider on site prod.example.com
msdeploy.exe
-verb:dump
-source:contentPath=prod.example.com
@jole78
jole78 / wd.filePath
Last active December 12, 2015 06:58
Example showing as sync from local folder to file share. Also shows changing the name of the file on destination.
msdeploy.exe
-verb:sync
-source:filePath="C:\web.deploy\input.xml"
-dest:filePath=\\VIRJOLE-WFE1\in\svc-input.xml
@jole78
jole78 / wd.filePath
Last active December 12, 2015 06:38
Example showing syntax for the filePath provider
# 1
filePath="C:\inetpub\wwwroot\www.example.com\img\logo.png"
# 2
filePath="\\server\www.example.com\upload\logo.png"
@jole78
jole78 / wd.contentPath
Last active December 12, 2015 04:49
Example syntax for the contentPath provider
# 1
contentPath="C:\inetpub\wwwroot\www.example.com"
# 2
contentPath="\\server\www.example.com\upload"
# 3
contentPath="C:\inetpub\wwwroot\www.example.com\index.html"
# 4
@jole78
jole78 / wd.dirPath
Last active December 12, 2015 03:19
Example showing a sync from a zip file (package) to a network share (dirPath)
msdeploy.exe
-verb:sync
-source:package="C:\web.deploy\backups\prod.example.com.upload.zip"
-dest:dirPath="\\VIRJOLE-WFE1\test.example.com\upload"
@jole78
jole78 / wd.dirPath-03
Last active December 12, 2015 03:19
Example showing a sync from a directory (dirPath) to a zip file (package)
msdeploy.exe
-verb:sync
-source:dirPath="C:\@Shares\prod.example.com\upload"
-dest:package="C:\web.deploy\backups\prod.example.com.upload.zip"