PowerLine
PowerLine copied to clipboard
PowerLine fails to import in a PSRemote session
This might also be a problem with Pansies.
Import-Metadata : Exception calling "InvokeReturnAsIs" with "1" argument(s): "Cannot convert value "Cyan" to type "PoshCode.Pansies.RgbColor". Error: "GetConsoleScreenBufferInfoEx->WinError:
#6""
At C:\Program Files\WindowsPowerShell\Modules\Configuration\1.3.0\Configuration.psm1:417 char:21
+ ... Import-Metadata $EnterprisePath -ErrorAction Ignore -Orde ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Import-Metadata], MethodInvocationException
+ FullyQualifiedErrorId : RuntimeException,Import-Metadata
Cannot convert the "System.Object[]" value of type "System.Object[]" to type "System.Collections.Generic.List`1[PoshCode.Pansies.RgbColor]".
At C:\Program Files\WindowsPowerShell\Modules\PowerLine\3.0.3\PowerLine.psm1:45 char:13
+ "Cyan","DarkCyan","Gray","DarkGray","Gray"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [], RuntimeException
+ FullyQualifiedErrorId : ConvertToFinalInvalidCastException
Exception calling "ResetConsolePalette" with "0" argument(s): "GetConsoleScreenBufferInfoEx->WinError: #6"
At C:\Program Files\WindowsPowerShell\Modules\PowerLine\3.0.3\PowerLine.psm1:787 char:5
+ [PoshCode.Pansies.RgbColor]::ResetConsolePalette()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : Exception
Enter-PSSession : Running startup script threw an error: Exception calling "ResetConsolePalette" with "0" argument(s): "GetConsoleScreenBufferInfoEx->WinError: #6".
At line:1 char:1
+ Enter-PSSession jarcher -ConfigurationName Profile
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Enter-PSSession], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation
Looks like a PANSIES problem, but I'm not sure why! I'll look into this...
You can test this with https://github.com/oliverschwendener/ueli. refresh indexes
Exception calling "ResetConsolePalette" with "0" argument(s): "GetConsoleScreenBufferInfoEx->WinError: #6"
At C:\Users\alice\Documents\WindowsPowerShell\Modules\PowerLine\3.1.2\PowerLine.psm1:679 char:5
+ [PoshCode.Pansies.RgbColor]::ResetConsolePalette()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : Exception
Set-GitPromptSetting : Cannot process argument transformation on parameter 'BranchForeground'. Cannot convert value
"Black" to type "PoshCode.Pansies.RgbColor". Error: "GetConsoleScreenBufferInfoEx->WinError: #6"
At C:\Users\alice\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:32 char:76
+ ... -BranchText "$([char]0xE0A0) " -BranchForeground Black -Branch ...
+ ~~~~~
+ CategoryInfo : InvalidData: (:) [Set-GitPromptSetting], ParameterBindingArgumentTransformationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,Set-GitPromptSetting