Jump to content

Recommended Posts

Posted

Hey everyone!

 

So, I'm dealing with an issue here and am hoping everyone may be able to help me figure out what happened as I work through it. Have been using SCCM for several years now for reimaging machines, both as bare-metal installs and refreshes of current machines. However, we purchased several hundred machines this past school year, which we ended up imaging via a flash drive created in SCCM via the bootable media tool along with a USB to Ethernet adapter. The flash drive didn't contain the actual image, but only served as a means to connect the machine back to the server via the USB to Ethernet adapter. No problem there...until this school year. We reimaged all of these machines this Summer and I'm finding that many are having trust related issues as many seem to have the wrong computer name (many a name that belongs to another machine). I've never run into this before I think I know the answer, but am just looking for confirmation. I use a variable within my SCCM task sequence that can pick up that computer name and, while imaging, give the technician the option to take the old name or enter a new one. Since these machines all are named already, we typically just skip this option and use the old name. So, my question...how exactly does SCCM remember the computer name when reimaging? My theory is that since we used the same USB Ethernet adapters between several machines, SCCM used the MAC address of the adapter itself instead of something on the machine to remember the computer name and that is why I'm running into the issue of the same computer name on multiple machines...

 

I realized there isn't much I can do at this point other than wait for my student users to bring there computers to me (it's a 1 to 1 program we recently initiated) and unjoin them from the domain, correctly name the computer, and then rejoin the machine, but just looking for confirmation of the issue so I know what to avoid next time we reimage the laptops.

 

Thoughts?

 

Thanks in advance!

Posted

It sounds to me like your supposition of the MAC address being the prime mover in this is correct.

 

I seem to recall having to move an HDD from one machine to another and then rebuild. When the build was complete the station had the name it had before (not the name that would have come with the HDD) Makes sense when you think about it.

 

If I want to give a station a completely new name I delete the old name in Active Directory and SCCM and then when the station 'sees' SCCM it prompts for a station name before the build begins.

  • Thanks 1
Posted

You're thinking is right, SCCM uses the MAC address to identify machines (as well as the machine's SMBIOS GUID).

 

if you were running a later version of SCCM (CB 1610 or above) then managing duplicate MAC addresses can be done in the console - but with 2012 you would need to edit the registry on the server.

 

See https://www.systemcenterdudes.com/sccm-duplicate-hardware-identifiers/ for more details.

 

We run a powershell script once the machine has been imaged and built to work around this (haven't got around to following the guide on the above webpage ourselves yet).

 

Connect the machine to the network, wait for the SCCM client to be fully running and then run the below from an elevated powershell prompt and it should allow you to re-use the ethernet adaptor without picking up the wrong names

 

# Ask to remove Ethernet dongle 

$wshell = New-Object -ComObject Wscript.Shell 
$continue = $wshell.Popup("Please disconnect the Ethernet adapter from the USB port",0,"Action Needed",0x1)  

if($continue -ne 1) {Exit 1} 
 
# Checks if Ethernet adapter was disconnected every 3s 

Do 
{ 
Start-Sleep -s 3 
} while ([boolean] (Get-NetIPAddress -InterfaceAlias *Ethernet* | where{$_.IPAddress -notlike "169.254.*.*"})) 
 
# Checks if the WiFi adapeter has a valid IP every 3s 
### ACTION::: replace www.bing.com with the IP Address of  
### your CM Management Point or a know IP address on your network 

Do 
{ 
Start-Sleep -s 3 
} while (!(Test-Connection -ComputerName  -Quiet)) 
  
# Wait until device is associated to a site in Configuration Manager 

Do 
{ 
Start-Sleep -s 3 
Write-host "Checking if Device is associated with Configuration Manager Site" 
} while (![boolean] ($([WmiClass]"\\localhost\ROOT\ccm:SMS_Client").getassignedsite())) 
 
# Get Heartbeat and run Hardware Inventory 

$SMSCli = [WmiClass]"\\localhost\ROOT\ccm:SMS_Client" 
$SMSCli.triggerschedule("{00000000-0000-0000-0000-000000000003}") 
 
# Done 

Write-Host "All done! We will now recognize your device from its Internal Mac Address" -ForegroundColor black -BackgroundColor cyan

# end 
Exit 0

  • Thanks 1
Posted
Thanks Martin and Dave. Had a feeling that was what was happening, just wanted to make sure I was thinking along the right lines. We are running the CB version of SCCM, so Dave, I'll have to look more into the URL you listed to see how to really set this up so we can avoid this in the future. Many thanks!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...