Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change hard coded execution policy in power shell task #15254

Open
fhanggi opened this issue Sep 3, 2021 · 10 comments
Open

Change hard coded execution policy in power shell task #15254

fhanggi opened this issue Sep 3, 2021 · 10 comments
Labels
Area: ABTT Akvelon Build Tasks Team area of work question Task: PowerShell

Comments

@fhanggi
Copy link

fhanggi commented Sep 3, 2021

Question, Bug, or Feature?
Type: Question

Enter Task Name: PowerShellV2

Environment

  • Server - Azure Pipelines or TFS on-premises? TFS on premises

    • If using TFS on-premises, provide the version: 2019
  • Agent - Hosted or Private: Private

Issue Description

We have a need to move all of our powershell scripts to a different server than the build server. We want to execute them from that new server. The script path is set to this
\builddev\Shared\PowerShell\COVReactInstall.ps1

We are getting UnauthorizedAccess errors now .
We found out that the issue is that this powershell task hard codes the execution policy to Unrestricted

$arguments = "-NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "$executionOperator '$($filePath.Replace("'", "''"))'""

We would like to change it to ByPass.
How can this be done? We didn't see a way to pass in powershell arguments to this task

Thank you
Fabian

@github-actions github-actions bot added Area: ABTT Akvelon Build Tasks Team area of work question Task: PowerShell triage labels Sep 3, 2021
@WenceyWang
Copy link

Is there any progress on this issue? or should I submit a pr to add the inputs?

@anatolybolshakov
Copy link
Contributor

Hi @WenceyWang sorry for the delay - we are currently working on more prioritized tickets at the moment, but will get back to this one once be able to. Yes, feel free to submit the PR if you would like to contribute, thanks!

@github-actions
Copy link

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

@github-actions github-actions bot added the stale label Aug 31, 2022
@fhanggi
Copy link
Author

fhanggi commented Aug 31, 2022

Currently we had to deploy all of our powershell scripts to all build servers as a workaround.

If we could have an update on this it would be nice.

@github-actions github-actions bot removed the stale label Aug 31, 2022
@github-actions
Copy link

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

@github-actions github-actions bot added the stale label Feb 27, 2023
@fhanggi
Copy link
Author

fhanggi commented Feb 27, 2023

Currently we had to deploy all of our powershell scripts to all build servers as a workaround.

If we could have an update on this it would be nice.

@github-actions github-actions bot removed the stale label Feb 28, 2023
@github-actions
Copy link

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

@github-actions github-actions bot added the stale label Aug 27, 2023
@WenceyWang
Copy link

If we could have an update on this it would be nice.

@github-actions github-actions bot removed the stale label Aug 27, 2023
Copy link

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

@github-actions github-actions bot added the stale label Feb 23, 2024
@fhanggi
Copy link
Author

fhanggi commented Feb 23, 2024

Can we have an update please?

@github-actions github-actions bot removed the stale label Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: ABTT Akvelon Build Tasks Team area of work question Task: PowerShell
Projects
None yet
Development

No branches or pull requests

3 participants