Skip to content

Sajal Choudhary

Garden Stream Nordletter Books About
Colophon Now Feeds
Evergreen TIL Shelf Stories Poems
Blog Micro Photos
Books Film TV Games
til powershell
Sajal Choudhary https://sajalchoudhary.net

Remove Child Items Skipping One

POWERSHELL

Get-ChildItem -Path "C:\Windows\System32\winevt\Logs\*" -File -Include Archive-Sec* | Sort-Object LastWriteTime -Descending | Select-Object -Skip 1 | Remove-Item -Force

references:

Updated July 8, 2024 at 11:59 . Thoughts? Email me.
Posted to:
Mastodon Bluesky
About Colophon Now Evergreen TIL Stories Poems Photos Bookshelf

© 2026 Sajal Choudhary

Streak New posts for 126 consecutive weeks