AD Function Template

At the moment I tend to write quite a lot of functions relating to Active Directory. As such I’ve created a small template script I can use for all these functions. In the first part of the template I include comments which can be displayed with the Get-Help Cmdlet.

Continue reading

Testing Objects, Functions, Pipelines

I’ve modified a small test function I’ve seen somewhere else on the web. It shows how a function deals with parameters.

A small example to go with the test-function:

In this way you can allow for multiple input methods and you can differentiate between input types. I wonder … Continue reading

Melodie au crepuscule

This is one of my favorite tunes, and a magnificent performance. “Seul, je rêvais, ignorant et le monde et la vie, lorsqu’une voix nostalgique et profonde a troublé ces minutes d’oubli. Bonheur perdu, ce refrain me rappelle mes folies, Comme un plaisir insensible et cruel, c’est celui que m’apporte la … Continue reading

Starting a remote PowerShell console

Sometimes I want to pop over to a different machine in my PowerShell console. The Cmdlet ‘Enter-PSSession‘ works perfect for this:

Using the second method a PowerShell Credential Request window will pop up, asking you to enter the password for ‘Contoso\Administrator’: While this works nice, I figure it could … Continue reading

PSLaunch.vbs

In order to launch my Powershell scripts I make use of a bootstrapper in VBScript. Reason for this is that we use a deploy mechanism that for some reason doesn’t wait for the powershell process to finish. Which would result in all powershell jobs running simultaneously. Below script launches the … Continue reading