Author Posts

February 2, 2016 at 8:13 am

Is it possible to disable drive indexing for specific folders instead of the entire drive?

I found the following script, but not sure if it can be used to disable indexing on a certain folder.

function Disable-Indexing {
    Param($Drive)
    $obj = Get-WmiObject -Class Win32_Volume -Filter "DriveLetter='$Drive'"
    $indexing = $obj.IndexingEnabled
    if("$indexing" -eq $True){
        write-host "Disabling indexing of drive $Drive"
        $obj | Set-WmiInstance -Arguments @{IndexingEnabled=$False} | Out-Null
    }
}

#Use:
#Disable Drive Indexing on C:\

Disable-Indexing "C:"

What I really want to do (from a GUI perspective) is go to Indexing Options > Highlight users folder and select "modify" > expand the users folder and personal folder and de-select a specific folder. I would also like to exclude Appdata. Any ideas how to automate this for all users on a PC?

February 2, 2016 at 8:52 am

Check out the keys under hklm\software\microsoft\windows searc\crawlscopemanager.

also.

Powershell Tackles Windows Desktop Search