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.