Make sure you know the password for the local administrator account then you can;
Remove-Computer -UnjoinDomaincredential Domain01\Admin01 -PassThru -Verbose -Restart
--please don't forget to close up the thread here by marking answer if the reply is helpful--