Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Set-RegistryKey -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" -Name "DisablePagingExecutive" -Value 1
- ## delete hidden install files
- Get-ChildItem "%windir%\$NT*" -Recurse -Force -ErrorAction SilentlyContinue | remove-item -force -Verbose -recurse -ErrorAction SilentlyContinue
- ## delete prefetch files
- Get-ChildItem "c:\Windows\Prefetch\*" -Recurse -Force -ErrorAction SilentlyContinue | remove-item -force -Verbose -recurse -ErrorAction SilentlyContinue
- ### Size virtual machine RAM
- # Disable the automatic management of the paging filing size
- $ComputerSystem = gwmi Win32_ComputerSystem -EnableAllPrivileges
- $ComputerSystem.AutomaticManagedPagefile = $False
- $AutomaticManagedPagefile = $ComputerSystem.Put()
- ## Clear all event logs
- wevtutil el | Foreach-Object {wevtutil cl "$_"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement