Endpoint Management

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

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

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

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