Open joandrsn opened 2 weeks ago
I have tried turning that on in our release pipeline, but it leads to error:
2024-09-04T10:53:35.1795744Z [33;1mWARNING: Proxy creation has been skipped for the following command: 'ConvertFrom-SecureString, ConvertTo-SecureString, Get-Acl, Get-AuthenticodeSignature, Get-CmsMessage, Get-Credential, Get-ExecutionPolicy, Get-PfxCertificate, New-FileCatalog, Protect-CmsMessage, Set-Acl, Set-AuthenticodeSignature, Set-ExecutionPolicy, Test-FileCatalog, Unprotect-CmsMessage', because it would shadow an existing local command. Use the AllowClobber parameter if you want to shadow existing local commands.[0m
2024-09-04T10:53:35.3599517Z ##[error]Failed to generate proxies for remote module 'Microsoft.PowerShell.Security'. No command proxies have been created, because all of the requested remote commands would shadow existing local commands. Use the AllowClobber parameter if you want to shadow existing local commands.
I am without a doubt missing a beat or two, but I don't know which one(s).
Forgive my ignorance in this area, but is there something specific we need to change on our Azure VM agent server? I have been using the PowerShell Core boolean, but that led to the errors above, as did changing the startup load order.
Does anyone know the steps we need to take to migrate this to PS7?
As I understand it, to use PowerShell 7 with AlOps tasks, we need to set the pwsh flag (despite the documentation stating
# Run task in Powershell Core. $(pwsh)
, which is no longer accurate).Microsoft has announced that the PowerShell 5 module will be deprecated in BC26.
This means we need to update all AlOps tasks to use PowerShell 7 by adding the
pwsh: true
setting to each task.Questions:
I understand that there are challenges involved, particularly in ensuring that this change doesn't disrupt builds for customers using versions earlier than BC24.