Martin Bengtsson
Blogs, Articles, and Posts
Auditing Password Reuse in On-Premises Active Directory with PowerShell and DSInternals
(imab.dk)
Introduction Password reuse among privileged accounts represents one of the most critical security
By: Martin Bengtsson submitted:Oct 24 2025
Introduction Password reuse among privileged accounts represents one of the most critical security
vulnerabilities in on-premises Active Directory environments. When multiple privileged accounts share the same password, a single compromise can cascade across your entire infrastructure. In this post, I'll demonstrate how to audit your Active Directory environment for shared passwords using PowerShell and the DSInternals module.
By: Martin Bengtsson submitted:Oct 24 2025
Automatically remind users to update iOS with e-mails and custom notifications using Microsoft Intune Powershell SDK
(imab.dk)
The story here is, that iOS is getting updates quite frequently, and a lot of enterprises (including
By: Martin Bengtsson submitted:Jun 15 2022
The story here is, that iOS is getting updates quite frequently, and a lot of enterprises (including
myself), are managing those iOS devices as private BYOD devices enrolled through the Company Portal. As of such, keeping the devices up to date is the end-user's responsibility and something that's often forgotten and neglected. So what if we could send those devices and users a kind reminder automatically, both as a custom notification directly on the device, but also as an e-mail? Microsoft Intune Powershell SDK to the rescue!
By: Martin Bengtsson submitted:Jun 15 2022
Automatically remove and disable unwelcome objects from privileged on-premises Active Directory groups using Microsoft Sentinel
(imab.dk)
Introduction Active Directory is a prime target for attackers - and for most organizations something
By: Martin Bengtsson submitted:Oct 27 2023
Introduction Active Directory is a prime target for attackers - and for most organizations something
that's considered the crown jewels. This is due to Active Directory still being the bread and butter for most organizations in regard to authentication and authorization. When it comes to security, automation is your best friend and keeping a close eye on privileged group membership should be on top of your list. This post will walk you through, how you can make sure no unwelcome objects make their way into privileged groups in on-premises AD, by leveraging Microsoft Sentinel and its option to run playbooks automated. This breaks down to Microsoft Sentinel generating an alert, which triggers the associated Playbook, which triggers a Logic app, which triggers a Runbook in an Automation Account, which ultimately runs a PowerShell script on an on-premises server.
By: Martin Bengtsson submitted:Oct 27 2023
Automating ‘Have I Been Pwned’ Breach Checks for Entra ID Groups using PowerShell
(imab.dk)
Introduction In today's digital landscape, data breaches are unfortunately common. As
By: Martin Bengtsson submitted:Oct 31 2025
Introduction In today's digital landscape, data breaches are unfortunately common. As
security-conscious professionals, we need to be proactive about monitoring whether our users' credentials have been compromised. That's why I built an automated PowerShell tool that checks Entra ID (Azure AD) group members against the Have I Been Pwned database.
By: Martin Bengtsson submitted:Oct 31 2025
Automating Sysmon installation and configuration with PowerShell
(imab.dk)
Introduction In today's fast-paced digital world, quick response to security incidents is crucial.
By: Martin Bengtsson submitted:Feb 20 2025
Introduction In today's fast-paced digital world, quick response to security incidents is crucial.
Sysmon (System Monitor) from Microsoft's Sysinternals suite is an essential tool for detailed system monitoring and security analysis. However, traditional installation can be time-consuming, especially in urgent situations. This blog post introduces a PowerShell script that automates the download, extraction, and installation of Sysmon, along with applying a pre-configured setup.
By: Martin Bengtsson submitted:Feb 20 2025
Comparing Security Baselines in Endpoint Manager using PowerShell and Microsoft Graph API
(imab.dk)
Security Baselines, and those for Windows 10 in particular, consist of a lot settings. So I wondered
By: Martin Bengtsson submitted:Jun 16 2022
Security Baselines, and those for Windows 10 in particular, consist of a lot settings. So I wondered
what's changed and started browsing and comparing the various settings via the admin portal. Then I realized how that's not very optimal, and began looking for alternatives. I eventually got myself into trying something new, and went on to compare the Security Baselines Profiles using Powershell and the Microsoft Graph. The result of that journey is this post.
By: Martin Bengtsson submitted:Jun 16 2022
Configure ‘Allow logon locally’ automatically using PowerShell and Microsoft Intune
(imab.dk)
I know Microsoft Intune has the ability to configure this particular user rights assignment natively
By: Martin Bengtsson submitted:May 17 2024
I know Microsoft Intune has the ability to configure this particular user rights assignment natively
already. At time of writing, the new security baseline for Windows 11 23H2 in Intune configure this as well, restricting local logons to the built-in groups: Users and Administrators. This solution does something else. This solution grabs the currently logged on user and configures the 'Allow logon locally' policy to ONLY allow this very user as well as Administrators to be able to log on locally.
By: Martin Bengtsson submitted:May 17 2024
Customize your Windows 11 (23H2 and onwards) taskbar during OSD with ConfigMgr using just PowerShell
(imab.dk)
Approximately two years ago, I authored a blog post detailing how to customize the taskbar in
By: Martin Bengtsson submitted:Oct 4 2024
Approximately two years ago, I authored a blog post detailing how to customize the taskbar in
Windows 11.
By: Martin Bengtsson submitted:Oct 4 2024
Notifying users on Windows when an iOS update is required – Microsoft Intune, Automation Account and Toast Notification Script combined
(imab.dk)
Introduction Your users carry iPhones but spend most of their workday on Windows devices. When Apple
By: Martin Bengtsson submitted:Nov 14 2025
Introduction Your users carry iPhones but spend most of their workday on Windows devices. When Apple
releases an iOS update, Intune can flag non-compliance - but the built-in notifications on iOS are often overlooked and don't have the same visibility or urgency as alerts on a user's primary work device. The solution: cross-platform automation.
By: Martin Bengtsson submitted:Nov 14 2025
Prevent users from switching and migrating to new Outlook using PowerShell and Microsoft Intune
(imab.dk)
Prevent future automatic migration to the new Outlook. In this post, I'll share the PowerShell
By: Martin Bengtsson submitted:Dec 13 2024
Prevent future automatic migration to the new Outlook. In this post, I'll share the PowerShell
script I'm using to prevent users from migrating to the new Outlook if your environment isn't quite ready for it.
By: Martin Bengtsson submitted:Dec 13 2024
Reduce your attack surface by disabling NetBIOS using PowerShell and Microsoft Intune
(imab.dk)
Introduction If you are working with device management and IT security in general, you have probably
By: Martin Bengtsson submitted:Apr 5 2024
Introduction If you are working with device management and IT security in general, you have probably
heard about the recommendation to disable the legacy protocol NetBIOS in Windows. If this is news to you, there's some interesting reading for you in this article: Adversary-in-the-Middle: LLMNR/NBT-NS Poisoning and SMB Relay, Sub-technique T1557.001 - Enterprise | MITRE ATT&CK NOTE: Before disabling anything, make sure you do your due diligence and monitor your environment for NetBIOS traffic, so you don't accidently break stuff!
By: Martin Bengtsson submitted:Apr 5 2024
Uninstall any application in a jiffy using PowerShell and Microsoft Intune
(imab.dk)
Introduction This post is a just a quick follow up on my previous post: Uninstall any application in
By: Martin Bengtsson submitted:Jan 5 2024
Introduction This post is a just a quick follow up on my previous post: Uninstall any application in
a jiffy using PowerShell and Configuration Manager I received a few questions whether the PowerShell script can be used with Microsoft Intune instead of Microsoft Configuration Manager. And sure! This post will explain one of many approaches available with Intune.
By: Martin Bengtsson submitted:Jan 5 2024
Projects, Scripts, and Modules
Configure default fonts in Outlook (classic) with PowerShell and Microsoft Intune
(imab.dk)
Introduction In my previous post, I shared a PowerShell template for managing registry settings via
By: Martin Bengtsson submitted:Jan 30 2026
Introduction In my previous post, I shared a PowerShell template for managing registry settings via
Microsoft Intune Remediations. The script handles both HKCU and HKLM, supports all registry types, and works on Microsoft Entra ID and hybrid joined devices.
By: Martin Bengtsson submitted:Jan 30 2026
Deploying and configuring uBlock Origin Lite with PowerShell and Microsoft Intune
(imab.dk)
Introduction Ad blocking is often dismissed as a convenience feature for users tired of intrusive
By: Martin Bengtsson submitted:Dec 12 2025
Introduction Ad blocking is often dismissed as a convenience feature for users tired of intrusive
banners and pop-ups. But in 2025 - almost 2026 - it's time to reframe the conversation: ad blocking is a fundamental security control every organization should implement.
By: Martin Bengtsson submitted:Dec 12 2025
Install-NewRDCMan.ps1
(github.com)
Install the new Remote Desktop Connection Manager (RDCMan) with PowerShell
By: Martin Bengtsson submitted:Jun 16 2022
Install the new Remote Desktop Connection Manager (RDCMan) with PowerShell
By: Martin Bengtsson submitted:Jun 16 2022
Template for the Win32 PowerShell script installer in Microsoft Intune
(imab.dk)
Introduction Microsoft Intune now supports using a PowerShell script as the installer for Win32
By: Martin Bengtsson submitted:Feb 20 2026
Introduction Microsoft Intune now supports using a PowerShell script as the installer for Win32
apps. Instead of specifying a command line, you upload a script. This gives admins more flexibility when deploying applications. I've created a template (install and uninstall) that can serve as inspiration
By: Martin Bengtsson submitted:Feb 20 2026
Toast Notification Script v3 is here!
(imab.dk)
Introduction I've completely REWRITTEN my popular Toast Notification Script from the ground up - now
By: Martin Bengtsson submitted:Nov 7 2025
Introduction I've completely REWRITTEN my popular Toast Notification Script from the ground up - now
exclusively for Microsoft Intune!
By: Martin Bengtsson submitted:Nov 7 2025
