Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

Curly Blue and the meaning of scripting – Part 2

Summary: Curly Blue learns how to use built-in PowerShell script examples in Windows. Yesterday we met our new friends, Curly Blue and Linux. Curly had started his new job as a IT Professional at Contoso. The challenge for poor Curly was that he had never learned scripting or, for that matter, gotten into the spirit of it. He had mastered a ...

PowerTip: Limit Get-Childitem to a limited depth in the tree

Summary: Use the new -depth parameter to control how far down a directory you can search. (image) I have a large file structure to search but I only want to go two folders deep on the search.  Is there a way to do this in PowerShell? (image) Certainly!  In PowerShell 5.0, you can use the -depth parameter to specify how many branches deep ...

Curly Blue and the meaning of scripting – Part 1

Summary: Curly Blue learns how to automate cleaning of old data files by using PowerShell. This week, in the spirit of the holidays (and of course the previous six years!), Hey, Scripting Guy is honored to bring forth a repeat of a tradition: The “Hey, Scripting Guy!” holiday special. This year, we are pleased to offer a week of fun and ...

PowerTip: Capture the output of a Linux application in PowerShell

Summary: Use the built-in features of PowerShell to obtain data produced by a Linux application. (image) Can I run a Linux application like ls and capture its output in PowerShell? (image) You certainly can!  It’s no different from when you normally grab output from any other command in Windows.   To grab the output of the ls command, ...

Open Source PowerShell – Part 4

Summary: Install and Configure SSH for Open Source PowerShell remoting. (image) With PowerShell, up to this point, one thing that I love is the ability to connect various systems in my environment and run cmdlets on them remotely.  Can we do this with Open Source PowerShell? (image)  Honorary Scripting Guy, Sean Kearney, is here today to ...