This is just a quick post to recommend that Pure Storage customers or partners working on automation workflows using PowerShell with Server and SAN infrastructure should closely look at using Start-Transcript as a best practice. Today many vendors have invested in developing a PowerShell Module (script/binary) so many scenarios can be automated using PowerShell. In the case with FlashArray there is the Pure Storage PowerShell SDK. Microsoft has excellent documentation here which makes my job easy on how to use the feature.
I use it every time I demo on customers calls or conference speaking. People ask questions which you can script live but once done you might never think of that scenario again. Using Start-Transcript you have an indexable copy of data. The
Different ways to use:
- Windows PowerShell session: Run Start-Transcript (note the location or specify all the parameters)
- Linux PowerShell session: Run Start-Transcript (note the location or specify all the parameters)
- PowerShell ISE: Run Start-Transcript. The cool thing is that each New tab you open the same transcript gets appended.
- Visual Studio Code: Once opened choose to Start Without Debugging. This will open up the debug console dropdown to choose which language, pick PowerShell. The Integrated Console will start then run Start-Transcript.
- PowerShell Profile: Add to your local profile My DocumentsWindowsPowerShellprofile.ps1. If there is none read more on creating Windows PowerShell Profiles.
Remember to run Stop-Transcript to open and view the file.