Last week the Visual Studio Services team announced a new service called Visual Studio Codespaces. Visual Studio Codespaces allows you to do cloud-hosted development for wherever you’re working. While the new services support many different programming and scripting languages, it also supports PowerShell. In this blog post, I am going to show you how you can write PowerShell code online in a web browser using Visual Studio Codespaces.
What is Visual Studio Codespaces
As mentioned, Visual Studio Codespaces (earlier known as Visual Studio Online) are cloud-hosted development environments, which are accessible from everywhere. I don’t want to go too deep into what Visual Studio Codespaces are since there are already great resources out there. However, I want to quickly give you an overview of the basics of Visual Studio Code spaces and how you can use them to write PowerShell code.
Visual Studio Codespaces gives you access to development machines, which can be cloud-hosted or self-hosted.
- Cloud-hosted machines are machines running in the Microsoft Cloud, and you can take advantage of the power of that machine. In this case, you can use the web browser or Visual Studio Code to access that Codespace.
- Self-hosted machines can be computers in your home, company, installed in the cloud using Azure VMs, or everywhere. Again, here you can use a remote machine using a web browser or VS Code to access that code space remotely.
This now allows you to have a powerful development environment that you can access and run from anywhere. I think that is pretty cool!
You can read more about the introduction of Visual Studio Codespaces here.