I am trying to write script below that will list the domain controller all computers in an OU are using for authentication and export the data to a file. Scripting is not my wheelhouse so I thought I would enlist some assistance.

Get-ADDomainController -filter * will return all domain controllers based on the machine used. It won't return the authenticating DC for a remote machine. You'd also need to have the AD cmdlets on all machines to be able to use that approach