microsoft / azure-pipelines-tasks

Tasks for Azure Pipelines
https://aka.ms/tfbuild
MIT License
3.5k stars 2.61k forks source link

PowerShellOnTargetMachines@3 sets $VerbosePreference to 'Continue' #17792

Open stijnherreman opened 1 year ago

stijnherreman commented 1 year ago

Required Information

Type: Bug

Task Name: PowerShellOnTargetMachines

Environment

Issue Description

The task sets $VerbosePreference to "Continue", resulting in a lot of output.

https://github.com/microsoft/azure-pipelines-tasks/blob/111c0838a89dc009f135bdf051700fe013876379/Tasks/Common/RemoteDeployer/RunPowerShellScriptJob.ps1#L116

As a workaround, you have to reset it to the expected default value of "SilentlyContinue" as per the PowerShell documentation

Presumably the preference was set during development of the task, and then unintentionally made it to the PR #6789.

github-actions[bot] commented 1 year ago

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

stijnherreman commented 1 year ago

This issue still exists in the latest version.

github-actions[bot] commented 9 months ago

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

stijnherreman commented 9 months ago

This issue still exists in the latest version.