Categories

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.

Download File with a PowerShell One-Liner

I was recently trying to automate some scripts on a linux box and I wanted to know if it was as simple to download a file in PowerShell as it is in linux: wget http://example.com/file.jpg
Well as it turned out, it wasn’t, but it wasn’t that difficult either. What we needed was too use the System.Net.WebClient class. There’s one thing to note, in PowerShell you can’t use a ~ (tilde) to reference your home directly, that is to say, you can’t download a file to ~\Desktop you will need to specify the full path, in my case C:\Users\Brangle\Desktop. […]

Make PowerShell Talk / Speak

Have you ever run a long PowerShell script, minimized it, only to realize much later that an error caused it to stop? Rather than just using a color syntax red to display the error,  I wanted to hear it so I could switch back to the PowerShell window and see the error. So how easy is it to make PowerShell speak? It’s almost identical to the .NET code I have in VB.net and C# on Make Your Computer Talk with VB.NET Application (and Source Code) using the SAPI.SpVoice class. […]