PowerShell is like Semantic Bash. Tweeted by SwiftOnSecurity
That’s right, PowerShell is now a cross-platform (Windows, Linux and OS X) command-line shell and associated scripting language.
Here it is in Action
Running on Windows 10, in Hyper-V on Ubuntu 16.04 Desktop.
$PSVersionTabledisplaying information about the version, build and compatibility
Get-Commandto get the number of
PowerShellcmdlets currently shipping
- Launching Visual Studio Code
- Finally, calling
pythoncode inline in a
Wait there’s more
Microsoft’s Visual Studio Code Editor runs on Linux too (and on Windows). Plus, there’s a PowerShell Code extension. Your editing experience is now the same across platforms (and check out the VS Code marketplace for even more extensions )
This extension provides rich PowerShell language support for Visual Studio Code.
Now you can write and debug PowerShell scripts using the excellent IDE-like interface that VS Code provides.
- Syntax highlighting
- Code snippets
- IntelliSense for cmdlets and more
- Rule-based analysis provided by PowerShell Script Analyzer
- Go to Definition of cmdlets and variables
- Find References of cmdlets and variables
- Document and workspace symbol discovery
- Run selected selection of PowerShell code using F8
- Launch online help for the symbol under the cursor using Ctrl+F1
Local script debugging and basic interactive console support!
PowerShell is Open source
You can read it, and you can contribute. It’s going to be interesting to watch the pull requests. I’m looking at some of the source on some cmdlets for the first time without using a disassembler.
PowerShell Package Management
Package managers are central to promoting code discovery and re-use. The PowerShellGallery (announced in 2015) is hosted by Microsoft.
The PowerShell Gallery is the central repository for PowerShell content. You can find new PowerShell commands or Desired State Configuration (DSC) resources in the Gallery
There’s been over 2 million downloads of the packages and tremendous community engagement. It’s about to get bigger. Give
Install-Module a try.
What can you make with these building blocks?
This is just a sampling showing the next release of PowerShell is positioned to truly work across platforms.