title: DSInternals Error in Powershell "Exception thrown by target of Invocation" while using Get-ADReplAccount
body: <p>I recently built a script in powershell using DSInternals to specifically use the cmdlet &quot;Get-ADReplAccount&quot; and dump NT hashes. In a testing environment on a newly built DC it works like a charm, but is run from the DC rather than remotely.</p>
  <p>When put into production, run from a VM connected to the domain of the DC, it only pulls two default mailbox accounts which do not have any secret attributes or hashes within their perspective accounts. For the rest of the accounts in the domain a non-descript error &quot;Exception thrown by target of the invocation&quot; is thrown for every account.</p>
  <p>I have tried this script while not joined to the domain, while joined to the domain, and from domain admin accounts with permission throughout the DC.</p>
  <p>In production I cannot install the DSInternals module onto the DC like I can in testing, so that option is already out the window.</p>
  <p>I've been and still am researching other options to troubleshoot this issue but if anyone has any experience or answers I'd greatly appreciate it.</p>