Created
November 28, 2019 01:53
-
-
Save jkniiv/b165628823fe218cdf40fc06e35af499 to your computer and use it in GitHub Desktop.
Gets the URL/file that is currently being indexed by Windows Search via the ISearchCatalogManager::URLBeingIndexed() method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gets the URL that is currently being indexed by Windows Search via | |
# the ISearchCatalogManager::URLBeingIndexed() method. | |
# N.B. This needs to be called elevated, i.e. with admin privileges! | |
# Load the dll (easiest to be found here https://github.com/IntelliTect/PSToolbox/tree/master/Lib) | |
Add-Type -Path .\Microsoft.Search.Interop.dll | |
$searchManager = New-Object Microsoft.Search.Interop.CSearchManagerClass | |
$catalog = $searchManager.GetCatalog("SystemIndex") | |
Write-Host $catalog.URLBeingIndexed() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment