Endpoint Management

Windows 10/11 – MECM – SCCM – Intune – PowerShell – Power Automate – O365 – Azure

Error while importing drivers in SCCM

        *** [25000][266][Microsoft][SQL Server Native Client 11.0][SQL Server]Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 1, current count = 0. : sp_SetupCI        SMS Provider        1/7/2023 7:00:19 PM        8788 (0x2254)     *~*~[25000][266][Microsoft][SQL Server Native Client 11.0][SQL Server]Transaction count after EXECUTE indicates a mismatching number of BEGIN and […]

Windows Firewall – Disable / Enable

# Check Firewall StatusGet-NetFirewallProfile | Format-Table Name, Enabled # Disable FirewallSet-NetFirewallProfile -Profile Domain, Public, Private -Enabled False # Check Firewall StatusGet-NetFirewallProfile | Format-Table Name, Enabled # Enable FirewallSet-NetFirewallProfile -Profile Domain, Public, Private -Enabled True

PowerShell: Detect and Fix – Hybrid Join, CCM CoManagement and Intune Service

# Removing any previous variables and their values (if any) Remove-Variable -Name “*Check*” -Force -ErrorAction SilentlyContinue # Defining variables and system status $HybridCheck = C:\Windows\System32\dsregcmd.exe -ArgumentList “/status” -NoNewWindow | Select-String -Pattern KeySignTest | Select-Object -ExpandProperty Line -ErrorAction SilentlyContinue $CoManagementCheck = Get-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\CCM -Name “CoManagementFlags” | Select-Object -ExpandProperty CoManagementFlags -ErrorAction SilentlyContinue $IntuneServicecheck = Get-Service -DisplayName […]

PrintNightmare Fix – Finally

CVE-2021-34527 ‘PrintNightmare’ Known issues with KB5006667 Error: Windows cannot connect to Printer Detail: Recently introduced security update by Microsoft is causing failure for installation of Printer on Windows 10 Resolution : For now until further update, uninstall the patch and complete the printer installation. Let the patch install again later after next client policy update. […]

MS Defender – Fix Sensor Onboarding Issue

Sometimes you will notice that few machines will fail to complete the Defender Onboarding process. This issue could occur due to multiple reasons, one of the common reasons is machine unexpectedly restarted during the onboarding process. There is no article or any documentation from Microsoft explaining this behavior however, on further troubleshooting using process monitor, […]

Power Automate – Send Birthday Email

If you are just starting with power automate and trying out some simple stuffs to find your way around. One of the most popular automation is to trigger an automated email greeting Birthday wishes to your colleagues. Not everyone would have access to system to fetch the birthdates of colleagues. If you have a small […]

Query SCCM Baselines using WMI

To get list of all baselines assigned to the computer: Open PowerShell with elevated privilege and run below command:     Get-WmiObject -Namespace root\ccm\dcm -class SMS_DesiredConfiguration | Select-Object -Property DisplayName | Sort-Object -Property DisplayName       To Trigger evaluation of one specific baseline: e.g., you want to trigger a baseline that evaluates Hybrid Azure […]

Hybrid Azure Join script

# You can use this as a RUN Script in SCCM or package it and make it available in software center # Performs DSREGCMD /join (requires elevation) and triggers Intune-Device-Sync # Status of each step is logged as well. $LogFilePathJoin = “C:\Windows\Temp\Logs\CA_Hybrid_Join.log” $LogFilePathStatus = “C:\Windows\Temp\Logs\CA_Hybrid_status.log” Start-Process -FilePath “C:\Windows\system32\dsregcmd.exe” -ArgumentList (“/join /debug”) -NoNewWindow -PassThru -RedirectStandardOutput “$LogFilePathJoin” […]

Request SCCM PKI certificate during OSD

Enterprises who use PKI certificate for communication between Clients and SCCM server, often experience delay in client receiving certificate after OSD Task Sequence is completed. It takes the GPO to apply on systems and then client to fetch the certificate and sccm service to be restarted or system restarted once to get the initial communication […]

Using Run Scripts feature in SCCM

Most of the ConfigMgr (MEMCM) admins often must take custom actions on a device or group of devices in a collection. These tasks could be running ConfigMgr client actions or making any ad-hoc changes to the system as required without user intervention.     While there any many third-party tools available that you can purchase […]

Find installed O365 apps version

To find version on single machine: Get-ItemPropertyValue -Path HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration -Name “VersionToReport”     To find version on multiple machines: Invoke-Command -ScriptBlock {Get-ItemPropertyValue -Path HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration -Name “VersionToReport”} -ComputerName PC1,PC2,PC3