Blog Posts

Health Check Ping with EF Core and MSSQL

Health Check Ping with EF Core and MSSQL

Sometimes it is quite useful to be able to send a query to the MSSQL server independently of its schema; for example to check if the server is princi

Why you should no longer use var in C#

Why you should no longer use var in C#

Beginning with C# 3, variables that are declared at method scope can have an implicit "type" var. An implicitly typed local variable is st

Embed Code into your blog - and also on Medium

Embed Code into your blog - and also on Medium

There are several ways to integrate source code including code highlighting into blogs, but GitHub Gists are by far the most convenient and best main

Requesting Microsoft Defender HTTP API with .NET and Refit

Requesting Microsoft Defender HTTP API with .NET and Refit

The Microsoft Defender API - or Azure Security Center API - is an interface to obtain security-related information from its M365 or Azure tenant. At

Configure Azure Active Directory for UserName-Password Login

Configure Azure Active Directory for UserName-Password Login

Attention: the following configuration is recommended only for testing or very trusted applications, since username and password could be intercepte

List local Windows Administator names with PowerShell

List local Windows Administator names with PowerShell

To list the local administator accounts, you can just use the group membership command Get-LocalGroupMember -Group "Administrators" Object

List local Windows Administator names with .NET

List local Windows Administator names with .NET

First, you need to install the NuGet Package System.DirectoryServices.AccountManagement Now you can open a context and get all members of the built-i