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

kostas.kapasakis
  • 920
  • 1
  • 11
  • 26
  • Upgrading to latest Powershell version might help. See my sample code in [this answer](https://stackoverflow.com/a/56195230/3606250) – drizin May 18 '19 at 01:24

1 Answers1

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.

David Aleu
  • 3,922
  • 3
  • 27
  • 48