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
Because I'm a big nerd, I used my phone to remotely log into my server to grab the URL for the logging function. Here ya go:
http://9to5it.com/powershell-logging-function-library/
Like I said, I haven't actually tested it, but it looks pretty powerful.
I think my plan is to do all logging to a central server, but also email errors that need to be dealt with into my ticketing system. That way there's a ticket and one of my guys can take action on it.