🚀 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
Looking for the old TechNet Gallery and found that Microsoft had archived site information. Microsoft Archive from GitHub Another way to get to the old TechNet Gallery. Wayback
🧰 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
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
I was looking for a way to select from a list of systems to RDP into and came up with a combo box inside of a form. Simple form display Add-Type -AssemblyName System.Windows.Forms # Create the form $form = New-Object System.Windows.Forms.Form $form.Text = “RDP Connection” $form.Size = New-Object…
Read more
Below is a PowerShell script that will run five batch files, create a log file, and verify if a folder exists. If the folder does not exist, it will create the folder. # Define the folder path and log file path $folderPath = “C:\YourFolderPath” $logFilePath = “C:\YourFolderPath\log.txt” # Verify if the folder exists, if not,…
Read more
Recently was asked to run a series of batch files. Below is a PowerShell script that will run five batch files, create a log file for each execution, and verify the folder location before running the batch files. # Define the folder location and batch files $folderPath = “C:\Path\To\Your\BatchFiles” $batchFiles = @(“batch1.bat”, “batch2.bat”, “batch3.bat”, “batch4.bat”,…
Read more
Here’s a PowerShell script that defines a function to download a file, unblock it, install it, and return the installed version. The function accepts multiple parameters for flexibility. function Install-Software { param ( [Parameter(Mandatory = $true)] [string]$DownloadUrl, [Parameter(Mandatory = $true)] [string]$DestinationPath, [Parameter(Mandatory = $true)] [string]$InstallerArguments, [Parameter(Mandatory = $true)] [string]$VersionCommand ) try { # Step 1:…
Read more
Looking to see what the current BIOS version is by running the following PowerShell script. This provides Manufacturer, version and the release date $bios = Get-CimInstance -ClassName CIM_BIOSElement $bios | Select-Object Manufacturer, Version, ReleaseDate
Below is a PowerShell function that sets a registry value for all users on a Windows machine. This function will iterate through all user profiles and set the specified registry value. function Set-RegistryValueForAllUsers { param ( [Parameter(Mandatory = $true)] [string]$RegistryPath, [Parameter(Mandatory = $true)] [string]$ValueName, [Parameter(Mandatory = $true)] [string]$ValueData, [Parameter(Mandatory = $false)] [Microsoft.Win32.RegistryValueKind]$ValueType = [Microsoft.Win32.RegistryValueKind]::String )…
Read more