Welcome to the Jocha blog!

Detect and Elevate a PowerShell session

We’ve set out to help a customer with automation within their IT department.
Some daily tasks require an elevated prompt, there is no way around it. But it’s not obvious how to check if the current prompt is elevated, or how to elevate the session. So here is a how-to…

Installing .NET Framework on Windows 8 and 2012

I have been struggling a bit with adding .NET Framework 3.5 on a few systems (and reference image for MDT). The posts on MSDN and TechNet are good, but not always crystal clear.

Here is how I solved the issues we were experiencing…

Windows Backup Mail Report Script

Updated version available: This article covers v4.1 of the script (2016). A fully rewritten v5.0 is now available, compatible with Windows Server 2025 and using the SendGrid REST API instead of the deprecated Send-MailMessage.Read the updated article: Windows Server...

Fix for slow “Downloads” folder in Windows 10

In the last couple of weeks I’ve been noticing that clicking the “Downloads” folder in Windows Explorer took a long time to load.
After a bit of research, it turns out Windows 10 tries to guess…

Change the Azure AD Sync Schedule

I finally I got some time to play with the new Azure Active Directory Sync tool and its configuration.

The installation was very straight forward. The step-by-step instruction are provided on MSDN. The administration tools and scripts are located in difference places compared to DirSync which was little confusing in the beginning.

Managing Azure RBAC Assignments at Scale with PowerShell

Managing Azure RBAC Assignments at Scale with PowerShell

As Azure environments grow, keeping role assignments consistent and compliant becomes a significant operational challenge. Drifted permissions, orphaned identities, and undocumented manual assignments all create security risk. Using PowerShell to audit and enforce...

Automating Windows Autopilot Device Enrollment with PowerShell

Automating Windows Autopilot Device Enrollment with PowerShell

Windows Autopilot transforms device provisioning from a multi-hour imaging process into a zero-touch deployment experience. When you combine it with PowerShell automation, you can register hardware hashes, assign profiles, and track enrollment status entirely from the...

Configuring Conditional Access Policies with Microsoft Entra ID

Configuring Conditional Access Policies with Microsoft Entra ID

Conditional Access is the cornerstone of Zero Trust security in Microsoft Entra ID. Rather than managing dozens of policies by hand through the Azure portal, you can use PowerShell and the Microsoft Graph API to define, deploy, and version-control your policies with...

Automating Intune Device Compliance Policies with PowerShell

Automating Intune Device Compliance Policies with PowerShell

Manually configuring Microsoft Intune compliance policies across hundreds of devices is tedious and error-prone. By leveraging the Microsoft Graph API through PowerShell, you can define, deploy, and audit compliance policies programmatically — making your...

Enroll in Azure AD with error 8018000a

Enroll in Azure AD with error 8018000a

The 801800A issue is usually caused by a Windows client thinking it has a enrollment to Entra ID in progress. It will not “time out” so you will have to manually fix this…

Office365 Safe Attachment Delay Report

Office365 Safe Attachment Delay Report

Recently the Helpdesk have been getting cases about slow delivery times due to Office 365 ATP Safe Attachments. We have created a script to retrieve the data from Exchange Online, and then used Power BI to visualize it.

SCCM Baselines: Update Compliance

SCCM Baselines: Update Compliance

There are numerous of ways to measure update compliance in an enterprise. Some prefer to just compare the compliance of a Software Update Group against a collection. The issue I’ve found with this is that when you release updates the compliance falls down to 0%…