Skip to content

Instantly share code, notes, and snippets.

@sean-m
Created April 10, 2017 18:29
Show Gist options
  • Save sean-m/9aed50cc1c3f7d98e6f54f74c00fb4e1 to your computer and use it in GitHub Desktop.
Save sean-m/9aed50cc1c3f7d98e6f54f74c00fb4e1 to your computer and use it in GitHub Desktop.
Get-Service -Name TrustedInstaller | Stop-Service -Verbose
ii "C:\Windows\Logs\CBS\"
Start-Sleep -Seconds 5
Get-ChildItem "C:\Windows\Logs\CBS\*" -Recurse -Force -ErrorAction SilentlyContinue |
Where-Object { $_.Name -ne 'CBS.Log' } |
Remove-Item -force -Verbose -recurse -ErrorAction Continue
Get-ChildItem "C:\Windows\Logs\CBS\*"
Get-Service -Name TrustedInstaller | Start-Service -Verbose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment