PowerShell Schedule Task

Handian Sudianto 4,956 Reputation points
2024-10-03T02:44:58.6966667+00:00

Hello,

I have powershell script to insert some data into SQL server, when i double click on the .ps1 file i can see the data in SQL server.

Then i want to make this script running every hours and i schedule this using windows task scheduler.

But unfortunately when this scrip running as schedule, the task schedule log say the script running successfully but i cannot see any data in the SQL server. Anyone know why?

User's image

User's image

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,040 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,520 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.