Powershell 7 - WSMAN issue

Hid

I recently reinstalled my MacBook Pro, and I have reinstalled most apps and settings, and I’m one of those who spends my worklife in Office 365 but using a MacBook.

Now the time has come for setting up PowerShell, and I followed this guide from Microsoft.

It appears that the PowerShell was installed correctly (but it’s not), I ran this command called “$PSVersionTable”, and the result looked like this:
Name Value


PSVersion 7.0.0
PSEdition Core
GitCommitId 7.0.0
OS Darwin 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

But when I try to login to Office 365 PowerShell, I get an error called:

“New-PSSession: This parameter set requires WSMan, and no supported WSMan client library was found. WSMan is either not installed or unavailable for this system.”

Have any of you had this error, and what did you do?

I have no recent experience with PowerShell, and none on Mac. But, I found a Microsoft page https://docs.microsoft.com/en-gb/powershell/scripting/community/community-support?view=powershell-7 which might provide you some links to PowerShell experts who maybe could help.

Looks like Wsman is not working on Mac. Check with this cmdlet: Test-WSMan

Try this instead.

Thanks.

When I run “Test-WSMan” - I get the following error:
@Test-WSMan: The term ‘Test-WSMan’ 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.”

I then followed the guide you sent - I followed the guide to the very letter. The error is:
“New-PSSession: This parameter set requires WSMan, and no supported WSMan client library was found. WSMan is either not installed or unavailable for this system”

I’m out of ideas - I have no clue what is wrong :frowning:

Did you happen to find an answer to this question? I am running into the same thing and hoped there was a resolution found that just wasn’t mentioned.
Thanks!

1 Like

I’m still looking :frowning:

Hi, I too ended up here looking for an answer to this, I am not sure that WSMan is included in the MacOS version of Powershell, I will check the Linux version in a bit, what I have done as a workaround to enable me to get things done is enable SSH Server on the windows server which gives me full PowerShell in a windows environment in a terminal on my mac.

I WOULD however like to be able to run WSMan commands from my mac.

1 Like

I’m still looking. I’m thinking of simply paying a professional an hour or 2 to fix it, I know it would take him/her very short time.

Why can’t there be just ONE install package :flushed:?

I believe this article explains it fairly simple (which I like), but I copied the commands and tried them.

The first command (brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/64555220bfbf4a25598523c2e4d3a232560eaad7/Formula/openssl.rb -f) came out with errors, so stil stuck.

And I believe that I have found proof that PowerShell for Mac simply doesn’t work (anymore):

So… :frowning:

I hope they fix it.

I installed forked WSMan libs that a kind person updated with a fix. Details here: Wacky WSMan on Linux – Blogging for Logging

and here: GitHub - jborean93/omi: Open Management Infrastructure