Rename-Computer error

Trying to rename a remote computer how I get the error
“Cannot establish the WMI connection to the computer ‘computer’ with the following error message: Not Found.”

I am specifying domain creds

I can ping remote computer

I am able to use Get-WmiObject on the same remote computer without a problem.

Is the name of the remote computer actually “computer”, have you replaced it before posting or have you provided the wrong computer name to the Cmdlet?

You need admin level access to rename the computer. Do your credentials supply the correct level of access. Can you post the code you are using?

I’m using the command

Rename-Computer -ComputerName ret-hurt -NewName retline-3 -DomainCredential domain\admin

I’m using domain admin credentials

Thanks for your help!

According to you initial post you can connect to the remote computer using Get-WmiObject - that means you have a DCOM connection

When you ping the remote machine - is it by IP address or name?

when I ping it is by name