Update to Dot Source Reminder with Search and Replace

“The pause doesn’t work for me”, said one of my team members about the pause function in my  Dot Source Reminder code.  We took some time to analyze why and found that his shell settings were different from mine.  Instead I decided to focus on whether the code executed inside the ISE.  Next was to update all the affected scripts.  Here is what I did:

A couple of notes.  I used the “here string” option for the search and replace text.   Next, I used the RegEx escape method to make sure that the replacement code would be properly interpreted.   The code above does a search and replace of all of scripts in z:\PowerShell, replacing the old text with the new.

About Alan

See http://www.akaplan.com/blog/about/
This entry was posted in PowerShell, Scripting and tagged , , . Bookmark the permalink.

Leave a Reply