Skip to content

icinga management console throws errors when executed within enter-pssession #827

@K0nne

Description

@K0nne

Hello!

If I connect via enter-pssession to a remote host and execute icinga, I get the following error:

[hostname]: PS C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-framework> icinga
*******************************************
** Icinga for Windows Management Console **
** Copyright (c) 2025 Icinga GmbH | MIT  **
**  User environment domain\user  **
**  Icinga PowerShell Framework v1.13.2  **
*******************************************

What do you want to do?

[0] Base Installation
[1] Component Manager
[2] Settings
[3] Overview
[4] Icinga Shell

[x] Exit
[c] Continue
[h] Help
[l] Commands
[m] Main


powershell.exe : Cannot process the XML from the 'Output' stream of
'C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe': Data at the root level is invalid. Line 1, position
1.
At C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-framework\icinga-powershell-framework.psm1:343
char:5
+     powershell.exe -NoExit -Command {
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : SyntaxError: (C:\WINDOWS\Syst...\powershell.exe:String) [], XmlException
    + FullyQualifiedErrorId : ProcessStreamReader_CliXmlError

powershell.exe : Windows PowerShell is in NonInteractive mode. Read and Prompt functionality is not available.
At C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-framework\icinga-powershell-framework.psm1:343
char:5
+     powershell.exe -NoExit -Command {
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Read-Host], PSInvalidOperationException
    + FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.ReadHostCommand

powershell.exe : The term '<' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-framework\icinga-powershell-framework.psm1:343
char:5
+     powershell.exe -NoExit -Command {
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (<:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

[hostname]: PS C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-framework>

It works as expected within direct connections.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions