0

I'm trying to rename around 100 computer remotely. I have a csv file that is being importer and using rename-computer command to change the computer name but i'm facing the following error.

Rename-Computer : Cannot establish the WMI connection to the computer 'COMPUTERNAME' with the following error message:
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).
Import-Csv c:/Temp/names.csv | ForEach-Object {Rename-Computer -ComputerName $_.IPAddress -NewName $_.NewName -LocalCredential localhost\administrator -DomainCredential Domain\Administrator -Force -PassThru -Restart}

I went through alot of articles and did try the following stuff:

  • checked the services
  • turned off windows firewall
  • set this key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WBEM\CIMOM\AllowAnonymousCallback to 0
  • set this key Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Ole\AppCompat\RequireIntegrityActivationAuthenticationLevel to 0
  • checked WMI security, full permissions are there.
Mathias R. Jessen
  • 157,619
  • 12
  • 148
  • 206

0 Answers0