Reputation: 59
Consider Example as: C:\Users>help
Output: We get list of commands for working with CMD
Expected: I want once this command is run - whatever is present in cmd console, I want to paste in some notepad file through some command (Not by Marking and Pasting).
Upvotes: 1
Views: 4089
Reputation: 11401
For PowerShell, you can use Start-Transcript
, it will save the all console output to a file.
From the documentation:
The Start-Transcript cmdlet creates a record of all or part of a Windows PowerShell session to a text file. The transcript includes all command that the user types and all output that appears on the console.
Reference: https://msdn.microsoft.com/en-us/powershell/reference/5.1/microsoft.powershell.host/start-transcript
Upvotes: 2
Reputation: 138
You can also use ctrl + A to select all, ctrl + C to copy, then use ctrl + v to paste into notepad.
Upvotes: -1