You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The script "images/windows/scripts/build/Install-PowershellAzModules.ps1" downloads the powershell Az modules to c:\modules. At the end of the script, it should add c:\modules to the psmodulepath. This doesn't happen and the modules are not available to powershell. If you try and find them in a pipeline (Get-module az* -listavailable) or use them, it doesn't find them.
Actually looking at this, it only adds it to the path if it has something specified "default" in the toolset json. So how do these get added to the path? 🤷♂️ I can't see any files that reference "C:\Modules" that are not related to either saving the Az module to this folder or testing that they are there.
Description
The script "images/windows/scripts/build/Install-PowershellAzModules.ps1" downloads the powershell Az modules to c:\modules. At the end of the script, it should add c:\modules to the psmodulepath. This doesn't happen and the modules are not available to powershell. If you try and find them in a pipeline (Get-module az* -listavailable) or use them, it doesn't find them.
Platforms affected
Runner images affected
Image version and build link
Built from git tag : win25/20250303.1
Starting: Initialize job
Agent name: 'Agent1'
Agent machine name: 'Server1'
Current agent version: '4.251.0'
Current image version: 'dev'
Agent running as: 'Server1$'
Prepare build directory.
Set build variables.
Download all required tasks.
Checking job knob settings.
Knob: DockerActionRetries = true Source: $(VSTSAGENT_DOCKER_ACTION_RETRIES)
Knob: AgentToolsDirectory = C:\hostedtoolcache\windows Source: ${AGENT_TOOLSDIRECTORY}
Knob: UseGitLongPaths = true Source: $(USE_GIT_LONG_PATHS)
Knob: EnableIssueSourceValidation = true Source: $(ENABLE_ISSUE_SOURCE_VALIDATION)
Knob: AgentEnablePipelineArtifactLargeChunkSize = true Source: $(AGENT_ENABLE_PIPELINEARTIFACT_LARGE_CHUNK_SIZE)
Knob: ContinueAfterCancelProcessTreeKillAttempt = true Source: $(VSTSAGENT_CONTINUE_AFTER_CANCEL_PROCESSTREEKILL_ATTEMPT)
Knob: ProcessHandlerSecureArguments = false Source: $(AZP_75787_ENABLE_NEW_LOGIC)
Knob: ProcessHandlerSecureArguments = false Source: $(AZP_75787_ENABLE_NEW_LOGIC_LOG)
Knob: ProcessHandlerTelemetry = true Source: $(AZP_75787_ENABLE_COLLECT)
Knob: UseNewNodeHandlerTelemetry = True Source: $(DistributedTask.Agent.USENEWNODEHANDLERTELEMETRY)
Knob: ProcessHandlerEnableNewLogic = true Source: $(AZP_75787_ENABLE_NEW_PH_LOGIC)
Knob: EnableResourceMonitorDebugOutput = true Source: $(AZP_ENABLE_RESOURCE_MONITOR_DEBUG_OUTPUT)
Knob: EnableResourceUtilizationWarnings = true Source: $(AZP_ENABLE_RESOURCE_UTILIZATION_WARNINGS)
Knob: IgnoreVSTSTaskLib = true Source: $(AZP_AGENT_IGNORE_VSTSTASKLIB)
Knob: FailJobWhenAgentDies = true Source: $(FAIL_JOB_WHEN_AGENT_DIES)
Knob: CheckForTaskDeprecation = true Source: $(AZP_AGENT_CHECK_FOR_TASK_DEPRECATION)
Knob: CheckIfTaskNodeRunnerIsDeprecated246 = True Source: $(DistributedTask.Agent.CheckIfTaskNodeRunnerIsDeprecated246)
Knob: UseNode20ToStartContainer = True Source: $(DistributedTask.Agent.UseNode20ToStartContainer)
Knob: LogTaskNameInUserAgent = true Source: $(AZP_AGENT_LOG_TASKNAME_IN_USERAGENT)
Knob: UseFetchFilterInCheckoutTask = true Source: $(AGENT_USE_FETCH_FILTER_IN_CHECKOUT_TASK)
Knob: Rosetta2Warning = true Source: $(ROSETTA2_WARNING)
Knob: AddForceCredentialsToGitCheckout = True Source: $(DistributedTask.Agent.AddForceCredentialsToGitCheckout)
Finished checking job knob settings.
Start tracking orphan processes.
Finishing: Initialize job
Is it regression?
i don't know
Expected behavior
The Az Modules in c:\modules should be added to the psmodulespath at the machine scope
Actual behavior
The Az Modules in c:\modules are not added to the psmodulespath at the machine scope
Repro steps
Create a build agent image from the the git tag win25/20250303.1
Deploy the image as a vm
try and access the Az modules natively in powershell
The text was updated successfully, but these errors were encountered: