MECM

Just another Tech site

MECM – Software install for a specific user

SCCM can report software by user, but only if you structure the query around user-to-device relationships, because SCCM fundamentally inventories software per device, not per AD user. The trick is to join: AD user → SCCM user resource User resource → primary devices (User Device Affinity or logon history) Device → installed software inventory Device…
Read more

PowerShell – Copy and remove old files for installation for MECMcache

Below is the updated PowerShell 5.1 script that accepts -AppName, -Version, and -SourceFile, unblocks the source file before copying it to C:\Windows\_MECMCache\$AppName\$Version, creates directories as needed, removes version folders older than 60 days, and logs actions and errors to a file and the Windows Application event log.   <# .SYNOPSIS Copy a file into MECM…
Read more

MECM: SQL query for a report by collection, model, count

Wanted to create a SQL query to get a count of every model, per vendor like Dell based on the collection being used for creating a report in SSRS. This is a start. SELECT coll.Name AS [Collection Name], sys.Model0 AS [Model], COUNT(DISTINCT sys.ResourceID) AS [Model Count] FROM v_FullCollectionMembership fcm JOIN v_Collection coll ON fcm.CollectionID =…
Read more

MECM: clean uninstall

Trying to clean up MECM clients that have failed to get updated or have corrupt installs   <# MECM Full Removal Script – Graceful uninstall (if possible) – Forced cleanup of all MECM components – Logging to file – Summary report at end #> # ============================ # Logging + Summary Functions # ============================ $Global:LogFile =…
Read more

MECM: Client re-install

Re-installing the MECM client   <# MECM Reinstall Script – Installs MECM client cleanly after full removal – Logging + summary report – Validates installation success #> # ============================ # Logging + Summary Functions # ============================ $Global:LogFile = “C:\Windows\Temp\SCCM_Reinstall_$(Get-Date -Format ‘yyyyMMdd_HHmmss’).log” $Global:Summary = @() function Write-Log { param( [string]$Message, [string]$Level = “INFO” ) $timestamp =…
Read more

MECM: Client check

Updating to a new client and want to check to make sure the client is working correctly.   <# SCCM Health Check Script – Validates SCCM client health – Logging + summary report – Designed to pair with removal/reinstall scripts #> # ============================ # Logging + Summary Functions # ============================ $Global:LogFile = “C:\Windows\Temp\SCCM_HealthCheck_$(Get-Date -Format ‘yyyyMMdd_HHmmss’).log”…
Read more

MECM: uninstall MECM client from a list using PowerShell

Trying to cleanly clean up MECM client installation # Path to list of computers $ComputerList = Get-Content “C:\Scripts\Computers.txt” # Log file $LogFile = “C:\Scripts\SCCM_Removal_Log.txt” “=== SCCM/MECM Client Removal Log – $(Get-Date) ===” | Out-File $LogFile # Max concurrent jobs $MaxJobs = 20 # Script block for removal $RemoveSCCM = { param($ComputerName) try { Write-Host “[$ComputerName]…
Read more

Migration from MECM to Intune: A Complete Rollout Blueprint

Migration from MECM (SCCM) to Intune: A Complete Rollout Blueprint As organizations embrace cloud-first strategies, the shift from MECM (SCCM) to Microsoft Intune has become a defining step in modern endpoint management. This migration is more than a technical upgrade — it’s a strategic transformation that enables scalability, agility, and Zero Trust security. I’ve seen…
Read more

Step-by-Step: Automate SQL Report in MECM

⚙️ Step-by-Step: Automate SQL Report in MECM Automating a SQL report in Microsoft Endpoint Configuration Manager (MECM) involves creating a custom report in the Reporting Services Point (SSRS) and scheduling it for delivery. Here’s a step-by-step guide to help you automate your report: 1. 🧱 Create the Report in SSRS You’ll use SQL Server Report…
Read more

Automating a SQL Report in MECM

🚀 Automating a SQL Report in MECM Automating a SQL report in Microsoft Endpoint Configuration Manager (MECM) means setting it up to run on a schedule and deliver results—typically via email or file share—using SQL Server Reporting Services (SSRS). Here’s how to do it from start to finish: 🛠️ Step 1: Create the Report in…
Read more

SSRS Prerequisites for MECM Reporting

🧰 SSRS Prerequisites for MECM Reporting 🖥️ 1. SQL Server with SSRS Installed SSRS must be installed on the same server as SQL Server or a dedicated reporting server. You’ll need a compatible version of SQL Server (e.g., SQL Server 2019 or 2022). During installation, choose “Install and Configure” to set up the Report Server…
Read more

SQL – To track percentage completion of OS upgrades

To track percentage completion of OS upgrades from Windows 10 22H2 to Windows 11 24H2 in SCCM SELECT COUNT(*) AS TotalDevices, SUM(CASE WHEN os.Caption0 LIKE ‘%Windows 11%’ AND os.BuildNumber0 >= 26100 THEN 1 ELSE 0 END) AS UpgradedDevices, CAST(SUM(CASE WHEN os.Caption0 LIKE ‘%Windows 11%’ AND os.BuildNumber0 >= 26100 THEN 1 ELSE 0 END) * 100.0…
Read more