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