PowerShell: Measuring Download Speeds

Have you ever downloaded a file from the Internet? Probably. Have you ever downloaded a file with PowerShell? Maybe. Have you ever wondered how fast your download was going? Sure. Have you ever wondered how to get that information when you’re downloading a file with PowerShell? Maybe, but you didn’t …

Continue reading

PowerShell: Embed binary data in your script

When writing automation scripts or modules, you might find that you frequently reference external binary data. “Binary data? Well, that accounts for all data!” you might say. Yes, that’s true. But I’m talking about binary data as opposed to files containing simple ASCII or UTF-8 data. Maybe there’s some better …

Continue reading

PowerShell: Tracert or Trace-Route?

UPDATE (2012-07-27): Justin Dearing (@zippy1981) sent me an updated version of the script, which improves on the following: Has some comment-based help Parameter checking Grab it here: Invoke-TraceRoute.ps1 Any network or systems administrator is familiar with the good old tracert.exe utility that’s been included outof-the-box in Windows for years now. …

Continue reading

PowerShell: Finding Friday the 13th

Update (2012-01-13): Justin Dearing (aka @zippy1981) informed me that it would be more efficient to look at the 13th of each month, and test if it was a Friday. In theory at least, he’s absolutely correct; I wrote the function the first way I thought of it, and I always …

Continue reading

PowerShell: Move ConfigMgr Collections

Introduction If you work with Microsoft System Center Configuration Manager (SCCM / ConfigMgr) 2007 in any capacity, you probably are familiar with the concept of "collections" and how painful they can be to work with sometimes. The ConfigMgr console does not provide any method of moving a collection from one …

Continue reading

PowerShell: Dynamic Parameters and Parameter Validation

Background on Parameter Validation PowerShell advanced functions allow their creators to specify a fair amount of metadata that describes their parameters. One huge benefit of parameter declarations in PowerShell is that it’s possible to validate input right at the parameter level, before you execute any code in the body of …

Continue reading