omi
omi copied to clipboard
MI_RESULT_FAILED error in Powershell docker 7.3.0
SUMMARY
Unable to connect to remote machine to use Invoke-Command using the Powershell docker images from Microsoft. Have tried the latest Alpine, Debian and Ubuntu images, all the same result. Commands work from Windows version of Powershell 7.3.0, not requireing PSWSMan, but I need to have this working in a docker container.
Invoke-Command -ComputerName $server -Credential $Credential -UseSSL -ScriptBlock {
. D:\scripts\test.ps1
}
Error message (server name remove due to confidentiality):
OpenError: [SERVER] Connecting to remote server SERVER failed with the following error message : MI_RESULT_FAILED For more information, see the about_Remote_Troubleshooting Help topic.
MODULE VERSION
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 2.3.0 PSWSMan {Disable-WSManCertVerification, Enable-WSManCertVerification, Get-WSManVersion, I…
OS / ENVIRONMENT
Name Value
---- -----
PSVersion 7.3.0
PSEdition Core
GitCommitId 7.3.0
OS Linux 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Any help would be greatly appreciated.
I've just tested against PowerShell 7.3.0 and it is able to connect without any problems. Unfortunately the error messages from the OMI library are just too obscure to really see what might be going on. If you are using a Docker container then you'll need to ensure that you've installed the libmi and libpsrpclient library that is shipped with this module with Install-WSMan
. You can also do something like https://github.com/jborean93/omi/issues/24#issuecomment-798995921 and just change debian10
with the version of OpenSSL you want to link to for example
$libbase = Join-Path (Import-Module -Name PSWSMan -PassThru).ModuleBase bin glibc-1.1
@phillippover I know this ticket has been open for a long time but did you find a solution? I'm not able to make Negotiate works in CBL-Mariner containers. I installed gss-ntlmssp but it doesn't work any better.