How to install macOS version of Windows PowerShell?




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



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)

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:


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).