Microsoft recently announced the new Windows 10 Insider Preview Build 14316 which includes the ability to run native bash on Ubuntu on Windows. First off BRILLIANT! Secondly I just had to get this working with the new Pure Storage Python Toolkit 1.6. Here is the short journey to get things working. The example script does the following:
- Connects to the Pure Storage FlashArray
- Creates a new volume
- Creates a snapshot of the new volume
- Creates a new volume from the new snapshot
- Create a Protection Group
- Adds the new volume from the snapshot to the Protection Group
- Creates a Protection Group snapshot
- Performs a cleanup of items 1 – 7
Steps
- Follow the steps in the following MSDN article, https://devblogs.microsoft.com/commandline/bash-on-ubuntu-on-windows-download-now-3/ to download and install the Windows 10 Insider Preview Build 14316 and get the Windows Subsystem for Linux (Beta) running.
- Once the Windows Subsystem for Linux is running open a Command Prompt (Admin) and type bash.
- Run all of the following commands:
[crayon-681db6b652169605625532/] - Basic Python script creation:
[crayon-681db6b65217c247617485/]
[crayon-681db6b652180963886889/] - Save and Exit
[crayon-681db6b652184925456771/] - Run the script:
python PS-BASHTEST.py
Best new feature in Windows I’ve seen in years!
Cheers,
Barkz