Posted On March 31, 2019

Windows Cleanup

kimconnect 0 comments
blog.KimConnect.com >> Codes >> Windows Cleanup
#Clean Up the WinSxS Folder
Dism.exe /online /Cleanup-Image /StartComponentCleanup

#Clean Up C:\Temp Folder
del c:\temp -Recurse -Force

#Cleanup Event Log
wevtutil el | Foreach-Object {wevtutil cl “$_”}

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

Script to Push Files to Remote SFTP Server

# 1. Install WINSCP and include it in the %PATH% environmental variables# 2. Run this…

PowerShell: Update a List of Multiple Windows Machines

Version 3: # updateWindowsList.ps1 # Version 0.0.3 # # Features: # - New feature over…

PowerShell: How to Change Active Directory Username

$oldUsername='testUser' $newUsername='tUser' function changeUsername{ param( $oldUsername, $newUsername ) $domainName=$env:USERDNSDOMAIN $newUserPrincipleName="$newUsername@$domainName" try{ Set-ADUser $oldUsername -SamAccountName $newUsername…