microsoft / azure-pipelines-tasks

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

[REGRESSION]: AzurePowerShell stopped working with 'Resolve-Error' not recognized. #20581

Open a60915 opened 3 weeks ago

a60915 commented 3 weeks ago

New issue checklist

Task name

AzurePowerShell

Breaking task version

5.247.5

Last working task version

5.246.1

Regression Description

Attempting to run an inline script using AzurePowerShell generates the following error message:

An error occurred in Initialize-AzModule
##[error]The term 'Resolve-Error' 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.
##[error]PowerShell exited with code '1'.
Finishing: Download from Azure

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 2019 Datacenter

Relevant log output

An error occurred in Initialize-AzModule

[error]The term 'Resolve-Error' 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.

[error]PowerShell exited with code '1'.

Finishing: Download from Azure

Full task logs with system.debug enabled

UNSUCCESSFUL RUN
 [REPLACE THIS WITH YOUR INFORMATION] 
SUCCESSFUL RUN
 [REPLACE THIS WITH YOUR INFORMATION] 

Repro steps

No response

v-schhabra commented 3 weeks ago

Hi @a60915 Could you pls share the complete pipeline debug logs by adding variable system.debug to "true"? Please share the pipeline configuration as well.

v-schhabra commented 3 weeks ago

Just wanted to update that error is not reproducible at our end.

a60915 commented 3 weeks ago

@v-schhabra Here's the requested debug logs:

2024-10-22T12:22:27.2441176Z ##[debug]Evaluating condition for step: 'Download from Azure'
2024-10-22T12:22:27.2442669Z ##[debug]Evaluating: SucceededNode()
2024-10-22T12:22:27.2443030Z ##[debug]Evaluating SucceededNode:
2024-10-22T12:22:27.2443556Z ##[debug]=> True
2024-10-22T12:22:27.2444002Z ##[debug]Result: True
2024-10-22T12:22:27.2444384Z ##[section]Starting: Download from Azure
2024-10-22T12:22:27.2603344Z ==============================================================================
2024-10-22T12:22:27.2603571Z Task         : Azure PowerShell
2024-10-22T12:22:27.2603678Z Description  : Run a PowerShell script within an Azure environment
2024-10-22T12:22:27.2603839Z Version      : 5.247.5
2024-10-22T12:22:27.2603939Z Author       : Microsoft Corporation
2024-10-22T12:22:27.2604049Z Help         : https://aka.ms/azurepowershelltroubleshooting
2024-10-22T12:22:27.2604190Z ==============================================================================
2024-10-22T12:22:28.0733852Z ##[debug]VstsTaskSdk 0.20.1 commit ab885244acac2b6da000c01e13bcbcb47eb3e76d
2024-10-22T12:22:28.3044693Z ##[debug]Entering E:\agents\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.247.5\azurepowershell.ps1.
2024-10-22T12:22:28.3124277Z ##[debug]Loading resource strings from: E:\agents\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.247.5\Task.json
2024-10-22T12:22:28.3333574Z ##[debug]Loaded 9 strings.
2024-10-22T12:22:28.3396186Z ##[debug]SYSTEM_CULTURE: 'en-US'
2024-10-22T12:22:28.3423766Z ##[debug]Loading resource strings from: E:\agents\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.247.5\Strings\resources.resjson\en-US\resources.resjson
2024-10-22T12:22:28.3589111Z ##[debug]Loaded 9 strings.
2024-10-22T12:22:28.3760535Z ##[debug]INPUT_SCRIPTTYPE: 'inlineScript'
2024-10-22T12:22:28.3800979Z ##[debug]INPUT_SCRIPTPATH: 'E:\agents\_work\6\s'
2024-10-22T12:22:28.3838588Z ##[debug]INPUT_INLINE: 'Write-Host "Downloading file from Azure..."
2024-10-22T12:22:28.3856281Z ##[debug]
2024-10-22T12:22:28.3871100Z ##[debug]# Get the storage account
2024-10-22T12:22:28.3886078Z ##[debug]$storageContext = New-AzStorageContext -StorageAccountName "prodwbint1file1" -StorageAccountKey "***"
2024-10-22T12:22:28.3899294Z ##[debug]
2024-10-22T12:22:28.3912522Z ##[debug]# Get the file
2024-10-22T12:22:28.3930715Z ##[debug]Get-AzStorageBlobContent -Container "dealerupload" -Blob "businessdirectoryxml.xml" -Destination ".\" -Context $storageContext -Force'
2024-10-22T12:22:28.3968886Z ##[debug]INPUT_SCRIPTARGUMENTS (empty)
2024-10-22T12:22:28.4023580Z ##[debug]INPUT_ERRORACTIONPREFERENCE: 'stop'
2024-10-22T12:22:28.4056203Z ##[debug]INPUT_FAILONSTANDARDERROR: 'false'
2024-10-22T12:22:28.4104625Z ##[debug] Converted to bool: False
2024-10-22T12:22:28.4136855Z ##[debug]INPUT_TARGETAZUREPS: 'latestVersion'
2024-10-22T12:22:28.4165472Z ##[debug]INPUT_CUSTOMTARGETAZUREPS (empty)
2024-10-22T12:22:28.4193682Z ##[debug]INPUT_PWSH: 'false'
2024-10-22T12:22:28.4215718Z ##[debug] Converted to bool: False
2024-10-22T12:22:28.4243725Z ##[debug]INPUT_WORKINGDIRECTORY: 'E:\agents\_work\_temp'
2024-10-22T12:22:28.4271778Z ##[debug]INPUT_VALIDATESCRIPTSIGNATURE: 'false'
2024-10-22T12:22:28.4294626Z ##[debug] Converted to bool: False
2024-10-22T12:22:28.4906253Z ##[debug]Module path not present as expected in hosted agent, skipping step to make module available.
2024-10-22T12:22:28.5138636Z ##[debug]Processed: ##vso[telemetry.publish area=TaskHub;feature=AzurePowerShellV5]{"targetAzurePs":"","moduleSource":"privateAgent"}
2024-10-22T12:22:28.5139444Z ##[debug]INPUT_CONNECTEDSERVICENAMEARM: '5c750595-1da1-4f04-8283-44520c8f3d24'
2024-10-22T12:22:28.5160965Z ##[debug]ENDPOINT_URL_5c750595-1da1-4f04-8283-44520c8f3d24: 'https://management.azure.com/'
2024-10-22T12:22:28.5199058Z ##[debug]ENDPOINT_AUTH_5c750595-1da1-4f04-8283-44520c8f3d24: '********'
2024-10-22T12:22:28.5239888Z ##[debug]ENDPOINT_DATA_5c750595-1da1-4f04-8283-44520c8f3d24: '{"environment":"AzureCloud","scopeLevel":"Subscription","subscriptionId":"b1d0a737-c7a4-4dc8-9c57-5998e83d3905","subscriptionName":"Production - ARM","creationMode":"Manual","azureSpnRoleAssignmentId":"90d59b67-9118-48f4-b1a3-c9ede13fb3fd","azureSpnPermissions":"[{\"roleAssignmentId\":\"90d59b67-9118-48f4-b1a3-c9ede13fb3fd\",\"resourceProvider\":\"Microsoft.RoleAssignment\",\"provisioned\":true}]","environmentUrl":"https://management.azure.com/","galleryUrl":"https://gallery.azure.com/","serviceManagementUrl":"https://management.core.windows.net/","resourceManagerUrl":"https://management.azure.com/","activeDirectoryAuthority":"https://login.microsoftonline.com/","environmentAuthorityUrl":"https://login.windows.net/","microsoftGraphUrl":"https://graph.microsoft.com/","managementPortalUrl":"https://manage.windowsazure.com/","armManagementPortalUrl":"https://portal.azure.com/","activeDirectoryServiceEndpointResourceId":"https://management.core.windows.net/","sqlDatabaseDnsSuffix":".database.windows.net","AzureKeyVaultDnsSuffix":"vault.azure.net","AzureKeyVaultServiceEndpointResourceId":"https://vault.azure.net","StorageEndpointSuffix":"core.windows.net","EnableAdfsAuthentication":"false"}'
2024-10-22T12:22:28.5644907Z ##[debug]ENDPOINT_URL_SystemVssConnection: 'https://dev.azure.com/andersencorp/'
2024-10-22T12:22:28.5689344Z ##[debug]ENDPOINT_AUTH_SystemVssConnection: '********'
2024-10-22T12:22:28.5704907Z ##[debug]ENDPOINT_DATA_SystemVssConnection (empty)
2024-10-22T12:22:28.5793904Z Generating script.
2024-10-22T12:22:28.6115851Z ##[debug]Asserting leaf path exists: 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe'
2024-10-22T12:22:28.6133137Z ========================== Starting Command Output ===========================
2024-10-22T12:22:28.6260841Z ##[debug]Entering Invoke-VstsTool.
2024-10-22T12:22:28.6340686Z ##[debug] Arguments: '-NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'E:\agents\_work\_temp\d94bec52-d64c-4da9-9c4f-76b99561a81b.ps1'"'
2024-10-22T12:22:28.6398296Z ##[debug] FileName: 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe'
2024-10-22T12:22:28.6459827Z ##[debug] WorkingDirectory: 'E:\agents\_work\_temp'
2024-10-22T12:22:28.6476348Z ##[command]"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'E:\agents\_work\_temp\d94bec52-d64c-4da9-9c4f-76b99561a81b.ps1'"
2024-10-22T12:22:28.8877055Z VERBOSE: Loading module from path 
2024-10-22T12:22:28.8877508Z 'E:\agents\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.247.5\ps_modules\VstsTaskSdk\VstsTaskSdk
2024-10-22T12:22:28.8877849Z .psd1'.
2024-10-22T12:22:28.8919068Z VERBOSE: Loading module from path 
2024-10-22T12:22:28.8919445Z 'E:\agents\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.247.5\ps_modules\VstsTaskSdk\VstsTaskSdk
2024-10-22T12:22:28.8919779Z .psm1'.
2024-10-22T12:22:28.9529623Z VERBOSE: NonInteractive: True
2024-10-22T12:22:28.9535612Z VERBOSE: Loading compiled helper 
2024-10-22T12:22:28.9536009Z E:\agents\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.247.5\ps_modules\VstsTaskSdk\VstsTaskSdk.
2024-10-22T12:22:28.9536567Z dll.
2024-10-22T12:22:29.0243316Z VERBOSE: Exporting function 'Find-Match'.
2024-10-22T12:22:29.0247868Z VERBOSE: Exporting function 'New-FindOptions'.
2024-10-22T12:22:29.0252536Z VERBOSE: Exporting function 'New-MatchOptions'.
2024-10-22T12:22:29.0256905Z VERBOSE: Exporting function 'Select-Match'.
2024-10-22T12:22:29.0264044Z VERBOSE: Exporting function 'Get-Endpoint'.
2024-10-22T12:22:29.0268429Z VERBOSE: Exporting function 'Get-SecureFileTicket'.
2024-10-22T12:22:29.0272856Z VERBOSE: Exporting function 'Get-SecureFileName'.
2024-10-22T12:22:29.0277445Z VERBOSE: Exporting function 'Get-Input'.
2024-10-22T12:22:29.0282071Z VERBOSE: Exporting function 'Get-TaskVariable'.
2024-10-22T12:22:29.0286850Z VERBOSE: Exporting function 'Get-TaskVariableInfo'.
2024-10-22T12:22:29.0291295Z VERBOSE: Exporting function 'Set-TaskVariable'.
2024-10-22T12:22:29.0295936Z VERBOSE: Exporting function 'Get-PipelineFeature'.
2024-10-22T12:22:29.0301406Z VERBOSE: Exporting function 'Find-Files'.
2024-10-22T12:22:29.0307026Z VERBOSE: Exporting function 'Get-LocString'.
2024-10-22T12:22:29.0311596Z VERBOSE: Exporting function 'Import-LocStrings'.
2024-10-22T12:22:29.0315925Z VERBOSE: Exporting function 'Write-AddAttachment'.
2024-10-22T12:22:29.0320734Z VERBOSE: Exporting function 'Write-UploadSummary'.
2024-10-22T12:22:29.0325419Z VERBOSE: Exporting function 'Write-SetEndpoint'.
2024-10-22T12:22:29.0330040Z VERBOSE: Exporting function 'Write-AddBuildTag'.
2024-10-22T12:22:29.0334768Z VERBOSE: Exporting function 'Write-AssociateArtifact'.
2024-10-22T12:22:29.0339298Z VERBOSE: Exporting function 'Write-LogDetail'.
2024-10-22T12:22:29.0343778Z VERBOSE: Exporting function 'Write-SetProgress'.
2024-10-22T12:22:29.0348314Z VERBOSE: Exporting function 'Write-SetResult'.
2024-10-22T12:22:29.0352785Z VERBOSE: Exporting function 'Write-SetSecret'.
2024-10-22T12:22:29.0357346Z VERBOSE: Exporting function 'Write-SetVariable'.
2024-10-22T12:22:29.0361947Z VERBOSE: Exporting function 'Write-TaskDebug'.
2024-10-22T12:22:29.0366471Z VERBOSE: Exporting function 'Write-TaskError'.
2024-10-22T12:22:29.0371148Z VERBOSE: Exporting function 'Write-TaskVerbose'.
2024-10-22T12:22:29.0375723Z VERBOSE: Exporting function 'Write-TaskWarning'.
2024-10-22T12:22:29.0380433Z VERBOSE: Exporting function 'Write-UploadFile'.
2024-10-22T12:22:29.0385111Z VERBOSE: Exporting function 'Write-PrependPath'.
2024-10-22T12:22:29.0390620Z VERBOSE: Exporting function 'Write-UpdateBuildNumber'.
2024-10-22T12:22:29.0396428Z VERBOSE: Exporting function 'Write-UploadArtifact'.
2024-10-22T12:22:29.0401912Z VERBOSE: Exporting function 'Write-UploadBuildLog'.
2024-10-22T12:22:29.0406424Z VERBOSE: Exporting function 'Write-UpdateReleaseName'.
2024-10-22T12:22:29.0411634Z VERBOSE: Exporting function 'Write-LoggingCommand'.
2024-10-22T12:22:29.0417868Z VERBOSE: Exporting function 'Get-AssemblyReference'.
2024-10-22T12:22:29.0422554Z VERBOSE: Exporting function 'Get-TfsClientCredentials'.
2024-10-22T12:22:29.0427103Z VERBOSE: Exporting function 'Get-TfsService'.
2024-10-22T12:22:29.0431856Z VERBOSE: Exporting function 'Get-VssCredentials'.
2024-10-22T12:22:29.0436372Z VERBOSE: Exporting function 'Get-VssHttpClient'.
2024-10-22T12:22:29.0441202Z VERBOSE: Exporting function 'Get-WebProxy'.
2024-10-22T12:22:29.0446433Z VERBOSE: Exporting function 'Get-ClientCertificate'.
2024-10-22T12:22:29.0651818Z VERBOSE: Exporting function 'Assert-Agent'.
2024-10-22T12:22:29.0657475Z VERBOSE: Exporting function 'Assert-Path'.
2024-10-22T12:22:29.0663660Z VERBOSE: Exporting function 'Invoke-Tool'.
2024-10-22T12:22:29.0669139Z VERBOSE: Exporting function 'Invoke-Process'.
2024-10-22T12:22:29.0674636Z VERBOSE: Exporting function 'Trace-EnteringInvocation'.
2024-10-22T12:22:29.0680024Z VERBOSE: Exporting function 'Trace-LeavingInvocation'.
2024-10-22T12:22:29.0685453Z VERBOSE: Exporting function 'Trace-Path'.
2024-10-22T12:22:29.0690867Z VERBOSE: Exporting function 'Out-Default'.
2024-10-22T12:22:29.0702172Z VERBOSE: Exporting variable 'IssueSources'.
2024-10-22T12:22:29.1881300Z ##[debug]Loading resource strings from: E:\agents\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.247.5\ps_modules\VstsTaskSdk\lib.json
2024-10-22T12:22:29.2302372Z ##[debug]Loaded 16 strings.
2024-10-22T12:22:29.2730255Z ##[debug]SYSTEM_CULTURE: 'en-US'
2024-10-22T12:22:29.2794442Z ##[debug]Loading resource strings from: E:\agents\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.247.5\ps_modules\VstsTaskSdk\Strings\resources.resjson\en-US\resources.resjson
2024-10-22T12:22:29.3086181Z ##[debug]Loaded 16 strings.
2024-10-22T12:22:29.3138037Z ##[debug]Importing the module 'Microsoft.PowerShell.Security'.
2024-10-22T12:22:29.3192952Z ##[debug]Loading module from path 'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Security\Microsoft.PowerShell.Security.psd1'.
2024-10-22T12:22:29.3319995Z ##[debug]Importing cmdlet 'Get-Acl'.
2024-10-22T12:22:29.3347485Z ##[debug]Importing cmdlet 'Set-Acl'.
2024-10-22T12:22:29.3372846Z ##[debug]Importing cmdlet 'Get-Credential'.
2024-10-22T12:22:29.3392345Z ##[debug]Importing cmdlet 'Get-ExecutionPolicy'.
2024-10-22T12:22:29.3411814Z ##[debug]Importing cmdlet 'Set-ExecutionPolicy'.
2024-10-22T12:22:29.3431746Z ##[debug]Importing cmdlet 'ConvertFrom-SecureString'.
2024-10-22T12:22:29.3450471Z ##[debug]Importing cmdlet 'ConvertTo-SecureString'.
2024-10-22T12:22:29.3470057Z ##[debug]Importing cmdlet 'Get-AuthenticodeSignature'.
2024-10-22T12:22:29.3489495Z ##[debug]Importing cmdlet 'Set-AuthenticodeSignature'.
2024-10-22T12:22:29.3508276Z ##[debug]Importing cmdlet 'New-FileCatalog'.
2024-10-22T12:22:29.3528390Z ##[debug]Importing cmdlet 'Test-FileCatalog'.
2024-10-22T12:22:29.3548004Z ##[debug]Importing cmdlet 'Get-PfxCertificate'.
2024-10-22T12:22:29.3566954Z ##[debug]Importing cmdlet 'Protect-CmsMessage'.
2024-10-22T12:22:29.3586562Z ##[debug]Importing cmdlet 'Get-CmsMessage'.
2024-10-22T12:22:29.3605972Z ##[debug]Importing cmdlet 'Unprotect-CmsMessage'.
2024-10-22T12:22:29.3625697Z ##[debug]Exporting cmdlet 'Get-Acl'.
2024-10-22T12:22:29.3644827Z ##[debug]Exporting cmdlet 'Set-Acl'.
2024-10-22T12:22:29.3664558Z ##[debug]Exporting cmdlet 'Get-Credential'.
2024-10-22T12:22:29.3685205Z ##[debug]Exporting cmdlet 'Get-ExecutionPolicy'.
2024-10-22T12:22:29.3703892Z ##[debug]Exporting cmdlet 'Set-ExecutionPolicy'.
2024-10-22T12:22:29.3723548Z ##[debug]Exporting cmdlet 'ConvertFrom-SecureString'.
2024-10-22T12:22:29.3742698Z ##[debug]Exporting cmdlet 'ConvertTo-SecureString'.
2024-10-22T12:22:29.3761546Z ##[debug]Exporting cmdlet 'Get-AuthenticodeSignature'.
2024-10-22T12:22:29.3780831Z ##[debug]Exporting cmdlet 'Set-AuthenticodeSignature'.
2024-10-22T12:22:29.3800041Z ##[debug]Exporting cmdlet 'New-FileCatalog'.
2024-10-22T12:22:29.4326778Z ##[debug]Exporting cmdlet 'Test-FileCatalog'.
2024-10-22T12:22:29.4350227Z ##[debug]Exporting cmdlet 'Get-PfxCertificate'.
2024-10-22T12:22:29.4375071Z ##[debug]Exporting cmdlet 'Protect-CmsMessage'.
2024-10-22T12:22:29.4398106Z ##[debug]Exporting cmdlet 'Get-CmsMessage'.
2024-10-22T12:22:29.4421484Z ##[debug]Exporting cmdlet 'Unprotect-CmsMessage'.
2024-10-22T12:22:29.4449127Z ##[debug]Importing cmdlet 'ConvertFrom-SecureString'.
2024-10-22T12:22:29.4473468Z ##[debug]Importing cmdlet 'ConvertTo-SecureString'.
2024-10-22T12:22:29.4496667Z ##[debug]Importing cmdlet 'Get-Acl'.
2024-10-22T12:22:29.4518799Z ##[debug]Importing cmdlet 'Get-AuthenticodeSignature'.
2024-10-22T12:22:29.4540580Z ##[debug]Importing cmdlet 'Get-CmsMessage'.
2024-10-22T12:22:29.4558172Z ##[debug]Importing cmdlet 'Get-Credential'.
2024-10-22T12:22:29.4577481Z ##[debug]Importing cmdlet 'Get-ExecutionPolicy'.
2024-10-22T12:22:29.4596985Z ##[debug]Importing cmdlet 'Get-PfxCertificate'.
2024-10-22T12:22:29.4615271Z ##[debug]Importing cmdlet 'New-FileCatalog'.
2024-10-22T12:22:29.4645138Z ##[debug]Importing cmdlet 'Protect-CmsMessage'.
2024-10-22T12:22:29.4666688Z ##[debug]Importing cmdlet 'Set-Acl'.
2024-10-22T12:22:29.4683425Z ##[debug]Importing cmdlet 'Set-AuthenticodeSignature'.
2024-10-22T12:22:29.4706158Z ##[debug]Importing cmdlet 'Set-ExecutionPolicy'.
2024-10-22T12:22:29.4725784Z ##[debug]Importing cmdlet 'Test-FileCatalog'.
2024-10-22T12:22:29.4742688Z ##[debug]Importing cmdlet 'Unprotect-CmsMessage'.
2024-10-22T12:22:29.4790513Z VERBOSE: Importing function 'Assert-VstsAgent'.
2024-10-22T12:22:29.4794001Z VERBOSE: Importing function 'Assert-VstsPath'.
2024-10-22T12:22:29.4797349Z VERBOSE: Importing function 'Find-VstsFiles'.
2024-10-22T12:22:29.4801254Z VERBOSE: Importing function 'Find-VstsMatch'.
2024-10-22T12:22:29.4805010Z VERBOSE: Importing function 'Get-VstsAssemblyReference'.
2024-10-22T12:22:29.4808285Z VERBOSE: Importing function 'Get-VstsClientCertificate'.
2024-10-22T12:22:29.4812102Z VERBOSE: Importing function 'Get-VstsEndpoint'.
2024-10-22T12:22:29.4815745Z VERBOSE: Importing function 'Get-VstsInput'.
2024-10-22T12:22:29.4819140Z VERBOSE: Importing function 'Get-VstsLocString'.
2024-10-22T12:22:29.4822844Z VERBOSE: Importing function 'Get-VstsPipelineFeature'.
2024-10-22T12:22:29.4826438Z VERBOSE: Importing function 'Get-VstsSecureFileName'.
2024-10-22T12:22:29.4830204Z VERBOSE: Importing function 'Get-VstsSecureFileTicket'.
2024-10-22T12:22:29.4833790Z VERBOSE: Importing function 'Get-VstsTaskVariable'.
2024-10-22T12:22:29.4837415Z VERBOSE: Importing function 'Get-VstsTaskVariableInfo'.
2024-10-22T12:22:29.4841046Z VERBOSE: Importing function 'Get-VstsTfsClientCredentials'.
2024-10-22T12:22:29.4844263Z VERBOSE: Importing function 'Get-VstsTfsService'.
2024-10-22T12:22:29.4847942Z VERBOSE: Importing function 'Get-VstsVssCredentials'.
2024-10-22T12:22:29.4851684Z VERBOSE: Importing function 'Get-VstsVssHttpClient'.
2024-10-22T12:22:29.4855040Z VERBOSE: Importing function 'Get-VstsWebProxy'.
2024-10-22T12:22:29.4858734Z VERBOSE: Importing function 'Import-VstsLocStrings'.
2024-10-22T12:22:29.4862356Z VERBOSE: Importing function 'Invoke-VstsProcess'.
2024-10-22T12:22:29.4866093Z VERBOSE: Importing function 'Invoke-VstsTool'.
2024-10-22T12:22:29.4869326Z VERBOSE: Importing function 'New-VstsFindOptions'.
2024-10-22T12:22:29.4873103Z VERBOSE: Importing function 'New-VstsMatchOptions'.
2024-10-22T12:22:29.4876853Z VERBOSE: Importing function 'Out-VstsDefault'.
2024-10-22T12:22:29.4880253Z VERBOSE: Importing function 'Select-VstsMatch'.
2024-10-22T12:22:29.4883521Z VERBOSE: Importing function 'Set-VstsTaskVariable'.
2024-10-22T12:22:29.4887236Z VERBOSE: Importing function 'Trace-VstsEnteringInvocation'.
2024-10-22T12:22:29.4890626Z VERBOSE: Importing function 'Trace-VstsLeavingInvocation'.
2024-10-22T12:22:29.4894313Z VERBOSE: Importing function 'Trace-VstsPath'.
2024-10-22T12:22:29.4897942Z VERBOSE: Importing function 'Write-VstsAddAttachment'.
2024-10-22T12:22:29.4901682Z VERBOSE: Importing function 'Write-VstsAddBuildTag'.
2024-10-22T12:22:29.4905354Z VERBOSE: Importing function 'Write-VstsAssociateArtifact'.
2024-10-22T12:22:29.4908950Z VERBOSE: Importing function 'Write-VstsLogDetail'.
2024-10-22T12:22:29.4912542Z VERBOSE: Importing function 'Write-VstsLoggingCommand'.
2024-10-22T12:22:29.4916259Z VERBOSE: Importing function 'Write-VstsPrependPath'.
2024-10-22T12:22:29.4920366Z VERBOSE: Importing function 'Write-VstsSetEndpoint'.
2024-10-22T12:22:29.4924571Z VERBOSE: Importing function 'Write-VstsSetProgress'.
2024-10-22T12:22:29.4928493Z VERBOSE: Importing function 'Write-VstsSetResult'.
2024-10-22T12:22:29.4932438Z VERBOSE: Importing function 'Write-VstsSetSecret'.
2024-10-22T12:22:29.4936279Z VERBOSE: Importing function 'Write-VstsSetVariable'.
2024-10-22T12:22:29.4940065Z VERBOSE: Importing function 'Write-VstsTaskDebug'.
2024-10-22T12:22:29.4943634Z VERBOSE: Importing function 'Write-VstsTaskError'.
2024-10-22T12:22:29.4947344Z VERBOSE: Importing function 'Write-VstsTaskVerbose'.
2024-10-22T12:22:29.4951110Z VERBOSE: Importing function 'Write-VstsTaskWarning'.
2024-10-22T12:22:29.4954709Z VERBOSE: Importing function 'Write-VstsUpdateBuildNumber'.
2024-10-22T12:22:29.4958401Z VERBOSE: Importing function 'Write-VstsUpdateReleaseName'.
2024-10-22T12:22:29.4961989Z VERBOSE: Importing function 'Write-VstsUploadArtifact'.
2024-10-22T12:22:29.4965575Z VERBOSE: Importing function 'Write-VstsUploadBuildLog'.
2024-10-22T12:22:29.4969216Z VERBOSE: Importing function 'Write-VstsUploadFile'.
2024-10-22T12:22:29.4972935Z VERBOSE: Importing function 'Write-VstsUploadSummary'.
2024-10-22T12:22:29.4976768Z VERBOSE: Importing variable 'IssueSources'.
2024-10-22T12:22:29.4986825Z VERBOSE: Loading resource strings from: 
2024-10-22T12:22:29.4987974Z E:\agents\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.247.5\task.json
2024-10-22T12:22:29.5181227Z VERBOSE: Loaded 9 strings.
2024-10-22T12:22:29.5197498Z VERBOSE: SYSTEM_CULTURE: 'en-US'
2024-10-22T12:22:29.5206264Z VERBOSE: Loading resource strings from: 
2024-10-22T12:22:29.5206713Z E:\agents\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.247.5\Strings\resources.resjson\en-US\res
2024-10-22T12:22:29.5208019Z ources.resjson
2024-10-22T12:22:29.5398196Z VERBOSE: Loaded 9 strings.
2024-10-22T12:22:29.5532438Z VERBOSE: C:\Modules\azurerm_2.1.0 is not present in C:\Program 
2024-10-22T12:22:29.5532931Z Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\Microsoft 
2024-10-22T12:22:29.5533332Z Monitoring Agent\Agent\PowerShell\;C:\Program Files\Microsoft Monitoring Agent\Agent\AzureAutomation\7.3.1840.0
2024-10-22T12:22:29.5541871Z VERBOSE: C:\\Modules\azurerm_2.1.0 is not present in C:\Program 
2024-10-22T12:22:29.5542404Z Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\Microsoft 
2024-10-22T12:22:29.5542990Z Monitoring Agent\Agent\PowerShell\;C:\Program Files\Microsoft Monitoring Agent\Agent\AzureAutomation\7.3.1840.0
2024-10-22T12:22:29.5550549Z VERBOSE: C:\Modules\azure_2.1.0 is not present in C:\Program 
2024-10-22T12:22:29.5550935Z Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\Microsoft 
2024-10-22T12:22:29.5551487Z Monitoring Agent\Agent\PowerShell\;C:\Program Files\Microsoft Monitoring Agent\Agent\AzureAutomation\7.3.1840.0
2024-10-22T12:22:29.5559898Z VERBOSE: C:\\Modules\azure_2.1.0 is not present in C:\Program 
2024-10-22T12:22:29.5560258Z Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\Microsoft 
2024-10-22T12:22:29.5560752Z Monitoring Agent\Agent\PowerShell\;C:\Program Files\Microsoft Monitoring Agent\Agent\AzureAutomation\7.3.1840.0
2024-10-22T12:22:29.5744469Z VERBOSE: The updated value of the PSModulePath is: C:\Program 
2024-10-22T12:22:29.5745107Z Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\Microsoft 
2024-10-22T12:22:29.5746707Z Monitoring Agent\Agent\PowerShell\;C:\Program Files\Microsoft Monitoring Agent\Agent\AzureAutomation\7.3.1840.0
2024-10-22T12:22:29.5758138Z VERBOSE: Loading module from path 
2024-10-22T12:22:29.5758519Z 'E:\agents\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.247.5\ps_modules\VstsAzureHelpers_\VstsA
2024-10-22T12:22:29.5758972Z zureHelpers_.psm1'.
2024-10-22T12:22:29.6102897Z VERBOSE: Loading resource strings from: 
2024-10-22T12:22:29.6103429Z E:\agents\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.247.5\ps_modules\VstsAzureHelpers_/module
2024-10-22T12:22:29.6104096Z .json
2024-10-22T12:22:29.6383558Z VERBOSE: Loaded 19 strings.
2024-10-22T12:22:29.6400076Z VERBOSE: SYSTEM_CULTURE: 'en-US'
2024-10-22T12:22:29.6411793Z VERBOSE: Loading resource strings from: 
2024-10-22T12:22:29.6412257Z E:\agents\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.247.5\ps_modules\VstsAzureHelpers_\String
2024-10-22T12:22:29.6412984Z s\resources.resjson\en-US\resources.resjson
2024-10-22T12:22:29.6679796Z VERBOSE: Loaded 19 strings.
2024-10-22T12:22:29.6818292Z VERBOSE: Entering Get-VstsWebProxy.
2024-10-22T12:22:29.6938626Z VERBOSE: AGENT_VERSION: '3.220.5'
2024-10-22T12:22:29.6997578Z VERBOSE: AGENT_PROXYURL (empty)
2024-10-22T12:22:29.7068024Z VERBOSE: AGENT_PROXYUSERNAME (empty)
2024-10-22T12:22:29.7103162Z VERBOSE: AGENT_PROXYPASSWORD (empty)
2024-10-22T12:22:29.7142586Z VERBOSE: AGENT_PROXYBYPASSLIST (empty)
2024-10-22T12:22:29.7189005Z VERBOSE: Leaving Get-VstsWebProxy.
2024-10-22T12:22:29.7215291Z VERBOSE: Loading module from path 
2024-10-22T12:22:29.7215566Z 'E:\agents\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.247.5\ps_modules\TlsHelper_\TlsHelper_.p
2024-10-22T12:22:29.7215915Z sm1'.
2024-10-22T12:22:29.7447799Z VERBOSE: Loading resource strings from: 
2024-10-22T12:22:29.7448915Z E:\agents\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.247.5\ps_modules\TlsHelper_/module.json
2024-10-22T12:22:29.7512110Z VERBOSE: Loaded 3 strings.
2024-10-22T12:22:29.7528856Z VERBOSE: SYSTEM_CULTURE: 'en-US'
2024-10-22T12:22:29.7540238Z VERBOSE: Loading resource strings from: 
2024-10-22T12:22:29.7540512Z E:\agents\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.247.5\ps_modules\TlsHelper_\Strings\resou
2024-10-22T12:22:29.7541657Z rces.resjson\en-US\resources.resjson
2024-10-22T12:22:29.7604419Z VERBOSE: Loaded 3 strings.
2024-10-22T12:22:29.7611526Z VERBOSE: Exporting function 'Add-Tls12InSession'.
2024-10-22T12:22:29.7618304Z VERBOSE: Exporting function 'Assert-TlsError'.
2024-10-22T12:22:29.7625904Z VERBOSE: Importing function 'Add-Tls12InSession'.
2024-10-22T12:22:29.7631386Z VERBOSE: Importing function 'Assert-TlsError'.
2024-10-22T12:22:29.7837820Z VERBOSE: TLS 1.2 already present in session.
2024-10-22T12:22:29.9022166Z VERBOSE: Exporting function 'Initialize-Azure'.
2024-10-22T12:22:29.9029255Z VERBOSE: Exporting function 'CmdletHasMember'.
2024-10-22T12:22:29.9036071Z VERBOSE: Exporting function 'Remove-EndpointSecrets'.
2024-10-22T12:22:29.9042773Z VERBOSE: Exporting function 'Initialize-AzModule'.
2024-10-22T12:22:29.9048773Z VERBOSE: Exporting function 'Disconnect-AzureAndClearContext'.
2024-10-22T12:22:29.9055129Z VERBOSE: Exporting function 'Update-PSModulePathForHostedAgentWithLatestModule'.
2024-10-22T12:22:29.9062459Z VERBOSE: Importing function 'CmdletHasMember'.
2024-10-22T12:22:29.9067080Z VERBOSE: Importing function 'Disconnect-AzureAndClearContext'.
2024-10-22T12:22:29.9071773Z VERBOSE: Importing function 'Initialize-AzModule'.
2024-10-22T12:22:29.9076136Z VERBOSE: Importing function 'Initialize-Azure'.
2024-10-22T12:22:29.9080630Z VERBOSE: Importing function 'Remove-EndpointSecrets'.
2024-10-22T12:22:29.9085055Z VERBOSE: Importing function 'Update-PSModulePathForHostedAgentWithLatestModule'.
2024-10-22T12:22:29.9379499Z VERBOSE: Entering Initialize-AzModule.
2024-10-22T12:22:29.9461117Z VERBOSE:  Endpoint: '@{Url=https://management.azure.com/; Data=; Auth=}'
2024-10-22T12:22:29.9467047Z VERBOSE:  connectedServiceNameARM: '5c750595-1da1-4f04-8283-44520c8f3d24'
2024-10-22T12:22:29.9473788Z VERBOSE:  azVersion: ''
2024-10-22T12:22:29.9480417Z VERBOSE:  isPSCore: 'False'
2024-10-22T12:22:29.9507350Z VERBOSE:  encryptedToken: 'System.Security.SecureString'
2024-10-22T12:22:29.9515529Z VERBOSE: Env:PSModulePath: 'C:\Program 
2024-10-22T12:22:29.9515936Z Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\Microsoft 
2024-10-22T12:22:29.9516598Z Monitoring Agent\Agent\PowerShell\;C:\Program Files\Microsoft Monitoring Agent\Agent\AzureAutomation\7.3.1840.0'
2024-10-22T12:22:29.9523532Z VERBOSE: Importing Az Modules.
2024-10-22T12:22:29.9558081Z VERBOSE: Entering Import-AzAccountsModule.
2024-10-22T12:22:29.9564497Z VERBOSE:  azVersion: ''
2024-10-22T12:22:29.9574308Z VERBOSE: Attempting to find the module 'Az.Accounts' from the module path.
2024-10-22T12:22:29.9766483Z VERBOSE: No module found with name: Az.Accounts
2024-10-22T12:22:29.9805514Z VERBOSE: Leaving Import-AzAccountsModule.
2024-10-22T12:22:29.9832905Z VERBOSE: Leaving Initialize-AzModule.
2024-10-22T12:22:29.9846099Z An error occurred in Initialize-AzModule
2024-10-22T12:22:30.0103619Z ##[debug]Error record:
2024-10-22T12:22:30.1321865Z ##[debug]E:\agents\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.247.5\CoreAz.ps1 : The term 'Resolve-Error' 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.
2024-10-22T12:22:30.1334445Z ##[debug]At E:\agents\_work\_temp\d94bec52-d64c-4da9-9c4f-76b99561a81b.ps1:3 char:1
2024-10-22T12:22:30.1349588Z ##[debug]+ . 'E:\agents\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f84 ...
2024-10-22T12:22:30.1362832Z ##[debug]+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2024-10-22T12:22:30.1379752Z ##[debug]    + CategoryInfo          : ObjectNotFound: (Resolve-Error:String) [CoreAz.ps1], CommandNotFoundException
2024-10-22T12:22:30.1393195Z ##[debug]    + FullyQualifiedErrorId : CommandNotFoundException,CoreAz.ps1
2024-10-22T12:22:30.1405911Z ##[debug] 
2024-10-22T12:22:30.1431956Z ##[debug]Script stack trace:
2024-10-22T12:22:30.1469082Z ##[debug]at <ScriptBlock>, E:\agents\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.247.5\CoreAz.ps1: line 38
2024-10-22T12:22:30.1482112Z ##[debug]at <ScriptBlock>, E:\agents\_work\_temp\d94bec52-d64c-4da9-9c4f-76b99561a81b.ps1: line 3
2024-10-22T12:22:30.1499484Z ##[debug]at <ScriptBlock>, <No file>: line 1
2024-10-22T12:22:30.1531456Z ##[debug]Exception:
2024-10-22T12:22:30.1582948Z ##[debug]System.Management.Automation.CommandNotFoundException: The term 'Resolve-Error' 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.
2024-10-22T12:22:30.1596794Z ##[debug]   at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
2024-10-22T12:22:30.1609826Z ##[debug]   at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
2024-10-22T12:22:30.1622811Z ##[debug]   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
2024-10-22T12:22:30.1635403Z ##[debug]   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
2024-10-22T12:22:30.1648645Z ##[debug]   at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
2024-10-22T12:22:30.1661801Z ##[debug]   at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
2024-10-22T12:22:30.2173445Z ##[debug]   at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
2024-10-22T12:22:30.2187111Z ##[debug]   at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
2024-10-22T12:22:30.2198690Z ##[debug]   at System.Management.Automation.CommandProcessorBase.Complete()
2024-10-22T12:22:30.2414708Z ##[error]The term 'Resolve-Error' 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.
2024-10-22T12:22:30.2494002Z ##[debug]Processed: ##vso[task.logissue source=TaskInternal;type=error]The term 'Resolve-Error' 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.
2024-10-22T12:22:30.3220263Z ##[debug]Exit code: 1
2024-10-22T12:22:30.3256015Z ##[debug]Leaving Invoke-VstsTool.
2024-10-22T12:22:30.3463886Z ##[error]PowerShell exited with code '1'.
2024-10-22T12:22:30.3464463Z ##[debug]Processed: ##vso[task.logissue source=TaskInternal;type=error]PowerShell exited with code '1'.
2024-10-22T12:22:30.3519556Z ##[debug]Processed: ##vso[task.complete result=Failed]Error detected
2024-10-22T12:22:30.3571053Z ##[debug]Loading module from path 'E:\agents\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.247.5\ps_modules\VstsAzureHelpers_\VstsAzureHelpers_.psm1'.
2024-10-22T12:22:30.3688363Z ##[debug]$OVERRIDING $global:DebugPreference from 'Continue' to 'SilentlyContinue'.
2024-10-22T12:22:30.3712292Z ##[debug]Loading resource strings from: E:\agents\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.247.5\ps_modules\VstsAzureHelpers_/module.json
2024-10-22T12:22:30.3980409Z ##[debug]Loaded 19 strings.
2024-10-22T12:22:30.4008787Z ##[debug]SYSTEM_CULTURE: 'en-US'
2024-10-22T12:22:30.4032287Z ##[debug]Loading resource strings from: E:\agents\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.247.5\ps_modules\VstsAzureHelpers_\Strings\resources.resjson\en-US\resources.resjson
2024-10-22T12:22:30.4302232Z ##[debug]Loaded 19 strings.
2024-10-22T12:22:30.4343272Z ##[debug]Entering Get-VstsWebProxy.
2024-10-22T12:22:30.4434475Z ##[debug]AGENT_VERSION: '3.220.5'
2024-10-22T12:22:30.4504846Z ##[debug]AGENT_PROXYURL (empty)
2024-10-22T12:22:30.4550101Z ##[debug]AGENT_PROXYUSERNAME (empty)
2024-10-22T12:22:30.4594862Z ##[debug]AGENT_PROXYPASSWORD (empty)
2024-10-22T12:22:30.4642535Z ##[debug]AGENT_PROXYBYPASSLIST (empty)
2024-10-22T12:22:30.4691176Z ##[debug]Leaving Get-VstsWebProxy.
2024-10-22T12:22:30.4729493Z ##[debug]Loading module from path 'E:\agents\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.247.5\ps_modules\TlsHelper_\TlsHelper_.psm1'.
2024-10-22T12:22:30.4823447Z ##[debug]Loading resource strings from: E:\agents\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.247.5\ps_modules\TlsHelper_/module.json
2024-10-22T12:22:30.4894744Z ##[debug]Loaded 3 strings.
2024-10-22T12:22:30.4923800Z ##[debug]SYSTEM_CULTURE: 'en-US'
2024-10-22T12:22:30.4947321Z ##[debug]Loading resource strings from: E:\agents\_work\_tasks\AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62\5.247.5\ps_modules\TlsHelper_\Strings\resources.resjson\en-US\resources.resjson
2024-10-22T12:22:30.5019985Z ##[debug]Loaded 3 strings.
2024-10-22T12:22:30.5039038Z ##[debug]Exporting function 'Add-Tls12InSession'.
2024-10-22T12:22:30.5057255Z ##[debug]Exporting function 'Assert-TlsError'.
2024-10-22T12:22:30.5077140Z ##[debug]Importing function 'Add-Tls12InSession'.
2024-10-22T12:22:30.5094720Z ##[debug]Importing function 'Assert-TlsError'.
2024-10-22T12:22:30.5310795Z ##[debug]TLS 1.2 already present in session.
2024-10-22T12:22:30.5602822Z ##[debug]Exporting function 'Initialize-Azure'.
2024-10-22T12:22:30.5621660Z ##[debug]Exporting function 'CmdletHasMember'.
2024-10-22T12:22:30.5640206Z ##[debug]Exporting function 'Remove-EndpointSecrets'.
2024-10-22T12:22:30.5658561Z ##[debug]Exporting function 'Initialize-AzModule'.
2024-10-22T12:22:30.5676559Z ##[debug]Exporting function 'Disconnect-AzureAndClearContext'.
2024-10-22T12:22:30.5694316Z ##[debug]Exporting function 'Update-PSModulePathForHostedAgentWithLatestModule'.
2024-10-22T12:22:30.5714918Z ##[debug]Importing function 'CmdletHasMember'.
2024-10-22T12:22:30.5732323Z ##[debug]Importing function 'Disconnect-AzureAndClearContext'.
2024-10-22T12:22:30.5749552Z ##[debug]Importing function 'Initialize-AzModule'.
2024-10-22T12:22:30.5767101Z ##[debug]Importing function 'Initialize-Azure'.
2024-10-22T12:22:30.5784287Z ##[debug]Importing function 'Remove-EndpointSecrets'.
2024-10-22T12:22:30.5801357Z ##[debug]Importing function 'Update-PSModulePathForHostedAgentWithLatestModule'.
2024-10-22T12:22:30.5930413Z ##[debug]The updated value of the PSModulePath is: C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\Microsoft Monitoring Agent\Agent\PowerShell\;C:\Program Files\Microsoft Monitoring Agent\Agent\AzureAutomation\7.3.1840.0
2024-10-22T12:22:30.5969906Z ##[debug]Trying to disconnect from Azure and clear context at process scope
2024-10-22T12:22:30.6403605Z ##[section]Finishing: Download from Azure
v-schhabra commented 3 weeks ago

@a60915 Thanks for sharing the logs. Could you pls share the inline script as well?

a60915 commented 3 weeks ago

@v-schhabra Here you go:

Write-Host "Downloading file from Azure..."

# Get the storage account
$storageContext = New-AzStorageContext -StorageAccountName "prodwbint1file1" -StorageAccountKey "$(StorageAccount.prodwbint1file1.AccessKey)"

# Get the file
Get-AzStorageBlobContent -Container "dealerupload" -Blob "businessdirectoryxml.xml" -Destination ".\" -Context $storageContext -Force
v-schhabra commented 3 weeks ago

@a60915 Did you configured a new agent or any changes you did recently?

a60915 commented 3 weeks ago

@v-schhabra No, nothing changed on the agent. I did see there was a recent change to the task, adding the call to Resolve-Error (#20528 by @onetocny) . I'm guessing this is in a module that isn't installed by default, but you are relying on it being there.

v-schhabra commented 3 weeks ago

@a60915 Could you pls tell which PowerShell version you are using?

a60915 commented 3 weeks ago

@v-schhabra

Name                           Value
----                           -----
PSVersion                      5.1.17763.6414
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17763.6414
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1