Today I have been going through our SAM installation and just verifying the templates and servers are polling correctly. I noticed the "Active Directory Health Check Details View" template was not correctly polling.
So I get into the template and see what powershell script is running, I then try that on one of the DC's and it all works as it should. Then I had the Aha moment, these are not running from the DC but as a command to the remote from the poller. SO I checked our SAM poller and lo and behold no Active Directory powershell modules were installed. So I added the AD modules and walla all is working great now.
So the moral of the story, when running powershell based monitors from a polling engine, make sure it has the correct PS modules installed.