Download - Web deploy command line
![Page 1: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/1.jpg)
WEB DEPLOY COMMAND LINELarry Nung
![Page 2: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/2.jpg)
AGENDAWeb Deploy Command LineReferenceQ & A
2
![Page 3: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/3.jpg)
WEB DEPLOY COMMAND LINE3
![Page 4: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/4.jpg)
PATH C:\Program Files\IIS\Microsoft Web Deploy V3\
4
![Page 5: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/5.jpg)
SYNTAX msdeploy.exe
-verb:<verbName> -source:<provider>[=<pathToProviderObject>
[,<providerSetting>=<providerSettingValue>]] [-dest:<provider>[=<pathToProviderObject>
[,<providerSetting>=<providerSettingValue>]] ] [-<MSDeployOperationSetting> ...]
5
![Page 6: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/6.jpg)
ARGUMENTS -verb:<verbName>
Specifies a Web Deploy verb. A verb determines the action to be taken on a source or destination object.
<verbName> must be one of the following: delete, dump, getDependencies, getSystemInfo, or sync.
The sync verb requires both the -source and -dest arguments.
The delete verb requires only the -dest argument.
6
![Page 7: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/7.jpg)
ARGUMENTS -source:<provider>
Specifies the source of the data for the verb argument.
source is a required argument for the sync and dump operations, but not delete.
-dest: <provider> Specifies the destination of a synchronization
operation. The destination argument is required only if
the sync or delete verb is specified.
7
![Page 8: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/8.jpg)
ARGUMENTS -[-<MSDeployOperationSetting> ... ]
Operation settings affect the execution of an entire Web Deploy operation.
8
![Page 9: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/9.jpg)
PROVIDER SETTINGS authType computerName encryptPassword getCredentials ignoreErrors includeAcls password storeCredentials tempAgent userName wmsvc 9
![Page 10: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/10.jpg)
OPERATION SETTINGS allowUntrusted appHostConfigDir declareParam declareParamFile dest disableLink disableRule disableSkipDirective enableLink enableRule
10
![Page 11: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/11.jpg)
OPERATION SETTINGS enableSkipDirective postSync preSync removeParam replace retryAttempts retryInterval setParam setParamFile showSecure skip 11
![Page 12: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/12.jpg)
OPERATION SETTINGS source unicode useCheckSum verb verbose webServerDir whatif xml xpath
12
![Page 13: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/13.jpg)
DUMP Dump local server
msdeploy -verb:dump -source:webServer
13
![Page 14: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/14.jpg)
DUMP Dump remote server
msdeploy -verb:dump -source:webServer,computerName=<DestServer>
14
![Page 15: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/15.jpg)
DUMP Dump local site
msdeploy -verb:dump -source:appHostConfig="<SourceSite>"
15
![Page 16: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/16.jpg)
DUMP Dump remote site
msdeploy -verb:dump -source:appHostConfig="<SourceSite>",computerName=<SourceServer>
16
![Page 17: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/17.jpg)
DUMP
17
Dump local available backups msdeploy.exe -verb:dump -
source:backupManager=<SourceSite>
![Page 18: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/18.jpg)
DUMP
18
Dump remote available backups msdeploy.exe -verb:dump -
source:backupManager=<SourceSite>,computerName=<DestServer>
![Page 19: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/19.jpg)
SYNC Sync local server to remote server
msdeploy -verb:sync -source:webServer -dest:webServer,computerName=<DestServer>
Sync remote server to local server msdeploy -verb:sync -
source:webServer,computerName=<SourceServer> -dest:webServer
Sync remote server to remote server msdeploy -verb:sync -
source:webServer,computerName=<SourceServer> -dest:webServer,computerName=<DestServer>
19
![Page 20: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/20.jpg)
SYNC Sync remote app pool to remote app pool
msdeploy –verb:sync –source:appPoolConfig="<SourceSite>",computerName=<SourceServer> -dest :appPoolConfig="<DestSite>",computerName=<DestServer>
Sync remote site to remote site msdeploy –verb:sync –
source:appHostConfig="<SourceSite>",computerName=<SourceServer> –dest :appHostConfig="<DestSite>",computerName=<DestServer>
20
![Page 21: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/21.jpg)
SYNC Sync local package to local site
msdeploy -verb:sync -source:package=<Package> -dest:appHostConfig="<DestSite>"
21
![Page 22: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/22.jpg)
SYNC Sync local package to remote site
msdeploy -verb:sync -source:package=<Package> -dest:appHostConfig="<SourceSite>",computerName=<SourceServer>
22
![Page 23: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/23.jpg)
SYNC Sync local site to local package
msdeploy -verb:sync -source:appHostConfig="<SourceSite>" -dest: package=<Package>
23
![Page 24: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/24.jpg)
SYNC Sync remote site to local package
msdeploy -verb:sync -source:appHostConfig="<SourceSite>",computerName=<SourceServer> -dest: package=<Package>
24
![Page 25: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/25.jpg)
SYNC
25
Backup local site msdeploy.exe -verb:sync -source:backupManager
-dest:backupManager=<DestSite>
![Page 26: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/26.jpg)
SYNC
26
Backup remote site msdeploy.exe -verb:sync -source:backupManager
-dest:backupManager=<DestSite>,computerName=<DestServer>
![Page 27: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/27.jpg)
SYNC
27
Restore local site to specified backup msdeploy.exe -verb:sync -source:backupManager
-dest:backupManager=<DestSite>/<BackupFile>
![Page 28: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/28.jpg)
SYNC
28
Restore remote site to specified backup msdeploy.exe -verb:sync -source:backupManager
-dest:backupManager=<DestSite>/<BackupFile>, computerName=<DestServer>
![Page 29: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/29.jpg)
SYNC
29
Restore local site to last backup msdeploy.exe -verb:sync -source:backupManager
-dest:backupManager=<siteName>,useLatest=true
![Page 30: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/30.jpg)
SYNC
30
Restore remote site to last backup msdeploy.exe -verb:sync -source:backupManager
-dest:backupManager=<siteName>,useLatest=true, computerName=<DestServer>
![Page 31: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/31.jpg)
SYNC
31
Recycle local application msdeploy -verb:sync -source:recycleApp -
dest:recycleApp="<DestApp>"
![Page 32: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/32.jpg)
SYNC
32
Recycle remote application msdeploy -verb:sync -source:recycleApp -
dest:recycleApp="<DestApp>" , computerName=<DestServer>
![Page 33: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/33.jpg)
SYNC
33
Stop local application msdeploy -verb:sync -source:recycleApp -
dest:recycleApp="<DestApp>",recycleMode=" StopAppPool"
![Page 34: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/34.jpg)
SYNC
34
Stop remote app pool msdeploy -verb:sync -source:recycleApp -
dest:recycleApp="<DestApp>",recycleMode=" StopAppPool" , computerName=<DestServer>
![Page 35: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/35.jpg)
SYNC
35
Start local app pool msdeploy -verb:sync -source:recycleApp -
dest:recycleApp="<DestApp>",recycleMode=" StartAppPool"
![Page 36: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/36.jpg)
SYNC
36
Start remote app pool msdeploy -verb:sync -source:recycleApp -
dest:recycleApp="<DestApp>",recycleMode=" StartAppPool" , computerName=<DestServer>
![Page 37: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/37.jpg)
SYNC
37
Stop remote IIS msdeploy -verb:sync -source:runcommand -
dest:runCommand="iisreset /stop",computerName=<DestServer>
![Page 38: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/38.jpg)
SYNC
38
Start remote IIS msdeploy -verb:sync -source:runcommand -
dest:runCommand="iisreset /start",computerName=<DestServer>
![Page 39: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/39.jpg)
SYNC
39
Restart remote IIS msdeploy -verb:sync -source:runcommand -
dest:runCommand="iisreset /restart",waitinterval=15000,computerName=<DestServer>
![Page 40: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/40.jpg)
SYNC
40
Sop site => Sync local package to remote site => Start site msdeploy -verb:sync -
presync:runCommand="%windir%\system32\inetsrv\appcmd.exe stop apppool <DestSite>",successReturnCodes=0,waitinterval=15000,computerName=<DestServer> -source:package=<Package> -dest:appHostConfig="<DestSite>",computerName=<DestServer> -postsync:runCommand="%windir%\system32\inetsrv\appcmd.exe start apppool <DestSite>",successReturnCodes=0,waitinterval=15000,computerName=<DestServer>
![Page 41: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/41.jpg)
SYNC
41
![Page 42: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/42.jpg)
SYNC Sync local package to remote site and exclude
specified file msdeploy -verb:sync -source:package=<Package>
-dest:appHostConfig="<DestSite>",computerName=<DestServer> -skip:objectname='filePath',absolutepath='<FilePath>'
42
![Page 43: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/43.jpg)
DELETE Delete local site
msdeploy –verb:delete –dest:apphostconfig="<DestSite>" –skip:objectname=machineconfig –skip:objectname=rootwebconfig
43
![Page 44: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/44.jpg)
DELETE Delete remote site
msdeploy –verb:delete –dest:apphostconfig="<DestSite>",computerName=<DestServer> –skip:objectname=machineconfig –skip:objectname=rootwebconfig
44
![Page 45: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/45.jpg)
DELETE Delete local app pool
msdeploy –verb:delete –dest: appPoolConfig ="<DestAppPool>"
45
![Page 46: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/46.jpg)
DELETE Delete remote app pool
msdeploy –verb:delete –dest: appPoolConfig ="<DestAppPool>",computerName=<DestServer>
46
![Page 47: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/47.jpg)
DELETE Delete local site content
msdeploy -verb:delete -dest:contentPath=<ContentPath>
47
![Page 48: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/48.jpg)
DELETE Delete remote site content
msdeploy -verb:delete -dest:contentPath=<ContentPath> ,computerName=<DestServer>
48
![Page 49: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/49.jpg)
DELETE Delete local file
msdeploy -verb:delete -dest:filePath="<FilePath>"
49
![Page 50: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/50.jpg)
DELETE Delete remote file
msdeploy -verb:delete -dest:filePath="<FilePath>",computerName=<DestServer>
50
![Page 51: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/51.jpg)
DELETE Delete local application
msdeploy -verb:delete -dest:iisapp="<AppPath>"
51
![Page 52: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/52.jpg)
DELETE Delete remote application
msdeploy -verb:delete -dest:iisapp="<AppPath>",computerName=<DestServer>
52
![Page 53: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/53.jpg)
GETDEPENDENCIES Get local server dependencies
msdeploy -verb:getDependencies -source:webServer
53
![Page 54: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/54.jpg)
GETDEPENDENCIES Get remote server dependencies
msdeploy -verb:getDependencies -source:webServer>",computerName=<SourceServer>
54
![Page 55: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/55.jpg)
GETSYSTEMINFO Get local server system info
msdeploy -verb:getSystemInfo -source:webServer
55
![Page 56: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/56.jpg)
GETSYSTEMINFO Get remote server system info
msdeploy -verb:getSystemInfo -source:webServer >",computerName=<SourceServer>
56
![Page 57: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/57.jpg)
REFERENCE57
![Page 58: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/58.jpg)
REFERENCE Web Deploy Command Line Reference
https://technet.microsoft.com/en-us/library/dd568991(v=ws.10).aspx
58
![Page 59: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/59.jpg)
Q&A59
![Page 60: Web deploy command line](https://reader035.vdocuments.us/reader035/viewer/2022062310/5882267a1a28ab52368b5121/html5/thumbnails/60.jpg)
QUESTION & ANSWER
60