After enabling or disabling the function, it is better to restart the computer. If you get an error Access denied, repeat the procedure by starting the console as an administrator (above, we have shown how it can be done). To do it, enter the command:įsutil behavior set disabledeletenotify NTFS 0įsutil behavior set disabledeletenotify ReFS 0įor one or the other file system, respectively. If you have value «1» it is recommended to enable TRIM in order to greatly accelerate performance of your SSD. 1 – TRIM is disabled at the system level.0 – it means everything is all right and TRIM is enabled.If you’re not using Windows Server, you should be interested in the first line only. "Get Contig to defragment NTFS metafiles.The first line ( NTFS) accounts for the file system NTFS, and the second – for the server file system ReFS. Invoke-Expression ( $cmdstr + ' -nobanner ' + $DriveID + '$Extend' ) -ErrorAction Silentl圜ontinue | Out-Null Invoke-Expression ( $cmdstr + ' -nobanner ' + $DriveID + '$Upcase' ) -ErrorAction Silentl圜ontinue | Out-Null Invoke-Expression ( $cmdstr + ' -nobanner ' + $DriveID + '$Secure' ) -ErrorAction Silentl圜ontinue | Out-Null Invoke-Expression ( $cmdstr + ' -nobanner ' + $DriveID + '$BadClus' ) -ErrorAction Silentl圜ontinue | Out-Null Invoke-Expression ( $cmdstr + ' -nobanner ' + $DriveID + '$Boot' ) -ErrorAction Silentl圜ontinue | Out-Null Invoke-Expression ( $cmdstr + ' -nobanner ' + $DriveID + '$Bitmap' ) -ErrorAction Silentl圜ontinue | Out-Null Invoke-Expression ( $cmdstr + ' -nobanner ' + $DriveID + '$AttrDef' ) -ErrorAction Silentl圜ontinue | Out-Null Invoke-Expression ( $cmdstr + ' -nobanner ' + $DriveID + '$Volume' ) -ErrorAction Silentl圜ontinue | Out-Null Invoke-Expression ( $cmdstr + ' -nobanner ' + $DriveID + '$LogFile' ) -ErrorAction Silentl圜ontinue | Out-Null Invoke-Expression ( $cmdstr + ' -nobanner ' + $DriveID + '$Mft' ) -ErrorAction Silentl圜ontinue | Out-Null "Defragmenting NTFS metafiles for " + $DriveID + ". Unzip "$TempPath\Contig.zip" "$envWINDIR" -Force Remove-Item "$envWINDIR\Eula.txt" -ErrorAction Silentl圜ontinue | Out-Null Remove-Item "$envWINDIR\Contig64.exe" -ErrorAction Silentl圜ontinue | Out-Null Remove-Item "$envWINDIR\Contig.exe" -ErrorAction Silentl圜ontinue | Out-Null $envWINDIR = :: GetEnvironmentVariable ( "WINDIR" ) DownloadFile ( "", "$TempPath\Contig.zip" ) | Out-NullĪdd-Type -AssemblyName System.IO.Compression.FileSystem Remove-Item "$TempPath\Contig.zip" -ErrorAction Silentl圜ontinue | Out-Null "Downloading the Contig zip file from Microsoft." $envTEMP = :: GetEnvironmentVariable ( "TEMP" ) 122 ) | Get-Random -Count 10 | ForEach-Object ) # First, set up temporary space and move there. :: ExtractToDirectory ( $zipfile, $outpath ) > $null Invoke-Expression ( 'fsutil behavior set DisableDeleteNotify 0' ) -ErrorAction Silentl圜ontinue # Turn SSD TRIM on if SSD is present Invoke-Expression ( 'fsutil behavior set DisableLastAccess 1' ) -ErrorAction Silentl圜ontinue Invoke-Expression ( 'fsutil 8dot3name set 1' ) -ErrorAction Silentl圜ontinue Start-Process powershell -WorkingDirectory $PSScriptRoot -Verb runAs -ArgumentList "-noprofile -noexit -file $PSCommandPath" # and is reprised at the end of this file # This script is licensed under the 3-Clause BSD License # performance and reliability, using FSUTIL # Tweaks all NTFS volumes on a system for
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |