jackazjimmy
jackazjimmy

Reputation: 53

Getting Error import-module : Process should have elevated status to access IIS configuration data

`name: DEEEEDeploy to Development Environment on: push: branches: - master pull_request: branches: - PrepRod env:

AZURE_DEVWEBAPP_NAME: GitAc-Dev AZURE_PREPRODWEBAPP_NAME: GitAc-PreProd AZURE_WEBAPP_PACKAGE_PATH: 'D:\a\GitNewTest2\GitNewTest2\GitNewTest2\bin' jobs: Build: runs-on: windows-latest steps: - uses: actions/checkout@v2

- name: Setup MSBuild
  uses: microsoft/setup-msbuild@v1

- name: Setup NuGet
  uses: NuGet/[email protected]

- name: Restore NuGet packages
  run: nuget restore GitNewTest2/GitNewTest2.sln

- name: build
  run: |
       msbuild GitNewTest2/GitNewTest2.sln /t:Build /p:Configuration=Release /p:Platform="Any CPU" /verbosity:minimal
- name: publish
  run: |
       msbuild GitNewTest2/GitNewTest2.sln /t:Publish /p:Configuration=Release /p:Platform="Any CPU" /p:PublishDir="./artifacts"

`

Above I shared my github workflow code , I have tried with command RunAs , then tried editing registry policy as well. Stil I see the same error . Any help would be greate.

Upvotes: 0

Views: 2061

Answers (1)

Khaled Helwane
Khaled Helwane

Reputation: 54

I am using self hosted GitHub action and this happens to me:

I was struggling with this as I have this error when I am trying to make the pool sleep and then start it and the privilege causes it

Run Stop-WebAppPool -Name "DotNetTesting"
Process should have elevated status to access IIS configuration data.
stop-webitem : Cannot find drive. A drive with the name 'IIS' does not exist.

I solved it by going to the action runner and trying to run "run.cmd" as an administrator and solved.

Upvotes: 0

Related Questions