We're giving an old Windows 8.1 machine away to somebody who needs it and want to take it off the domain. before doing this we need to know the local administrator password.

Logged in to the machine as the domain admin, is there a simple way to reset the machine password before taking it off the domain, so as to still have working credentials?

I tried running

```
Reset-ComputerMachinePassword

```

from within Powershell but that didn't ask for any credentials, nor did it return any error. Apparently that changed the credentials it uses to communicate with the domain.