So I have a powershell script,
Add-Computer -ComputerName $computername -LocalCredential $computername\admin -DomainName $domain -Credential domain\$username -Force -Restart
So if I have a machine that has either fallen off the domain or is disabled, and I run the following command, I get an error:
Remove-Computer : Cannot establish the WMI connection to the computer '$computername' with the following error message: The
RPC server is unavailable. (Exception from HRESULT: 0x800706BA).
Now I have verified that the machine is in fact on the network and I am able to RDP to it. IS there something wrong or will this not work if the machine is not active in AD?
User contributions licensed under CC BY-SA 3.0