PowerShell: "The variable '$elapsed' cannot be retrieved because it has not been set."
@theJasonHelmick ya está trabajando en esto.
Desde el 9/3/2023.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
When I now log in to Azure Cloud Shell using PowerShell I get this error:
InvalidOperation: /opt/microsoft/powershell/7/profile.ps1:268
Line |
268 | if($elapsed -gt '1000')
| ~~~~~~~~
| The variable '$elapsed' cannot be retrieved because it has not been set.
here's what is happening:

The profile file /opt/microsoft/powershell/7/profile.ps1 is part of the Azure Cloud Shell.
I have Set-StrictMode -Version latest in my PowerShell profile. If I remove this the error goes away.
I think the default for Azure Cloud Shell PowerShell should use strict mode to catch unnecessary issues.
- Lenguaje dominante
- PowerShell
- Estrellas
- 273
- Forks
- 116
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Azure/CloudShell
-
Blood TestAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 5/100
Azure/CloudShell#654 · 2 comentarios ·
-
bug Triage-needed
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
Azure/CloudShell#653 ·
-
bug Triage-needed
Dificultad 4/5 3-5 días Aptitud para principiantes 22/100
Azure/CloudShell#649 · 2 comentarios ·
-
[BUG] Bash session falls back to ephemeral (“Failed to mount the Azure file share”) after $HOME image is attached; intermittent across 5 file shares, 3 storage accounts, 2 subscriptionsPosiblemente ocupada @priyaananthasankar la tomó hace 21 días. Abiertobug
Azure/CloudShell#648 · 1 comentario · 1 asignado ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
Azure/CloudShell#611 · 5 comentarios · 1 reacción ·