PowerShell is Powerful

Ian

Administrator
Joined
Feb 23, 2002
Messages
19,873
Reaction score
1,499
I hadn't quite appreciated how good Windows PowerShell is... it is amazingly good. When I heard that the command prompt was going to be replaced by it, I was a little sad (nostalgia!), but I've had a good play with PowerShell over the past few days and I've scripted a huge number of things that would never had been possible with Batch files.

For example, I can now patch the forum software with a few clicks thanks to a PowerShell script. It will download the patch, unzip it, ask for credentials, FTP it to the server, log in to the web-interface and process the upgrade. This used to take me a while to do manually, but it's under 10 seconds now that it's automated :D.

PowerShell makes it easy to open up a "select file" dialog box and assign it to a variable, or to parse a CSV/XML file. A huge number of functions are built in.

If you use batch scripting, please do take a look at PowerShell in a bit more detail, as it's a lot better than I expected.
 

EvanDavis

Silly Fool
Joined
Jun 20, 2010
Messages
5,299
Reaction score
681
Interesting. The only thing I have used PowerShell for was to get rid of the crap that came with Windows 10.
 

Ian

Administrator
Joined
Feb 23, 2002
Messages
19,873
Reaction score
1,499
Haha, well that's one way of putting it to good use :D.

I'm going through a lot of my old batch scripts and converting them to PowerShell, I'm really pleased with some of the new built-in functionality.
 

V_R

¯\_(ツ)_/¯
Moderator
Joined
Jan 31, 2005
Messages
13,572
Reaction score
1,888
Interesting. The only thing I have used PowerShell for was to get rid of the crap that came with Windows 10.
Same here!

I'd love to use it for more productive stuff, but I don't know the first thing about it....
 

Ian

Administrator
Joined
Feb 23, 2002
Messages
19,873
Reaction score
1,499
What sort of things do you think you might use it for, and I'll see if I can find some good examples :). I'm so pleased with how easy it is to use that I'm keen to help the uptake. When I first saw it, I was daunted, as it looks so different to what I was used to - but it's a really nice scripting language to pick up once you get your head around it.
 

Ian

Administrator
Joined
Feb 23, 2002
Messages
19,873
Reaction score
1,499
I use it for server backups, creating a log of file modification attempts (a server security tripwire), etc..

It is so much more powerful than batch scripting, it has built in functions to do text-to-speech, grab/check URLs, hash files (for comparison). For example, you could even make a script that would read out any new alerts that appear on PCR (not really useful, but an example of the level of things that PowerShell can do).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top