How to get all executed scripts history on a Windows Server using PowerShell?

周 文艾/WENAI ZHOU 20 Reputation points
2023-06-13T03:07:14.7566667+00:00

As there are many scripts (batch, powershell...) running on a Windows Server, is there a PowerShell command to get or output all executed or running scripts?

Windows for business | Windows Server | User experience | PowerShell
Windows for business | Windows Server | User experience | Other
0 comments No comments
{count} votes

Answer accepted by question author
  1. Limitless Technology 45,176 Reputation points
    2023-06-13T10:36:09.3066667+00:00

    Hello

    Thank you for your question and reaching out.

    Please enable GPO \ Computer \ Administrative Templates \ Windows Components \ Windows Powershell

    Enable Powershell Script Block Logging

    Enable Transcripts

    Check Event Viewer: Applications and Services Logs \ Microsoft \ Windows \ Powershell \ Operational

    Read Event Viewer and Transcripts

    --If the reply is helpful, please Upvote and Accept as answer--

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

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