Category Archives: Powershell

Using a directory array for a choice menu inside a function

Usage of [System.Management.Automation.Host.ChoiceDescription[]] and $host.ui.PromptForChoice() with an array of data for choices. Default behavior when using functions is that the return value is every output, so when you want to return a value, using Write-Host inside the function will mess the return value up. The scenario is I wanted the user to provide a name,… Read More »

Conditional Where Clause in Powershell

Switching between ‘match‘ and ‘eq‘ in a where clause, depending on a variable:


SPTrustedIdentityTokenIssuer URI invalid

This week a problem occured on our SharePoint environment due to human error, but with unexpected SharePoint behavior driving the cause and troubling the solution. Somehow it is possible to update the SPTrustedIdentityTokenIssuer property ProviderSignoutUri with an invalid value, and all subsequent repair actions will fail, as well as many SPTimerjobs. All give the same… Read More »

Saving passwords securely in Powershell

When dealing with passwords in unattended installations, the challenge is always if the password is securly stored. One way to deal with it is to use “Read-Host -AsSecureString” on the target server from within the script. But when dealing with a lot of passwords in 1 script, this will cause a lot of prompts. You… Read More »

Convert pfx certificates to crt on Windows

The most cited and advised way to convert a pfx certificate file to crt, is to use openssl. For a Windows server I will look at alternatives using Powershell. On a Windows server, openssl isn’t available, but if a small external download is an option, you can still find a Windows ported version of openssl, it really… Read More »

Testing WordPress

Lets have a go with my own blog!   Offcourse it needs some Powershell code support:

And some PHP for instance:

But more likely are scripting languages like Python, Javascript, etc.

Also added a widget, got some modrewrite for friendly URL’s, some plug-ins, a photo, its getting somewhere…