web deploy command line

60
WEB DEPLOY COMMAND LINE Larry Nung

Upload: larry-nung

Post on 20-Jan-2017

118 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: Web deploy command line

WEB DEPLOY COMMAND LINELarry Nung

Page 2: Web deploy command line

AGENDAWeb Deploy Command LineReferenceQ & A

2

Page 3: Web deploy command line

WEB DEPLOY COMMAND LINE3

Page 4: Web deploy command line

PATH C:\Program Files\IIS\Microsoft Web Deploy V3\

4

Page 5: Web deploy command line

SYNTAX msdeploy.exe 

-verb:<verbName>              -source:<provider>[=<pathToProviderObject>                       

[,<providerSetting>=<providerSettingValue>]]              [-dest:<provider>[=<pathToProviderObject>                       

[,<providerSetting>=<providerSettingValue>]]              ]              [-<MSDeployOperationSetting> ...]

5

Page 6: Web deploy command line

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

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

ARGUMENTS -[-<MSDeployOperationSetting> ... ]

Operation settings affect the execution of an entire Web Deploy operation.

8

Page 9: Web deploy command line

PROVIDER SETTINGS authType computerName encryptPassword getCredentials ignoreErrors includeAcls password storeCredentials tempAgent userName wmsvc 9

Page 10: Web deploy command line

OPERATION SETTINGS allowUntrusted appHostConfigDir declareParam declareParamFile dest disableLink disableRule disableSkipDirective enableLink enableRule

10

Page 11: Web deploy command line

OPERATION SETTINGS enableSkipDirective postSync preSync removeParam replace retryAttempts retryInterval setParam setParamFile showSecure skip 11

Page 12: Web deploy command line

OPERATION SETTINGS source unicode useCheckSum verb verbose webServerDir whatif xml xpath

12

Page 13: Web deploy command line

DUMP Dump local server

msdeploy -verb:dump -source:webServer

13

Page 14: Web deploy command line

DUMP Dump remote server

msdeploy -verb:dump -source:webServer,computerName=<DestServer>

14

Page 15: Web deploy command line

DUMP Dump local site

msdeploy -verb:dump -source:appHostConfig="<SourceSite>"

15

Page 16: Web deploy command line

DUMP Dump remote site

msdeploy -verb:dump -source:appHostConfig="<SourceSite>",computerName=<SourceServer>

16

Page 17: Web deploy command line

DUMP

17

Dump local available backups msdeploy.exe -verb:dump -

source:backupManager=<SourceSite>

Page 18: Web deploy command line

DUMP

18

Dump remote available backups msdeploy.exe -verb:dump -

source:backupManager=<SourceSite>,computerName=<DestServer>

Page 19: Web deploy command line

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

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

SYNC Sync local package to local site

msdeploy -verb:sync -source:package=<Package> -dest:appHostConfig="<DestSite>"

21

Page 22: Web deploy command line

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

SYNC Sync local site to local package

msdeploy -verb:sync -source:appHostConfig="<SourceSite>" -dest: package=<Package>

23

Page 24: Web deploy command line

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

SYNC

25

Backup local site msdeploy.exe -verb:sync -source:backupManager

-dest:backupManager=<DestSite>

Page 26: Web deploy command line

SYNC

26

Backup remote site msdeploy.exe -verb:sync -source:backupManager

-dest:backupManager=<DestSite>,computerName=<DestServer>

Page 27: Web deploy command line

SYNC

27

Restore local site to specified backup msdeploy.exe -verb:sync -source:backupManager

-dest:backupManager=<DestSite>/<BackupFile>

Page 28: Web deploy command line

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

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

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

SYNC

31

Recycle local application msdeploy -verb:sync -source:recycleApp -

dest:recycleApp="<DestApp>"

Page 32: Web deploy command line

SYNC

32

Recycle remote application msdeploy -verb:sync -source:recycleApp -

dest:recycleApp="<DestApp>" , computerName=<DestServer>

Page 33: Web deploy command line

SYNC

33

Stop local application msdeploy -verb:sync -source:recycleApp -

dest:recycleApp="<DestApp>",recycleMode=" StopAppPool"

Page 34: Web deploy command line

SYNC

34

Stop remote app pool msdeploy -verb:sync -source:recycleApp -

dest:recycleApp="<DestApp>",recycleMode=" StopAppPool" , computerName=<DestServer>

Page 35: Web deploy command line

SYNC

35

Start local app pool msdeploy -verb:sync -source:recycleApp -

dest:recycleApp="<DestApp>",recycleMode=" StartAppPool"

Page 36: Web deploy command line

SYNC

36

Start remote app pool msdeploy -verb:sync -source:recycleApp -

dest:recycleApp="<DestApp>",recycleMode=" StartAppPool" , computerName=<DestServer>

Page 37: Web deploy command line

SYNC

37

Stop remote IIS msdeploy -verb:sync -source:runcommand -

dest:runCommand="iisreset /stop",computerName=<DestServer>

Page 38: Web deploy command line

SYNC

38

Start remote IIS msdeploy -verb:sync -source:runcommand -

dest:runCommand="iisreset /start",computerName=<DestServer>

Page 39: Web deploy command line

SYNC

39

Restart remote IIS msdeploy -verb:sync -source:runcommand -

dest:runCommand="iisreset /restart",waitinterval=15000,computerName=<DestServer>

Page 40: Web deploy command line

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

SYNC

41

Page 42: Web deploy command line

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

DELETE Delete local site

msdeploy –verb:delete –dest:apphostconfig="<DestSite>" –skip:objectname=machineconfig –skip:objectname=rootwebconfig

43

Page 44: Web deploy command line

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

DELETE Delete local app pool

msdeploy –verb:delete –dest: appPoolConfig ="<DestAppPool>"

45

Page 46: Web deploy command line

DELETE Delete remote app pool

msdeploy –verb:delete –dest: appPoolConfig ="<DestAppPool>",computerName=<DestServer>

46

Page 47: Web deploy command line

DELETE Delete local site content

msdeploy -verb:delete -dest:contentPath=<ContentPath>

47

Page 48: Web deploy command line

DELETE Delete remote site content

msdeploy -verb:delete -dest:contentPath=<ContentPath> ,computerName=<DestServer>

48

Page 49: Web deploy command line

DELETE Delete local file

msdeploy -verb:delete -dest:filePath="<FilePath>"

49

Page 50: Web deploy command line

DELETE Delete remote file

msdeploy -verb:delete -dest:filePath="<FilePath>",computerName=<DestServer>

50

Page 51: Web deploy command line

DELETE Delete local application

msdeploy -verb:delete -dest:iisapp="<AppPath>"

51

Page 52: Web deploy command line

DELETE Delete remote application

msdeploy -verb:delete -dest:iisapp="<AppPath>",computerName=<DestServer>

52

Page 53: Web deploy command line

GETDEPENDENCIES Get local server dependencies

msdeploy -verb:getDependencies -source:webServer

53

Page 54: Web deploy command line

GETDEPENDENCIES Get remote server dependencies

msdeploy -verb:getDependencies -source:webServer>",computerName=<SourceServer>

54

Page 55: Web deploy command line

GETSYSTEMINFO Get local server system info

msdeploy -verb:getSystemInfo -source:webServer

55

Page 56: Web deploy command line

GETSYSTEMINFO Get remote server system info

msdeploy -verb:getSystemInfo -source:webServer >",computerName=<SourceServer>

56

Page 57: Web deploy command line

REFERENCE57

Page 58: Web deploy command line

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

Q&A59

Page 60: Web deploy command line

QUESTION & ANSWER

60