Installing SCCM Client in a Untrusted Domain

Background:

SCCM Server in my datacenter is corrupt.

Migrating my clients to a new SCCM Management Server.

These servers are in a WORKGROUP domain. There is no trust between this WORKGROUP domain and the SCCM server/domain.

Pre-Reqs:

Firewall Ports open between clients and Management Point.

ProtocolPort
TCP80, 443, 3268, 10123, 8530, 8531, 2701, 3389
UDP67, 68, 69, 4011
  1. Copy the SCCM Client package from the Management Point to each server.
  2. Open a Command Prompt as an Administrator and run the following command:

ccmsetup.exe /mp:<management FQDN> /SMSSITECODE:<SiteCode> SMSMP:<ManagementPoint> DNSSUFFIX:<FQDN>

Eg:

ccmsetup.exe /mp:sccmmp.dev.1giantnerd /SMSSITECODE:DEV SMSMP:sccmmp.dev.1giantnerd DNSSUFFIX:dev.1giantnerd

SCCM Client Install – WMI Corrupt

Recently moving my SCCM Clients to a new SCCM Primary Site.
NP – these clients sit in an untrusted domain.

Used the CCMClean tool to clean up all traces of the old SCCM Client. Then installed the new SCCM Client successfully.

For a handful of clients, the above process wouldnt work.
Errors in the logs indicated a corrupt WMI Repository.

Below details how to fix a corrupted WMI Repository.

Solution:


Stop SMS Agent Host.
net stop cmmexec

Stop WMI Service.
net stop winmgmt

Delete WMI Repo.
rmdir /s /q %WINDIR%\System32\wbem\repository

Start WMI Service.
net start winmgmt

Start SMS Agent Host.
net start cmmexec

Install the SCCM Client.

WMI Repository Corrupt

Been struggling to install the SCCM Client on a Windows Server 2008 R2 server for 2 months. Recently had a maintenance window where I could determine why the SCCM Client was not installing to this server.
Examined it further and found the below.

Problem

The below is from the C:\Windows\CCMSetup\CCMSetup.log file.

Error – Failed to open to WMI namespace ‘\\.\root\cimv2’ while trying to remotely install the SCCM Client.

WMIRepoCorrupt#1

The WMI Repository is corrupt. No matter what you do you wont be able to install the client, unless you do the below.

Solution

Open a Command Prompt as an Administraor and run the following command:

Winmgmt /resetrepository

This will reset the WMI Repository back to the initial state when the operating system is first installed.
This is a safer and better way than deleting the WMI Repository like some forums suggest.