1

I'm banging my head on this one. So want to migrate our entire IIS 6 server (dozens of sites) over to a brand new IIS 7 server using the Web Deploy tool in powershell... Here is what I've tried:

.\msdeploy -verb=sync -source=webserver=computername=$oldserver -dest=webserver=computername=$newserver

And I'm getting: Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes copied)

Am I missing something here?

1 Answer 1

1

It doesn't work because you have spaces in you command. This should work

$MSDEPLOY_EXE = "${env:ProgramFiles}\IIS\Microsoft Web Deploy V3\msdeploy.exe"
&($MSDEPLOY_EXE) -verb:sync -source:webserver=computername=$oldserver -dest:webserver=computername=$newserver

I realize that the instructions are to replace a : with a = in Powershell but that is not correct in all cases. When you use the & sign you can call msdeploy as you would in the command prompt.

See here for more information How do you call msdeploy from powershell when the parameters have spaces?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.