microsoft / azure-pipelines-tasks

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

[BUG]: AzureFileCopy@5 crashed with "The term 'New-AzStorageContext' is not recognized as the name of a cmdlet .." #19546

Open florinbuda85 opened 7 months ago

florinbuda85 commented 7 months ago

New issue checklist

Task name

AzureFileCopy@5

Task version

5.234.0

Issue Description

Ussing the following code:

I only managed to get the following error:

[error]The term 'New-AzStorageContext' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Environment type (Please select at least one enviroment where you face this issue)

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Windows Server

Relevant log output

Import-Module -Name C:\Users\abcdabcd\Documents\WindowsPowerShell\Modules\Az.Resources\1.9.0\Az.Resources.psd1 -Global
Disconnect-AzAccount -Scope Process -ErrorAction Stop
Clear-AzContext -Scope Process -ErrorAction Stop
##[error]The term 'New-AzStorageContext' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Finishing: AzureFileCopy

Full task logs with system.debug enabled

 [REPLACE THIS WITH YOUR INFORMATION] 

Repro steps

No response

tranhungtbb commented 4 months ago

I also encountered the same situation :(

tazamyinsight commented 3 months ago

I also encountered the same error

abhinab22mohanty commented 2 months ago

Also facing the same issue with AzureFileCopy@6

tazamyinsight commented 2 months ago

Also facing the same issue with AzureFileCopy@6

The fix is mentioned in https://github.com/Azure/Azure-Sentinel/issues/10525

rmmason commented 3 weeks ago

Also facing the same problem. How is everyone working around this?

tazamyinsight commented 3 weeks ago

The fix is mentioned in Azure/Azure-Sentinel#10525