Open hemisphera opened 2 months ago
You are running 6.0.16 - I think this is fixed in 6.0.17
The difference is:
Open-BcContainer will issue a docker exec -it containername pwsh|powershell
in a new prompt in the container
Enter-BcContainer will try to create a powershell session to the container and use Enter-PsSession
docker exec takes ~1 second Creating a session takes approx. the same Invoking a command in an established session is very quick.
Invoke-ScriptInBcContainer uses a session if possible, else it will create a .ps1 file with the script and call docker exec to execute the script in the container.
From PowerShell 5 on the host running in admin mode we can create a session using New-PSSession -ContainerId $containerId
and use that session
From PowerShell 5 in non-admin mode or from PowerShell 7 (both admin and non-admin) we need to use WinRm. If WinRm is not configured, it will give an error - but enter-bccontainer should revert to open-bccontainer like:
The error you are getting is that that the SSL Connection cannot be established. On my machine, I also cannot run WinRm over SSL, but it doesn't give an error - instead it reverts to Open-BcContainer as the image above.
Describe the issue
Enter-BCContainer
seems to be broken on PS7. Whenever I try to enter a BC container on PS7 I get the error that I have logged down below in the full output of the scripts.I started using the alternative
Open-BCContainer
ever since, which works fine. But there are a few quirks here that I think are worth reporting and resolving.Enter-BCContainer
andOpen-BCContainer
. Aside from the fact that the latter opens a new terminal window and seems to be a little less "integrated" (colorcoding, syntax a.s.o.). And of course: the fact that one works for PS7 and the other doesn't. So my question is: why keep both? Why not deprecate one and just keep the other?New-BCContainer
call, you conveniently output a list of cmdlets that are useful now. One of those keeps beingEnter-BCContainer
, event though - as reported above - it does no longer work on PS7.Enter-BCContainer
is one of those (many) cmdlets where the name of the container is case sensitive. On a whole lot of other cmdlets it is not. This is not strictly related toEnter-BCContainer
, but rather a general problem i noticed. I think it would be worth streamlining this across the entirety of BCCH.Scripts used to create container and cause the issue
Full output of scripts