Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [string]$newPath = 'D:\eventlogs'
- New-Item -Path $newPath -Type Directory -Force
- Get-WinEvent -ListLog * | ForEach-Object { $_.LogFilePath = (Join-Path -Path $newPath -ChildPath (Split-Path $_.LogFilePath -Leaf)) ; $_.SaveChanges() }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement