Skip to content

Amazon Q: (Windows) running powershell every 2 seconds #6134

@nistSean

Description

@nistSean

Problem

When the Amazon Q extension is enabled, there is a PowerShell command being executed continuously.

**********************
Windows PowerShell transcript start
Start time: 20241203145229
Username: xxxx\xxxxx
RunAs User: xxxx\xxxxx
Configuration Name: 
Machine: xxxxxxxxx (Microsoft Windows NT 10.0.22631.0)
Host Application: powershell.exe -NoProfile -NoLogo -InputFormat Text -NoExit -ExecutionPolicy Unrestricted -Command -
Process ID: 6868
PSVersion: 5.1.22621.4391
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.22621.4391
BuildVersion: 10.0.22621.4391
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
**********************
Windows PowerShell transcript start
Start time: 20241203145229
Username: xxxx\xxxxx
RunAs User: xxxx\xxxxx
Configuration Name: 
Machine: xxxxxxxxxxx (Microsoft Windows NT 10.0.22631.0)
Host Application: powershell.exe -NoProfile -NoLogo -InputFormat Text -NoExit -ExecutionPolicy Unrestricted -Command -
Process ID: 6868
PSVersion: 5.1.22621.4391
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.22621.4391
BuildVersion: 10.0.22621.4391
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
PS>CommandInvocation(Out-String): "Out-String"
>> ParameterBinding(Out-String): name="InputObject"; value="Exception calling "ReadLine" with "2" argument(s): "Specified method is not supported.""
Exception calling "ReadLine" with "2" argument(s): "Specified method is not supported."
At C:\Program Files\WindowsPowerShell\Modules\PSReadLine\2.0.0\PSReadLine.psm1:4 char:5
+     [Microsoft.PowerShell.PSConsoleReadLine]::ReadLine($host.Runspace ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : NotSupportedException
Exception calling "ReadLine" with "2" argument(s): "Specified method is not supported."
At C:\Program Files\WindowsPowerShell\Modules\PSReadLine\2.0.0\PSReadLine.psm1:4 char:5
+     [Microsoft.PowerShell.PSConsoleReadLine]::ReadLine($host.Runspace ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : NotSupportedException
PS>$OutputEncoding = [System.Console]::OutputEncoding = [System.Console]::InputEncoding = [System.Text.Encoding]::UTF8 ; Get-CimInstance Win32_PageFileUsage | Select AllocatedBaseSize, CurrentUsage

AllocatedBaseSize CurrentUsage
----------------- ------------
             9728            4


**********************
Windows PowerShell transcript start
Start time: 20241203145230
Username: xxxx\xxxxx
RunAs User: xxxx\xxxxx
Configuration Name: 
Machine: xxxxxxxxx (Microsoft Windows NT 10.0.22631.0)
Host Application: powershell.exe -NoProfile -NoLogo -InputFormat Text -NoExit -ExecutionPolicy Unrestricted -Command -
Process ID: 6868
PSVersion: 5.1.22621.4391
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.22621.4391
BuildVersion: 10.0.22621.4391
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
PS>CommandInvocation(Out-String): "Out-String"
>> ParameterBinding(Out-String): name="InputObject"; value="Exception calling "ReadLine" with "2" argument(s): "Specified method is not supported.""
Exception calling "ReadLine" with "2" argument(s): "Specified method is not supported."
At C:\Program Files\WindowsPowerShell\Modules\PSReadLine\2.0.0\PSReadLine.psm1:4 char:5
+     [Microsoft.PowerShell.PSConsoleReadLine]::ReadLine($host.Runspace ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : NotSupportedException
Exception calling "ReadLine" with "2" argument(s): "Specified method is not supported."
At C:\Program Files\WindowsPowerShell\Modules\PSReadLine\2.0.0\PSReadLine.psm1:4 char:5
+     [Microsoft.PowerShell.PSConsoleReadLine]::ReadLine($host.Runspace ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : NotSupportedException
PS>exit
**********************
Windows PowerShell transcript end
End time: 20241203145230
**********************

Steps to reproduce the issue

  1. Go to Visual Studio
  2. Enable the Amazon Q extension
  3. Check powershell logs.

Expected behavior

Don't do this.

System details (run AWS: About and/or Amazon Q: About)

  • OS: Windows 11
  • Visual Studio Code version: 1.95.3
  • AWS Toolkit version: 3.37.0 (edited 12/4/2024)
  • AWS CLI V2 2.18.7
  • Amazon Q version: 1.39.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions