PowerShell ISE Autosave recovery view in ISE

Welcome Forums General PowerShell Q&A PowerShell ISE Autosave recovery view in ISE

This topic contains 0 replies, has 1 voice, and was last updated by  i255d 2 weeks ago.

  • Author
    Posts
  • #113396

    Participant
    Points: 0
    Rank: Member

    I always find articles giving the path to little know secrets like how to get the autosaves from PowerShell ISE, but for some reason, they don't just take one more second and put in the code so you can easily look at these things for your self.

    Here is an easy way to pull up the autosaved files in PowerShell ISE.

    $localExtPath = 'Local\Microsoft_Corporation\PowerShell_ISE.exe_StrongName_lw2v2vm3wmtzzpebq33gybmeoxukb04w\3.0.0.0\AutoSaveFiles'
    $isePath = $($env:APPDATA.TrimEnd("Roaming") + $localExtPath)
    
    (Get-ChildItem $isePath).FullName | Where{$_} |
    foreach{
       psEdit $_
    
    }
    

You must be logged in to reply to this topic.