Start-Transcript -PathTo ‘Best Practice’

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.

Key Takeway
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 Documents\WindowsPowerShell\profile.ps1. If there is none read more on creating Windows PowerShell Profiles.

Remember to run Stop-Transcript to open and view the file.

\m/
Barkz

 

 

Add Comment

Required fields are marked *. Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.