How to export user aliases from Microsoft Entra using PowerShell

 
 
  • Gérald Barré
Microsoft Graph is a REST API that allows you to interact with Microsoft 365 services. You can use it to automate tasks such as creating users, updating their properties, or exporting data. In this post, I'll show you how to export user email addresses and aliases from Microsoft Entra using PowerShell. First, you need to install the Microsoft.Graph module: Install-Module Microsoft.Graph -Scope CurrentUser… [read more]

Useful resources to write Roslyn Analyzers

 
 
  • Gérald Barré
Roslyn analyzers and source generators are useful but it's not easy to start writing them. The documentation is not at the same level as .NET or ASP.NET Core. There are some good resources on the internet. In this post, I share some resources to help you write Roslyn analyzers and source generators. View Syntax tree and IOperation tree When you write a Roslyn analyzer, you need to understand the syntax… [read more]

Create a bootable USB drive for Windows Server

 
 
  • Gérald Barré
The Windows Server image contains a .wim file which is bigger than 4GB. This is a problem because FAT32 does not support files bigger than 4GB. To solve this problem, we need to split the .wim file into smaller files. This can be done with the dism command. The following script extracts the content of the ISO file, splits the .wim file, formats the USB drive, and copies the files to the USB drive. # TODO… [read more]

Enable NuGet auditing for your .NET projects

 
 
  • Gérald Barré
A security audit for package managers like NuGet is indeed a critical process for ensuring the security of software projects. NuGet has a feature to assist with this process. It can run a security audit with the dotnet restore command, which checks your dependencies against a list of known vulnerabilities from the GitHub Advisory Database. If vulnerabilities are found, you can update the affected packages… [read more]