1

I have a PowerShell script that installs IIS & WebDeploy among other things on a Windows Server 2019. I am aware that I can grant permissions to IIS Manager Permissions using:

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Web.Management") [Microsoft.Web.Management.Server.ManagementAuthorization]::Grant($deploymentAccount, $ApplicationName, $false)

Most of the other script uses the newer IISAdministration cmdlets. Is there a newer way of granting the permissions that is a little nicer to read?

dmce
  • 111
  • 4
  • "nicer to read" is subjective. Why the above is not nice to read? – Lex Li Mar 11 '20 at 22:41
  • Fair comment. In comparison to how the newer IIS Administration cmlets are implemented. I guess the question should have been, is there a newer API to achieve the same – dmce Mar 12 '20 at 06:41

0 Answers0