Archive | PowerShell RSS for this section

PowerShell: Replace special characters

Discovery

While browsing the interwebs I came across a neat little trick (on Martin Zugec blog):
[System.Text.RegularExpressions.Regex]::Replace($Text,"[^1-9a-zA-Z_]"," ")

Read More…

PowerShell: CPM – Creating SQL Table

In the intro I discussed my need to manage all script parameters centrally. To do this I want to create a PowerShell module to manage the parameters and to store the data in a SQL database.

First things first, lets set up a SQL database and table.

Read More…

PowerShell: Centralised Parameter Management – Intro

Problem

I want to manage all script parameters centraly so that when I need to change a parameter I don’t have to change it in every script.
Preferably the option of managing the parameters in a web-based dashboard.

Read More…

C#: PowerShellAdappter

Problem

I want to use my PowerShell modules in C# so I can make a ASP.Net webinterface using my PowerShell backend.

Read More…

PowerShell: Reusable PSSessions

Problem

I wanted to be able to run any script from any workstation on our network but I did not want to have any credentials hard-coded.

Read More…

PowerShell: Confirm

Discovery

While writing a cmdlet I wanted to be able to use the -Confirm parameter so I could ask for a confirmation when doing something “dangerous”

Read More…

PowerShell: Validating RRNr

Problem

I want to validate any given RRNr (Rijksregisternummer, the Belgian equivalent of a SSN).

Read More…

PowerShell: Out-GridView

Discovery

While browsing the interwebs I came across a neat little command:
Out-GridView

Read More…

Powershell: Exception Analysis

Problem

I’v been having some trouble catching the correct Exception object in a try/catch-block.

Read More…