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 powershell command Get-ChildItem Cert:\LocalMachine\My fails with the following error:
Get-ChildItem : Cannot find drive. A drive with the name 'Cert' does not exist.
I have this command in a setup script our team runs, where we create a self signed certificate. After adding a step to downgrade to powershell 7.2.x, the issue is no longer present.
Platforms affected
Azure DevOps
GitHub Actions - Standard Runners
GitHub Actions - Larger Runners
Runner images affected
Ubuntu 20.04
Ubuntu 22.04
macOS 11
macOS 12
macOS 13
macOS 13 Arm64
macOS 14
macOS 14 Arm64
Windows Server 2019
Windows Server 2022
Image version and build link
I am seeing the issue on image 20240128.1.0
I do not have a public example but I am internal to microsoft - reach out internally if the logs would be helpful.
Is it regression?
20240122.1.0
Expected behavior
I expect that when calling 'Get-ChildItem' within the 'Cert:/' drive to not throw an exception. Typically Cert:/ drive is created by default on Windows installation with the Microsoft.PowerShell.Security module.
Actual behavior
The powershell command Get-ChildItem Cert:\LocalMachine\My fails with the following error:
Get-ChildItem : Cannot find drive. A drive with the name 'Cert' does not exist.
This caused our setup script to fail, thus causing our test validations to fail. Needed to add the downgrade mitigation listed here to mitigate the issue: #9115
Repro steps
This was run within a AzureCLI@2 task, not a powershell task. Our task is defined like this:
where the npm command will invoke a setup powershell script. Within this powershell script we use the powershell command Get-ChildItem Cert:\LocalMachine\My to check for existing certificates. This script fails due to the exception, failing the task.
The text was updated successfully, but these errors were encountered:
Hello @msft-erzhan!
The issue was caused by updating the PowerShell version. Please find details in the related announcement.
To mitigate the issue, please downgrade PowerShell version in runtime:
Description
The powershell command
Get-ChildItem Cert:\LocalMachine\My
fails with the following error:Get-ChildItem : Cannot find drive. A drive with the name 'Cert' does not exist.
I have this command in a setup script our team runs, where we create a self signed certificate. After adding a step to downgrade to powershell 7.2.x, the issue is no longer present.
Platforms affected
Runner images affected
Image version and build link
I am seeing the issue on image 20240128.1.0
I do not have a public example but I am internal to microsoft - reach out internally if the logs would be helpful.
Is it regression?
20240122.1.0
Expected behavior
I expect that when calling 'Get-ChildItem' within the 'Cert:/' drive to not throw an exception. Typically Cert:/ drive is created by default on Windows installation with the Microsoft.PowerShell.Security module.
Actual behavior
The powershell command
Get-ChildItem Cert:\LocalMachine\My
fails with the following error:Get-ChildItem : Cannot find drive. A drive with the name 'Cert' does not exist.
This caused our setup script to fail, thus causing our test validations to fail. Needed to add the downgrade mitigation listed here to mitigate the issue: #9115
Repro steps
This was run within a AzureCLI@2 task, not a powershell task. Our task is defined like this:
where the npm command will invoke a setup powershell script. Within this powershell script we use the powershell command
Get-ChildItem Cert:\LocalMachine\My
to check for existing certificates. This script fails due to the exception, failing the task.The text was updated successfully, but these errors were encountered: