Endpoint Management

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

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, […]

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 […]