IISReset Permision Access Denied Error

Arjun Goel (DevOn) 0 Reputation points
2023-09-06T18:41:38.6366667+00:00

Hi Microsoft, I have created a CI/CD pipeline to deploy a basic .NET APPLICATION to IIS server using GitHub Actions. The GitHub Actions is a self-hosted windows runner configured on AWS EC2 Windows Instance. But at the time of deploying it to IIS it is throwing me this error getting here: https://github.com/arjungoel/my-web-app/actions/runs/6100622873

Windows development | Internet Information Services
Windows for business | Windows Server | User experience | Other
Developer technologies | .NET | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Lex Li (Microsoft) 6,037 Reputation points Microsoft Employee
    2023-09-07T03:28:11.06+00:00

    When you install GitHub Actions agent on a Windows machine, you must choose to run it under a powerful enough account (such as LOCAL SYSTEM) so that almost all necessary actions like calling iisreset can work.

    "Copy-Item can't be recognised as internal or external command" is a different thing and it often indicates you wrote the wrong commands in your workflow file and attempted to call PowerShell cmdlets when the actual context isn't PowerShell.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.