SOLVED

How to install macOS version of Windows PowerShell?

%3CLINGO-SUB%20id%3D%22lingo-sub-1560828%22%20slang%3D%22en-US%22%3EHow%20to%20install%20macOS%20version%20of%20Windows%20PowerShell%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1560828%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20am%20looking%20for%20Windows%20PowerShell%20for%20Mac%20rather%20than%20PowerShell%20Core%20(v6%2B)%2C%20is%20it%20something%20available%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1560828%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMac%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

Hi,

 

I am looking for Windows PowerShell for Mac rather than PowerShell Core (v6+), is it something available?

 

Thanks!

3 Replies
Nope, that's why we have Core... You can always spin up a Windows VM if you need it that bad :)
best response confirmed by Steve_Zhou_zzc (Microsoft)
Solution

Hi @Steve_Zhou_zzc,

 

Windows PowerShell was written exclusively for Windows OS and it is based on .NET Framework that is not portable to other operating systems.

 

PowerShell Core (6.x) is on the other hand based on .NET Core that is cross-platform, so available on MacOS as well.

 

Instructions on how to install PowerShell 7 on MacOS: https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-macos?vi...

 

I am on Windows 10 and I have been using PS 6.x for a long time. I can't recall when I needed to use Windows PowerShell, since the majority of standard modules have been ported to .NET Core already.

 

In case you need to use some PS module that is not available for PowerShell 7 (Core), you can either run a Windows VM or you could try with PowerShell remoting (either explicit or implicit).

@Steve_Zhou_zzc  Dear Steve, I am a Mac user, but I once a a while need PowerShell to accomplish tasks related to setting up SharePoint sites for clients. I started this work not too long ago, intensely studied weeks and weeks to acquire the necessary factual and experience-based knowledge to be able to create new site designs, content types etc. and deploy them using PowerShell.

 

If you want to play and get a feeling for PowerShell, go ahead and install a core version on you Mac. If wiry want to work with PowerShell, forget the dream that (at this point in time) that would be possible with a Mac. 

 

My experience: the cross platform works as software as it is, but despite all the whistle and bells, you can play with modules like Teams. But you simply cannot do anything 'serious' with PowerShell Core on a Mac. Too many required modules (while they do install) simply do not work from Mac OSX. Even while many "e-learning books" claim that functionalities work with the PowerShell Core from a Mac (even documented with screenshots): they do not work. At the end,  I talked to many people, and contacted a famous PnP programmer, they clearly stated that a lot if not most modules will not work from a Mac. 

 

My advise, and to make a very long story short (mostly characterised by frustrating events and many, many hours lost): 

- Use Bootcamp on your Mac to set up a lean Window partition; so you will get a truly native Windows installation); switching between OSX and WIN10 required a restart, but that takes a little of your time, like 10 seconds.

- download a Windows 10 installation from Microsoft. You are allowed to use it for a while without activation of the licence; at the end I preferred activating the licence, Windows 10 is worth its money (while I maintain convinced that MacOS is a better OS).

- then install the Windows PowerShell on your Windows  account (running natively on your Mac). Install Windows PowerShell 5.1;  the version where you see so many blogs and docs advising NOT to use it. But the point is, this Powershell version does everything you expect, it has a nice, very user-friendly interface as well. Use any of your OneDrive accounts to store scripts, so you can also look at them from your OSX environment.

- also install Visual Studio Code as well (you can also do this on your Mac, but ... without the Cmdlets not working, you would do that is you want to use other features, like help with your JSON code).

 

Succes!