I have found the following script, but not able to get the expected result: computer, lastlogon. Using Windows 10. For some reason I am getting this error:
Get-ADComp