Вы находитесь на странице: 1из 8

Powershell Commandlets

Windows Search Module

Compiled by Les Lewis

This information was taken directly from the Get-Help files within the WindowsSearch commandlets.

This is for informational use, placed into an easy to read format.


Table of Contents
What is it used for? ..................................................................................................................................... 3
Get-WindowsSearchSetting ........................................................................................................................ 4
SYNOPSIS .............................................................................................................................................. 4
SYNTAX .................................................................................................................................................. 4
DESCRIPTION ......................................................................................................................................... 4
PARAMETERS ........................................................................................................................................... 4
INPUTS .................................................................................................................................................... 4
OUTPUTS.................................................................................................................................................. 4
RELATED LINKS .................................................................................................................................... 5
Set-WindowsSearchSetting ........................................................................................................................ 6
SYNOPSIS ............................................................................................................................................... 6
SYNTAX .................................................................................................................................................... 6
DESCRIPTION ......................................................................................................................................... 6
PARAMETERS ........................................................................................................................................... 6
INPUTS .................................................................................................................................................... 7
OUTPUTS.................................................................................................................................................. 7
Example 1 ......................................................................................................................... 8
Example 2 ......................................................................................................................... 8
RELATED LINKS .................................................................................................................................... 8
What is it used for?
Exposes Windows Installer functionality to Windows PowerShell
Get-WindowsSearchSetting
SYNOPSIS
Gets the values of settings for Windows Search.

SYNTAX
Get-WindowsSearchSetting [<CommonParameters>]

DESCRIPTION
The Get-WindowsSearchSettings cmdlet gets the values of settings
for Windows Search. You can view settings for whether Windows
Search displays web results or suggestions and whether to display
web results and suggestions while using a metered network. You can
view settings for whether Windows Search personalizes results,
including whether Windows Search employs the specific location of
the user. You can also see SafeSearch settings.

PARAMETERS
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information,
see about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS
WindowsSearchSetting

Returns the values of properties that control Windows Search:

• EnableMeteredWebResultsSetting. Whether Windows Search


displays web results and suggestions while using a metered
network.
• EnableWebResultsSetting. Whether Windows Search displays web
results and suggestions.
• SearchExperienceSetting. The experience setting.
• WindowsSafeSearchSetting. The value of SafeSearch that
Windows Search uses for queries.

SearchExperienceSetting has the following possible values:


• PersonlizedAndLocation. Personalize Windows Search and other
Microsoft experiences by using search history, some Microsoft
account information, and specific location of the user.
• Personalized. Personalize Windows Search and other Microsoft
experiences by using search history and some Microsoft
account information, but do not use specific location of the
user.
• NotPersonalized. Do not personalize Windows Search and other
Microsoft experiences or use specific location of the user.

WindowsSafeSearchSetting has the following possible values:

• Off. Windows Search does not remove adult content from


results.
• Moderate. Windows Search excludes adult images and videos,
but not text, from results.
• Strict. Windows Search excludes adult images, videos, and
text from results.

Example 1: Get Windows Search settings

PS C:\> Get-WindowsSearchSetting
Setting Value
------- -----
EnableWebResultsSetting True
EnableMeteredWebResultsSetting True
SearchExperience
PersonalizedAndLocation
WindowsSafeSearchSetting Moderate

This command gets Windows Search settings. The console displays the
values for the settings.

RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkID=294363
Set-WindowsSearchSetting
Set-WindowsSearchSetting
SYNOPSIS
Modifies values that control Windows Search.

SYNTAX
Set-WindowsSearchSetting [-EnableMeteredWebResultsSetting
<Boolean>] [-EnableWebResultsSetting <Boolean>] [-SafeSearchSetting
<String>][-SearchExperienceSetting <String>] [<CommonParameters>]

DESCRIPTION
The Set-WindowsSearchSetting cmdlet modifies values that control
Windows Search. You can specify whether Windows Search displays web
results or suggestions, and you can specify whether to display web
results and suggestions while using a metered network. You can
specify whether Windows Search personalizes results, including
whether Windows Search employs the specific location of the user.
You can also specify SafeSearch settings.

PARAMETERS
-EnableMeteredWebResultsSetting <Boolean>
Indicates whether Windows Search displays web results and
suggestions while using metered connections. Specify a value of
$True to display web results and suggestions over metered
connections or a value of $False to exclude web results and
suggestions.

Do not specify a value for this parameter if the value of the


EnableWebResultsSetting parameter is $False.

Required? false
Position? named
Default value
Accept pipeline input? True (ByValue)
Accept wildcard characters? false

-EnableWebResultsSetting <Boolean>
Indicates whether Windows Search displays web results and
suggestions. Specify a value of $True to display web results and
suggestions or a value of $False to exclude web results and
suggestions.

Required? false
Position? named
Default value
Accept pipeline input? True (ByValue)
Accept wildcard characters? false

-SafeSearchSetting <String>
Specifies a SafeSearch setting for Window Search. The acceptable
values for this parameter are:

• Off. Windows Search does not remove adult content from


results.
• Moderate. Windows Search excludes adult images and videos,
but not text, from results.
• Strict. Windows Search excludes adult images, videos, and
text from results.

Required? false
Position? named
Default value
Accept pipeline input? True (ByValue)
Accept wildcard characters? false

-SearchExperienceSetting <String>
Specifies a Windows Search experience setting. The acceptable
values for this parameter are:

PersonlizedAndLocation. Personalize Windows Search and other


Microsoft experiences by using search history, some Microsoft
account information, and specific location of the user.
Personalized. Personalize Windows Search and other Microsoft
experiences by using search history and some Microsoft account
information, but do not use specific location of the user.
NotPersonalized. Do not personalize Windows Search and other
Microsoft experiences or use specific location of the user.

Required? false
Position? named
Default value
Accept pipeline input? True (ByValue)
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, pipelineVariable, and OutVariable. For more information,
see about_CommonParameters
(http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS
Example 1: Personalize Windows Search
PS C:\> Set-WindowsSearchSetting -SearchExperienceSetting
"Personalized"

This command allows Windows Search to use search history, but


not specific location of the user, to personalize results.

Example 2: Modify Windows Search settings


PS C:\>Set-WindowsSearchSetting -EnableWebResultsSetting
$True -SafeSearchSetting "Strict" -SearchExperienceSetting
“PersonlizedAndLocation"

This command modifies Windows Search settings. The command


enables the use of search history and specific location of
the user by specifying a value of PersonlizedAndLocation for
the SearchExperienceSetting parameter. The command enables
web results and sets SafeSearch to a value of Strict.

RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkID=294364
Get-WindowsSearchSetting

Вам также может понравиться