Quick tip: Invoke-WebRequest and SSL/TLS

If you have ever tried using Invoke-WebRequest to get a webpage using SSL, you will most likely have seen the following error message:

Invoke-WebRequest : The request was aborted: Could not create SSL/TLS secure channel.

The simple “fix” for this problem is to tell PowerShell to use TLS 1.2 instead of the default 1.0:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri "https://some.site.com"

Filtering data on date in PowerShell

When working with large data sets, being able to effectively filter the data is essential. A common exercise where you might need filtering on date is when reading logs, and in this blog post I will show you how you can perform the typical “get all logs from the last x days” and “get all logs between day x and day y” scenarios. (more…)

PowerShell 6 and ‘ls’

I’m one of those that always preferred to use the alias ls instead of dir for Get-ChildItem. In the beginning I mixed them up, but when I started using Linux more and more I liked that I could use the same command for the same thing in both PowerShell and bash.

Enter PowerShell 6, available to run on Linux and suddenly ls is not the same as ls anymore! (more…)

Authenticating to Azure in a release pipeline

When doing automated deployments to Azure, I found that I was missing a single approach for authentication when used both in a release pipeline, and when doing ad hoc testing during development.

I needed something that let me use an Azure Service Principal for automated processes, as well as using my private credentials for other usages.

After many iterations, I think I have something that is worthwhile sharing with others, in the form of simple templates that gives you a kick-start to any Azure project! (more…)

My MVP award, and about giving recognition for community work

As my followers on social media may have seen already, I have been awarded the Microsoft MVP award in the “Cloud and Datacenter Management” category. For this I’m deeply humbled and grateful.

Getting any kind of recognition for work done is of course highly rewarding in itself, but I’d like to take the opportunity to write down my thoughts on the act of giving and receiving recognition for community work. (more…)