I heard about the PowerShell announcement recently where the platform is porting over to Linux and OSX. I think this is part of the SQL Server on Linux project, where I assume we’ll start to see the functionality that we have on Windows appear on Linux platforms. OSX is a surprise, but since more and more people run Macs, this makes sense. Hopefully we’ll see SQL Server Developer on OSX at some point.
I’ve got an Ubuntu VM, so I decided to see how well this works, so I picked the Ubuntu 16.04 package and found the instructions I ran on my VM. You can see how this worked in the image below.
Now that I’ve got the package downloaded, I can start PowerShell pretty simply:
What can I do? Well, let me grab a short PoSh script I have. This is from the Advent of Code, and it’s a .ps1 for me. Here it is interactively.
If I make a .PS1, then I can paste in the original code:
and if I execute this:
That’s pretty cool.
I haven’t explorer the extent of the PoSh support, and I don’t think there is SQL Server support yet for the SMO namespaces, but I’m sure it’s coming.
If you’re a Linux person, or an OSX person, I’d encourage you to play a bit and see what you think of the port.
Filed under: Blog Tagged: Linux, powershell, syndicated