Powershell function to add script to the profile

I’m currently in the middle of learning powershell; More specifically, on day 4 of the Microsoft 10325a Automating Administration with Windows Powershell 2.0.

With my coding background, i’ve tended to write most of the script inside functions to try and promote reuse.  I’ve found that maintaining a library of functions to be a bit of a headache so ended up writing the function below.  It’s by no means perfect (lets face it, PoSH is a little new to me currently… lets see how long before v2 makes it onto my blog), but it does the job.

 

Leave a Reply

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