Amadevus / pwsh-script

GitHub Action to run PowerShell scripts in a rich, prepared scope - inspired by actions/github-script.
MIT License
46 stars 8 forks source link

Is it possible to execute PowerShell as an admin? #20

Open carlspring opened 1 year ago

carlspring commented 1 year ago

Hi,

I need to run some PowerShell commands as an admin. Is this possible? We're running on our own Github Actions Runners.

Kind regards,

Martin

amis92 commented 1 year ago

I don't think this action impacts your issue in any way.

As far as Actions docs say, there should be no problem to do so:

I'd also like to point out, if you just want to run PowerShell scripts and not interact with GitHub Actions further, you might be better off just using the shell: pwsh: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell