Get-ADDomainController -Filter * | Select-Object Name, @{n="Hash";e={Get-FileHash \\$_.Name\netlogon\site\logon.bat}}
Output
Name Hash
---- ----
DC001
DC002
Any ideas why this isn't working. It's been a while since I used a hash table to pull information like this, so I must be missing something minor. I have also tried to just return the name, Get-Childitem, which doesn't work. I have also tried just $_.Name, which does work and returns a string.
I am trying to verify the file exists and is the same on all DCs.