Skip to main content

Posts

Showing posts from July, 2022

PowerShell Permanently Clear History

PowerShell has a command to clear the command history like Clear-History. However, it is independent of the host and must be deleted separately. This information is especially important when you need to use a command with your password (in command).  How to permanently delete PowerShell history? The entire history of the commands you use in PowerShell is saved to one file. To fully delete the history, all you need to do is ... delete the file. Usually the file is located in AppData, but you can check the exact path with the command which will display the full path. PS C:\> (Get-PSReadlineOption).HistorySavePath ### result C:\Users\geekitsupp\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt After deleting this file, all history of commands executed in PowerShell will be deleted. Clear-History or [Microsoft.PowerShell.PSConsoleReadLine]::ClearHistory() command doesn't permanently delete history. They can only delete ...

Keyboard Shortcut for Part or Full Screenshot

Windows 10 has a built-in screenshot tool. You can take a screenshot of the full screen or just a part of it. The screenshots will be copied to the clipboard so you can paste into any program that supports images like Paint, Photoshop, messengers like MS Teams or email messages.  Keyboard Shortcut Press Winkey + Shift + S . The screen will have a light or dark overlay and the mouse cursor will change to a plus (+) symbol, which means capture mode is on. A bar will appear at the top of the main screen. From there, you can choose one of the snipping modes: Rectangular  - take a rectangular screenshot by dragging the desired fragment with the cursor. Freeform  - freely create a screenshot of a non-standard shape by "painting" with the pressed cursor. Window  - captures part of the screen, e.g. a window on the screen, such as browser window, file explorer window, etc. Fullcreen  - captures ...