CMD output to a text file.

Rising Flight 6,096 Reputation points
2024-03-31T20:28:45.3366667+00:00

Hi All

I want to save cmd output to a text file.

c:\Tools\lgpo>LGPO.exe /g c:\tools\GPO > c:\export.txt

When i use the above syntax i see the output in text file till Registering user CSE after that i dont see the output in text file. Experts guide me how to save all cmd output to text file.

cmd2

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. Marcin Policht 67,980 Reputation points MVP Volunteer Moderator
    2024-03-31T20:41:16.6966667+00:00

    Try running the following from the PowerShell console

    LGPO.exe /g c:\tools\GPO | Out-File -FilePath "c:\Tools\lgpo_output.txt"
    

    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Rising Flight 6,096 Reputation points
    2024-03-31T22:09:40.0433333+00:00

    No change, same output i am getting what i got from cmd


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.