microsoft / azure-pipelines-extensions

Collection of all RM and deployment extensions
http://www.visualstudio.com/explore/release-management-vs
MIT License
275 stars 425 forks source link

Set App Pool -> recycling.logEventOnRecycle not working using additional appcmd.exe commands #1198

Open xgigiotto opened 9 months ago

xgigiotto commented 9 months ago

Hello,

I'm trying to set the logEventOnRecycle property of my IIS App Pool into my YAML Pipeline as for the snippet here below:

- task: IISWebAppMgmt@3
  displayName: 'Create Web Site'
  inputs:
    machinesList: ...
    AdminUserName: ...
    AdminPassword: ...
    WinRMProtocol: 'Http'
    IISDeploymentType: 'IISWebsite'
    ActionIISWebsite: 'CreateOrUpdateWebsite'
    WebsiteName: ...
    WebsitePhysicalPath: ...
    WebsitePhysicalPathAuth: 'WebsiteUserPassThrough'
    AddBinding: true
    CreateOrUpdateAppPoolForWebsite: true
    Protocol: 'http'
    IPAddress: 'All Unassigned'
    Port: ...
    AppPoolNameForWebsite: ...
    DotNetVersionForWebsite: 'v4.0'
    PipeLineModeForWebsite: 'Integrated'
    AppPoolIdentityForWebsite: 'SpecificUser'
    AppPoolUsernameForWebsite: MyAppPool
    AppPoolPasswordForWebsite: ...
    AppCmdCommands: >
      set apppool MyAppPool
      /processModel.idleTimeout:00:00:00
      /recycling.periodicRestart.time:00:00:00
      /recycling.periodicRestart.privateMemory:2097152
      /recycling.logEventOnRecycle:Time,Requests
      /cpu.limit:80000
      /cpu.resetInterval:00:05:00
      /cpu.action:Throttle

Applying more than 1 value (e.g.: /recycling.logEventOnRecycle:Time,Requests) I'm receiving the following error message running the task: ##[error]Detected characters in arguments that may not be executed correctly by the shell. Please escape special characters using backtick (`). More information is available here: <https://aka.ms/ado/75787> Applying only 1 value, the task works fine.

I've tried different ways to escape the "comma", which I guess could be the issue, but without success. Do you have any idea on how to fix it?

Thank you in advance.