Skip to content

Commit

Permalink
[common.vm] Clear shell History in VM-Clean-Up
Browse files Browse the repository at this point in the history
Delete saved PowerShell history in `VM-Clean-Up` by deleting the file
that contains it.
  • Loading branch information
Ana06 committed Jan 4, 2024
1 parent c391194 commit bc5f376
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/common.vm/tools/vm.common/vm.common.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1336,4 +1336,7 @@ function VM-Clean-Up {

Write-Host "[+] Clearing up free space. This may take a few minutes..." -ForegroundColor Green
VM-Clear-FreeSpace

Write-Host "[+] Clear PowerShell History" -ForegroundColor Green
Remove-Item (Get-PSReadlineOption).HistorySavePath -Force -ea 0
}

0 comments on commit bc5f376

Please sign in to comment.