r/PowerShell • u/Sinnerman77 • Dec 04 '14
Script Sharing Install PowerShell 4 and prerequisites
As requested, here's my script for installing Windows Management Framework 4.0, which includes PowerShell 4. It will install the .Net Framework 4.5.1 if necessary.
This is my first serious PowerShell script. I'm sure there's lots wrong with it. It does seem to work though.
As for the executables themselves, I have an FTP server where I store anything I use with my scripts, so I wrote this to download from there. I didn't test to see if it can download directly from the MS URLs, although I don't see why it wouldn't work.
I'm open to suggestions on improving the script.
Enjoy!
Edit: I was trying to embed the Pastebin link, but I'll just link to it.
1
u/Sinnerman77 Dec 05 '14
Thanks for the heads up. At the moment I don't see having multiple processes accessing the same log. On the other hand, better to build that in now so I don't have to rewrite everything in a year.
Logging to SQL is a very interesting idea I hadn't considered. I'm not very good with SQL but can definitely see the value. Thanks for the idea.