/build/static/layout/Breadcrumb_cap_w.png

[PS] Enabling and disabling "Default Indexed Paths" and "Default Excluded Paths" policies

HI

Using PowerShell, how do I enable and disable, for all users, the "Default Indexed Paths" and "Default Excluded Paths" policies of Group Policy for Windows Search in Windows 7?

THANKS

BYE

0 Comments   [ + ] Show comments

Answers (6)

Posted by: anonymous_9363 13 years ago
Red Belt
0
Since GP settings are recorded in the registry, you should be able to locate a script which will set registry values and edit the keys and values accordingly.
Posted by: balubeto 13 years ago
Senior Yellow Belt
0
ORIGINAL: VBScab

Since GP settings are recorded in the registry, you should be able to locate a script which will set registry values and edit the keys and values accordingly.


I tried this script:


md "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search\DefaultIndexedPaths" -Force
cd "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search\DefaultIndexedPaths"
New-ItemProperty . -Name 'file:///Included-directory' -Value 'file:///Included-directory'

md "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search\DefaultExcludedPaths"
cd "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search\DefaultExcludedPaths"
New-ItemProperty . -Name 'file:///Excluded-directory' -Value 'file:///Excluded-directory'

but does not work because the "Default Indexed Paths" and "Default Excluded Paths" policies are always "not configured". Why?

THANKS

BYE
Posted by: anonymous_9363 13 years ago
Red Belt
0
I'd love to help you but my PowerShell skills are pretty rudimentary at the moment. Perhaps you could pose your question on the Microsoft Scripting Guy forum...?
Posted by: balubeto 13 years ago
Senior Yellow Belt
0
Reading [url=http://social.technet.microsoft.com/Forums/en-US/w7itprogeneral/thread/60fdd642-6c2c-493b-887f-6213ca01cfd5]this thread[/url], I assume that the script, reaching my goal, is:


md "HKLM:\SOFTWARE\Microsoft\Windows Search\CurrentPolicies\DefaultIndexedPaths" -Force
cd "HKLM:\SOFTWARE\Microsoft\Windows Search\CurrentPolicies\DefaultIndexedPaths"
New-ItemProperty . -Name 'file:///<indexing_directory>' -Value 'file:///<indexing_directory>'
md "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search\DefaultIndexedPaths" -Force
cd "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search\DefaultIndexedPaths"
New-ItemProperty . -Name 'file:///<indexing_directory>' -Value 'file:///<indexing_directory>'

md "HKLM:\SOFTWARE\Microsoft\Windows Search\CurrentPolicies\DefaultExcludedPaths"
cd "HKLM:\SOFTWARE\Microsoft\Windows Search\CurrentPolicies\DefaultExcludedPaths"
New-ItemProperty . -Name 'file:///<not_indexing_directory>' -Value 'file:///<not_indexing_directory>'
md "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search\DefaultExcludedPaths"
cd "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search\DefaultExcludedPaths"
New-ItemProperty . -Name 'file:///<not_indexing_directory>' -Value 'file:///<not_indexing_directory>'


Right?

THANKS

BYE
Posted by: anonymous_9363 13 years ago
Red Belt
0
Surely the best method for that is to use Group Policy?!? :)
Posted by: balubeto 13 years ago
Senior Yellow Belt
0
ORIGINAL: VBScab

Surely the best method for that is to use Group Policy?!? :)


Unfortunately, I have often activate and deactivate these policies on many non-networked computers. So, I decided to create two scripts that respectively enable and disable these two policies. So, anyone have any ideas on how to create these two scripts?

THANKS

BYE
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ