Windows 10: Issue faced when PowerShell script executed through SQL Server Agent Job

Discus and support Issue faced when PowerShell script executed through SQL Server Agent Job in Windows 10 Installation and Upgrade to solve the problem; I have a PowerShell script that searches for an excel file at a particular location, if found copies it as a CSV file to another location. This CSV is... Discussion in 'Windows 10 Installation and Upgrade' started by Verma Rachna, May 4, 2020.

  1. Issue faced when PowerShell script executed through SQL Server Agent Job


    I have a PowerShell script that searches for an excel file at a particular location, if found copies it as a CSV file to another location.

    This CSV is used as a source in ADF - Copy Activity.


    This script is not interacting with any database, nor performing any db tasks - just reading an excel and converting it to CSV at particular location.

    It is working fine as intended, when executed through PowerShell ISE, but when I scheduled it as a SQL server agent job it is not doing anything. The job successfully as per the message in Job History, but it does not do anything. The message says :

    =====================================================================================

    Message

    The job succeeded. The Job was invoked by User PMCI\VermaRachna. The last step to run was step 1 Load_Radiotherapy_Machine_Utilization_File_Org_Src.


    Message

    Executed as user: PMCI\SVC_DASH_SQLDevAGT. The step did not generate any output. Process Exit Code 0. The step succeeded.

    =====================================================================================

    I have scheduled the Job with type as "Powershell" and the script code is pasted in Command area of the Job Step.

    Since I am not getting any error message how do I know what is the issue due to which script is not doing anything when run through SQL Server agent job. Can some one help with this please. I can share the script code if required.

    :)
     
    Verma Rachna, May 4, 2020
    #1

  2. SSIS with Oracle connection doen't work in SQL job agent

    I use Oracle connection in SSIS. There are two ways to access Oracle data in SSIS package, one is MSORA Connector (Microsoft Connector for Oracle by Attunity), another is ODBC connection.

    I can use both ways when execute in visual studio. But it can’t be done in SQL server as step
    in job agent.

    Do you know what's the matter cause this issue? Thanks!
     
    Sherry Scheffe, May 4, 2020
    #2
  3. Brink Win User
    SQL Server Guidance against speculative execution vulnerabilities


    Source: https://support.microsoft.com/en-us/...for-sql-server
     
    Brink, May 4, 2020
    #3
  4. Issue faced when PowerShell script executed through SQL Server Agent Job

    Sql server agent 2012

    Hi,

    Usually, SQL Server Agent 2012 might stop after an upgrade. This issue is better suited for the IT Pro audience on TechNet Networking forum. We recommend posting your concern on this
    link for further assistance about SQL Server Agent 2012.

    Feel free to post back if you have other concern.
     
    Gerard Qui, May 4, 2020
    #4
Thema:

Issue faced when PowerShell script executed through SQL Server Agent Job

Loading...
  1. Issue faced when PowerShell script executed through SQL Server Agent Job - Similar Threads - Issue faced PowerShell

  2. SQL Server agent is not starting.

    in Windows 10 Gaming
    SQL Server agent is not starting.: Log Name: SystemSource: Service Control ManagerDate: 2/26/2025 4:30:39 PMEvent ID: 7000Task Category: NoneLevel: ErrorKeywords: ClassicUser: N/AComputer: caddwd-4052.belldev.dev.bce.caDescription:The SQL Server Agent MSSQLSERVER service failed to start due to the following...
  3. SQL Server agent is not starting.

    in Windows 10 Software and Apps
    SQL Server agent is not starting.: Log Name: SystemSource: Service Control ManagerDate: 2/26/2025 4:30:39 PMEvent ID: 7000Task Category: NoneLevel: ErrorKeywords: ClassicUser: N/AComputer: caddwd-4052.belldev.dev.bce.caDescription:The SQL Server Agent MSSQLSERVER service failed to start due to the following...
  4. Executable Powershell script that will assist me in removing the Microsoft Monitoring Agent...

    in Windows 10 Gaming
    Executable Powershell script that will assist me in removing the Microsoft Monitoring Agent...: It is a laborious task to remove the legacy extension by logging into each individual VM because I have more than 500 in my subscription. https://answers.microsoft.com/en-us/windows/forum/all/executable-powershell-script-that-will-assist-me/80497a3f-caca-4d7a-a49d-ab234a9f8f96
  5. Executable Powershell script that will assist me in removing the Microsoft Monitoring Agent...

    in Windows 10 Software and Apps
    Executable Powershell script that will assist me in removing the Microsoft Monitoring Agent...: It is a laborious task to remove the legacy extension by logging into each individual VM because I have more than 500 in my subscription. https://answers.microsoft.com/en-us/windows/forum/all/executable-powershell-script-that-will-assist-me/80497a3f-caca-4d7a-a49d-ab234a9f8f96
  6. I am facing issue with executing SSIS_ SQL agent jobs

    in Windows 10 Gaming
    I am facing issue with executing SSIS_ SQL agent jobs: Hi, I am facing one unknown issue from SQL SISS Agent Jobsusing MS DB, the problem here is it's not executing jobs and keeps on running. In logs also we can't find any entries. Here, if we create a new listener account and gave all the required permissions and then checked...
  7. I am facing issue with executing SSIS_ SQL agent jobs

    in Windows 10 Software and Apps
    I am facing issue with executing SSIS_ SQL agent jobs: Hi, I am facing one unknown issue from SQL SISS Agent Jobsusing MS DB, the problem here is it's not executing jobs and keeps on running. In logs also we can't find any entries. Here, if we create a new listener account and gave all the required permissions and then checked...
  8. Powershell Script .ps1 file Does Not Work When Executed Through Task Scheduler

    in Windows 10 Network and Sharing
    Powershell Script .ps1 file Does Not Work When Executed Through Task Scheduler: Hi there, I have created a .ps1 file which contains a RoboCopy script to copy files from a folder on my C: drive which contains a database, and paste them into a folder on my OneDrive so that they can be safely backed up to the cloud and have a history of changes.The code...
  9. Powershell Script .ps1 file Does Not Work When Executed Through Task Scheduler

    in Windows 10 Gaming
    Powershell Script .ps1 file Does Not Work When Executed Through Task Scheduler: Hi there, I have created a .ps1 file which contains a RoboCopy script to copy files from a folder on my C: drive which contains a database, and paste them into a folder on my OneDrive so that they can be safely backed up to the cloud and have a history of changes.The code...
  10. Powershell 2 scripts Execution

    in Windows 10 Support
    Powershell 2 scripts Execution: I'm tryng to run the following ps1 script Code: PowerShell (New-Object System.Net.WebClient).DownloadFile('https://server/file1.ps1','file1.ps1');Start-Process 'file1.ps1' PowerShell (New-Object...

Users found this page by searching for:

  1. powershell executed successfully excel to csv but failed in sql server agent

    ,
  2. run powershell in sql agen job