diff --git a/builder/actions/setup_cross_ci_crt_environment.py b/builder/actions/setup_cross_ci_crt_environment.py index cb4c9c2bd..259e70974 100644 --- a/builder/actions/setup_cross_ci_crt_environment.py +++ b/builder/actions/setup_cross_ci_crt_environment.py @@ -14,9 +14,8 @@ environment variables, secrets, files, etc. that is used to build up the testing environment. """ -# TODO: The variable is used to disable the windows certificate store test to unblock a CI failure. -# The variable should be set to TRUE after the CI is fixed. -ENABLE_WINDOWS_CERT_STORE_TEST = False +# Enable windows certificate store test +ENABLE_WINDOWS_CERT_STORE_TEST = True class SetupCrossCICrtEnvironment(Action): diff --git a/builder/actions/setup_cross_ci_helpers.py b/builder/actions/setup_cross_ci_helpers.py index 968426028..1c0230684 100644 --- a/builder/actions/setup_cross_ci_helpers.py +++ b/builder/actions/setup_cross_ci_helpers.py @@ -23,6 +23,10 @@ def create_windows_cert_store(env, certificate_env, location_env): # Import the PFX into the Windows Certificate Store # (Passing '$mypwd' is required even though it is empty and our certificate has no password. It fails CI otherwise) import_pfx_arguments = [ + # Powershell 7.3 introduced an issue where launching powershell from cmd would not set PSModulePath correctly. + # As a workaround, we set `PSModulePath` to empty so powershell would automatically reset the PSModulePath to default. + # More details: https://github.com/PowerShell/PowerShell/issues/18530 + "$env:PSModulePath = '';", "Import-PfxCertificate", "-FilePath", pfx_cert_path, "-CertStoreLocation", windows_certificate_folder]