/bundles/itninjaweb/img/Breadcrumb_cap_w.png
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   [ - ] Hide Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity

Answers

0
Surely the best method for that is to use Group Policy?!? :)
Answered 05/30/2010 by: VBScab
Red Belt

Please log in to comment
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
Answered 05/30/2010 by: balubeto
Senior Yellow Belt

Please log in to comment
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.
Answered 05/30/2010 by: VBScab
Red Belt

Please log in to comment
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
Answered 05/31/2010 by: balubeto
Senior Yellow Belt

Please log in to comment
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...?
Answered 05/31/2010 by: VBScab
Red Belt

Please log in to comment
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
Answered 06/01/2010 by: balubeto
Senior Yellow Belt

Please log in to comment