I am starting to work more with VS Code, especially since it is so easy now to write PowerShell code on my MacBook Pro, without having to switch to a Windows VM or remote into a Windows machine.
Yet there a few kinks, they are however easy to fix.
- Install Powershell on the macOS
So easy! Go to: https://github.com/PowerShell/PowerShell/releases/
Download the latest PowerShell package for macOS
(It’s the one ending with .pkg)
Allow the package to be run:
System Preferences -> Security & Privacy -> Allow Apps downloaded from
Follow the prompt
- Installing the Powershell Extension
Press ‘Shift+CMD+P’ to open the Command Palett
Type ‘Install Extensions’, select it and press enter
Type in PowerShell, there is currently only a single extension from Microsoft for PowerShell, so that’s the one you should pick.
Click on Install/Enable, restart VS Code, done.
- PowerShell Intellisense issues
It seems to be common issue if there is no OpenSSL installed
Have a read here how to fix it.
- Another issue is PowerShell remoting. Since Windows is using win RM, macOS or Linux know nothing about that. You have to use SSH, specifically OpenSSH. You have to install that on your windows machine which is right now a little bit tricky (step by step here) but eventually they are going to build a cmdlet or something to automate that for you.