2

I am using a bat file which is inside a folder with my zip file

my bat file contains

"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy" - source:package="Release_2060.zip" -setParam:'IIS Web Application Name'='MyappsName' -dest:auto -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -skip:objectName=dirPath,absolutePath="Config/*"

I am executing the file as a administrator and i keep getting this error

Unrecognized argument 'IIS Web Application Name'

Any ideas?Thanks

1
  • Upgrading to latest Powershell version might help. See my sample code in this answer Commented May 18, 2019 at 1:24

1 Answer 1

3

I've had the same issue and for me escaping the quotes did the trick. Also you can try using "value" instead like this:

 -setParam:name=`"IIS Web Application Name`",value=MyappsName

In my case I'm using Powershell, so to escape the quotes I used ` but for a batch file I believe is \ so this might work for you:

"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy" -source:package="Release_2060.zip" -setParam:\"IIS Web Application Name\",value="MyappsName" -dest:auto -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -skip:objectName=dirPath,absolutePath="Config/*"

Hope this helps and is not too late.

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.