I really dont know how easy or difficult this could be. But I am placing it here just in case.
The solution provided work like a charm. No issues.
However when I try to run it as a SQL Agent job as an SSIS package or just Plain Powershell code. I runs and it failed. This is most likely because SQL will not allow Powershell to open an Instance of IE and runtime to do test.
So basically what I want to do is place this code on a schedule so it runs every Sunday Morning.
I did try a Windows Task by the way but it just ran and did not produce anything it just hung. So my question is how do I create a Job that runs for the Powerhsell code?
PS version 4.0
OS Windows 2008 R2
SQL 2008 R2