Schedule Task for Remote Server

May 24, 2010 at 5:43 PM

Hello,

I am pretty new to PowerShell and doesn't know how can I schedule this script using standard windows Task Schedular. What I want is that I want a list of Database to get downloaded as SQLDump from my remote server. The Script will run on Windows 2008 Server that I have in my office.

Also, I notice that when I run the script from PowerShell it doesn't enclosed the VarChar Field in Single Quote as standard SQL Query.

Here is one sample query it generate

INSERT INTO dbo.ListAddress(ListAddress_ID, MailingID, DealerID, UserID, FirstName, MiddleIni, LastName, Address, Address2, City, State, Zip, County, List_date) VALUES(87893, 441, 3004, 12842, LAURA, , FULTZ, 7945 S CARPENTER ST, , CHICAGO, IL, 60620, NULL, '2010-01-22 00:00:00')

However it add Quote for DateTime. I used the DOWNLOAD version of it.

Thanks