Description
Issue Description
Invoking Test-DscConfiguration does not return value when invoked for the first time in session in Powershell Integrated Console and also a few seconds afterwards.
The functionality is restored after several seconds after first Test-DscConfiguration call but the initial queries are already faulty..
Here is the screenshot of the behavior: https://gyazo.com/4e3696d65e3e0de34cb2cdf6a9680bf6
No faults when used in regular VS Code terminal, ISE, or directly invoking the .EXE
I was able to replicate the issue on a freshly installed VM both W10 1909 and WS 2016 1909 + VS Code 1.49 and Powershell Extension 2020.6.0 for PS versions 5.1 and 7.0.3
EDIT1: Additional information
- Saving to a variable does not provide result: https://gyazo.com/8564392a43a0fb6d977da0cb5d14cef1
- Invoking with -Verbose works consistently, might be related why i can not reproduce with Diagnostic log mode: https://gyazo.com/eceda3d54e84ce2ca9076f5269a3a321
- Invoking with -Verbose and redirecting verbose output does not work as workaround: https://gyazo.com/f82b2db98a2b81d37821b543a1cf3d0e
EDIT2: Additional information
I have added additional behaviour examples in posts below.
Workaround
I added following configuration to avoid using Integrated console:
- "powershell.integratedConsole.showOnStartup": false
- "terminal.integrated.shell.windows": "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe"
or - "terminal.integrated.shell.windows": "C:\Program Files\PowerShell\7\pwsh.exe"
Attached Logs
The issue not occuring with Diagnostics mode for some reason :(
Environment Information
Visual Studio Code
Name | Version |
---|---|
Operating System | Windows_NT x64 10.0.18363 |
VSCode | 1.49.0 |
PowerShell Extension Version | 2020.6.0 |
PowerShell Information
Name | Value |
---|---|
PSVersion | 7.0.3 |
PSEdition | Core |
GitCommitId | 7.0.3 |
OS | Microsoft Windows 10.0.18363 |
Platform | Win32NT |
PSCompatibleVersions | 1.0 2.0 3.0 4.0 5.0 5.1.10032.0 6.0.0 6.1.0 6.2.0 7.0.3 |
PSRemotingProtocolVersion | 2.3 |
SerializationVersion | 1.1.0.1 |
WSManStackVersion | 3.0 |
Visual Studio Code Extensions
Visual Studio Code Extensions(Click to Expand)
Extension | Author | Version |
---|---|---|
bracket-pair-colorizer-2 | CoenraadS | 0.2.0 |
gc-excelviewer | GrapeCity | 3.0.40 |
gitlens | eamodio | 10.2.2 |
powershell | ms-vscode | 2020.6.0 |
rainbow-csv | mechatroner | 1.7.1 |
reg | ionutvmi | 1.0.1 |
team | ms-vsts | 1.161.0 |
vscode-icons | vscode-icons-team | 10.2.0 |
xml | DotJoshJohnson | 2.5.1 |