-
Summary: Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell here-strings to create an ASCII holiday snow person. Microsoft Scripting Guy, Ed Wilson, is here. The Scripting Wife and I returned from our European tour yesterday, just...
-
I’m a big fan of codes, ciphers and secret messages. I obviously am a big PowerShell fan as well. So why not mash these things together? Today’s Friday Fun is a PowerShell module I call PSCode. The module contains a … Continue reading...
-
Summary : Microsoft Scripting Guy, Ed Wilson, talks about handling output to the Windows PowerShell console while using the pipeline. Microsoft Scripting Guy, Ed Wilson, is here. The Scripting Wife and I are enjoying Virginia Beach. We have met some really...
-
Summary : Microsoft Scripting Guy, Ed Wilson, discusses several different ways to handle string output from inside Windows PowerShell. Microsoft Scripting Guy, Ed Wilson, is here. It is official—the 2012 Scripting Games are finally over (actually...
-
In the previous post I showed how to generate the parent OUs by splitting and rejoining a string. I used the operators –split and –join These were introduced in PowerShell v2. In PowerShell v1 we had to use the split() method and stitch the thing...
-
PowerShell string substitution is a very neat trick PS (1) > $string = "World" PS (2) > "Hello $string" Hello World We can substitute the value of the variable into the string. The catch – it only works with double quoted...
-
Lets start with a string $str = "abcdefghi" We often only have part of a string to work with so we end up using –like $str -like "abc*" $str -like "*abc*" $str -like "*def*" $str -like "*ghi" these...
-
Lets start with simple string matching as its a task that frequently comes along "aaa" -eq "aaa" "aaa" -ceq "aaa" both return true. What’s –ceq you ask? PowerShell by design is case insensitive so for...
-
I find it a little ironic that although I like efficiency, structure and order I’m fascinated with randomness. In today’s Friday Fun I want to explore a few ways you might incorporate randomness into your PowerShell scripting. Perhaps you...