I wrote this script awhile back for the same issues/scenario. It removes "everything" that the ConfigMgr client creates and more.
Remove-ConfigMgrClient.ps1 on GitHub
#.SYNOPSIS
# Remove-ConfigMgrClient.ps1
# run ConfigMgr's uninstall command and cleanup leftover files, registry keys, and certificates
#.DESCRIPTION
# Log high-level actions to C:\Windows\Logs\CCMSetup-Uninstall.log
# Stop ConfigMgr services
# Copy CMTrace to C:\Windows to preserve it as a troubleshooting tool
# Execute CCMsetup.exe /uninstall
# Remove ConfigMgr services from registry
# Remove ConfigMgr Client from registry
# Remove leftover folders and files
# Remove ConfigMgr Start Menu Software Center shortcut and empty folder
# Remove ConfigMgr self-signed certificates
# If -Force parameter used
# Remove WMI Namespaces
# Remove Windows Update Agent policies and rely on GPO or MDM to reapply them
# Reset MDM Authority