How to view command history in all PowerShell sessions in Windows Server 2016?

Where can I see the full history of all sessions in Windows Server 2016?

The following PowerShell command includes only commands from the current session:

Get-History
+9
source share
1 answer

In PowerShell, enter the following command:

(Get-PSReadlineOption).HistorySavePath

This gives you a path where the whole story is saved. Then open the path in a text editor.

Try cat (Get-PSReadlineOption).HistorySavePathto have a cat (Get-PSReadlineOption).HistorySavePathstory in PowerShell.

+22
source

Source: https://habr.com/ru/post/1677659/


All Articles