WSL while you work: Writing cross-platform PowerShell on the same platform

Опубликовано: 26 Октябрь 2024
на канале: PowerShell.org
2,107
23

A few years ago, Jeffery Snover talked about what he called a ‘Cross-Stack’ engineer. This is someone who could work across not only different languages and tools, but architectures as well. That’s where the Windows Subsystem for Linux comes in.

WSL is one of the most useful features to come out of Microsoft in the last few years. It has a lot of tricks and features that are extremely useful to users, but not as well-known or used as they should be, such as running commands across Windows and Linux, using separate distributions for feature testing, and exporting the state of a WSL distro.

PowerShell has run from Windows since day one, but since 2015 it’s also run on Linux systems. Now that Windows and Linux can run side by side using WSL, and they can each run PowerShell, how can we use it to make our lives easier?

In this talk, I’m going to cover using WSL and how we can use it and PowerShell effectively, including topics like: – Writing cross-platform PowerShell code – WSL best practices – Exporting and versioning WSL distributions – Passing WSL bash to PowerShell and back

This talk will include some intermediate PowerShell concepts and some basic Windows and Linux concepts, and is intended for anyone who wants to learn better ways to use, interact with or manage Linux.