A pure Powershell script module help you access the MS UIAutomation API in Powershell.