task scheduler (or powers shell) went wrong from the day after Windows Update.

TSUYOSHI DOI 1 Reputation point
2020-08-06T01:42:45.38+00:00

Thank you for your help.

On Windows 2016 Server, the output of the batch file (PowerShell) started from Task Scheduler is
It went wrong from the day after Windows Update.

-Background

(1) There is a PowerShell script that accesses the Web server with API, acquires information from the Web server, and outputs it as CSV.

(2) There is a batch file that simply calls the PowerShell script in (1) above.

(3) The task scheduler periodically executes the batch file (2) above.

-phenomenon
(i) Windows Update was executed on July 19, 2020,

KB4565511
KB4484441
KB4484438
KB4484433
KB4565912
These have been installed.

(ii) From 2020/7/20, the execution result of the above-mentioned(3) is incorrect.
* Only the 3-byte data whose CSV file content is meaningless is output.

(iii) Double-click the batch file of the above (2) or execute it from the command prompt, or directly execute the PowerShell script of (1), I can obtain the same output as 7/19.

I'm guessing there is something wrong with Windows Update, is there any information?

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,627 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Gabriel Dzsurdzsa 6 Reputation points
    2020-08-09T20:20:48.463+00:00

    (iii) Double-click the batch file of the above (2) or execute it from the command prompt, or directly execute the PowerShell script of (1), I can obtain the same output as 7/19.

    If I'm reading the above correctly, you can execute from command prompt the batch file, in powershell to export to csv and in windows file explorer by double clicking the .ps1 script.

    If the script and batch file work independently when triggered manually, it may be that you need to re-create the Scheduled Task in task scheduler, and run it manually to test the output.

    Also, can you post the script contents of your .ps1 file.

    1 person found this answer helpful.
    0 comments No comments

  2. Young Yang (Shanghai Wicresoft Co,.Ltd.) 661 Reputation points
    2020-08-20T01:48:37.717+00:00

    Hi, given that this post has been quiet for a while, this is a quick question and answer. Has your question been solved? If so, please mark it as an answer so that users with the same question can find and get help.
    :)

    0 comments No comments

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.