Making credentials

The PowerShell remoting commands use the parameter -Credential. If you use a string for its value, PowerShell is smart enough to take it as a user name and automatically call a type cast that will ask for the password in a GUI window. But what if you want to enter the password as plain text…

0

sed in PowerShell

One of the things that had been annoying me in PowerShell is the lack of sed, the Streaming text EDitor. So I’ve made my own. Like other things in PowerShell, it’s not the same, it’s much more verbose in usage than the original sed, so that it can’t really be used as an one-liner. On the other…

0

monads

Today I want to repost a post from my other blog in CEP. It came as a side effect of first seeing a discussion and then watching the talk on “Monads and gonads”. They guy there actually got only a small subset of what the monads are, actually the same mistake as I’ve done on…

2

How to create a brand new registry hive

First of all, the registry hive is a file that holds the  contents of a whole registry root key on disk, when Windows is not running. Normally there is not much point in creating them manually, you just edit the registry as usual, and it gets automatically saved on disk between the reboots. However when messing…

0

calling the script blocks in PowerShell

The script blocks are the PowerShell way to pass a chunk of code as an argument to a command. So when you write something like dir -Recurse . | where { $_ -match “\.txt” } that thing in the braces {} is a script block. Essentially, an anonymous function. Some might also say that it’s a…

2

PowerShell in a nutshell

PowerShell is the Windows (and especially the Windows Server) answer to everything-automation: every which part of the OS and its services provides a way to control it from PowerShell. And the PowerShell scripts are The Way to automate everything. But here is the unusual part: It’s not a normal OS shell.  I’ve tried it before as…

0

Introduction

In my background I’m a Unix (and sometimes Linux) guy. So now when I work on Windows, I discover the whole new different world, which if full of things that are sometimes different, sometimes the same, and sometimes similar but with different names. As I get to understand them, I want to write down this understanding,…

2