en-US/Horker.WindowsSearch.dll-Help.xml
<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh"> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Get-WindowsSearchProperty</command:name> <command:verb>Get</command:verb> <command:noun>WindowsSearchProperty</command:noun> <maml:description> <maml:para>Gets properties of the Windows Property System.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The cmdlet returns properties of the Windows Property System.</maml:para> <maml:para>The Windows Property System is one of the subsystems of Windows. It defines a set of information of file properties used in system applications including Windows Explorer. Examples of such properties are a file name (`System.ItemName`), a file size (`System.Size`) and a last modified date (`System.DateModified`).</maml:para> <maml:para>Several of the properties are specific to particular types of files. For example, audio files have the sample rate property (`System.Audio.SampleRate`).</maml:para> <maml:para>Each property has two types of names, a canonical name and a display name. Canonical names are used to uniquely identify properties. Display names are human-readable and used as titles when properties are displayed in applications. For example, the property that represents a file name has a canonical name `System.ItemName` and a display name `Name` (in the English locale). Display names are locale-specific and thus vary depending on the language of the system.</maml:para> <maml:para>You can see properties for a file by right-clicking the file icon, selecting `Properties` from the context menu and choosing the `Details` tab in Windows Explorer.</maml:para> <maml:para>For more information, see the RELATED LINKS section.</maml:para> <maml:para>When the cmdlet is invoked without parameters, it returns all properties defined in the system. When the `-Name` parameter is specified, it returns properties that contain it in their canonical names. When the `-DisplayName` parameter is specified, it returns properties that contain it in their display names.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-WindowsSearchProperty</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Name</maml:name> <maml:Description> <maml:para>When specified, the cmdlet returns properties that contains the -Name value in their canonical names.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>DisplayName</maml:name> <maml:Description> <maml:para>When specified, the cmdlet returns properties that contains the -DisplayName value in their display names.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>DisplayName</maml:name> <maml:Description> <maml:para>When specified, the cmdlet returns properties that contains the -DisplayName value in their display names.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Name</maml:name> <maml:Description> <maml:para>When specified, the cmdlet returns properties that contains the -Name value in their canonical names.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Automation.Management.PSObject</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Get-WindowsSearchProperty</dev:code> <dev:remarks> <maml:para>Returns all properties defined in the system.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Get-WindowsSearchProperty -Name PathName</dev:code> <dev:remarks> <maml:para>Returns properties that contains `PathName` in their canonical names.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Windows Property System</maml:linkText> <maml:uri> https://docs.microsoft.com/ja-jp/windows/desktop/properties/windows-properties-system</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Invoke-WindowsSearch</command:name> <command:verb>Invoke</command:verb> <command:noun>WindowsSearch</command:noun> <maml:description> <maml:para>Searches the computer using Windows Search.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The cmdlet makes a query to the Windows Search subsystem and gets results as PowerShell objects.</maml:para> <maml:para>You can make a query in one of the following query languages or a combination of both.</maml:para> <maml:para>(1) Advanced Query Syntax (AQS)</maml:para> <maml:para>The Advanced Query Syntax is the query language that is used in the search box in Windows Explorer.</maml:para> <maml:para>(2) Windows Search SQL</maml:para> <maml:para>The Windows Search subsystem implements the OLE DB provider as its core query engine. By accessing it directly, you can make a search query by SQL. It offers wordy but cleaner syntax than AQS and can be written in a locale-independent manner.</maml:para> <maml:para>For documentations on these query languages, see the RELATED LINKS section.</maml:para> <maml:para>When you specify file properties in parameters, you can use display names (e.g., `folder`) as well as canonical names (`System.ItemFolderPathDisplayNarrow`) of properties. In addition, the `System.` prefix of property names can be omitted. You need to place `@` before property names to apply this to the -Where and -SQL parameters.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Invoke-WindowsSearch</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Query</maml:name> <maml:Description> <maml:para>Specifies the query in Advanced Query Syntax.</maml:para> <maml:para>The query is converted to Windows Search SQL internally by calling the `GenerateSQLFromUserQuery` method of `ISearchQueryHelper`. For more information on `ISearchQueryHelper`, see the RELATED LINKS section.</maml:para> <maml:para>By specifying the -Verbose parameter, you can see the SQL statement generated by the cmdlet internally. It is useful to make sure what query is actually made when you make a complicated query or get unexpected results.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>ContentProperties</maml:name> <maml:Description> <maml:para>Sets the properties to include in the query if search terms do not explicitly specify properties.</maml:para> <maml:para>This value is set to the `QueryContentProperties` property of `ISearchQueryHelper` that is used internally on AQS-to-SQL conversion. For more information on `ISearchQueryHelper`, see the RELATED LINKS section.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="10" aliases="none"> <maml:name>AdditionalColumns</maml:name> <maml:Description> <maml:para>Adds columns to the columns defined by the -SelectColumns parameter.</maml:para> <maml:para>Use this parameter when you want to keep the predefined columns (See the description on -SelectColumns) and add your own columns to a result set.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="11" aliases="none"> <maml:name>DisallowDisplayName</maml:name> <maml:Description> <maml:para>Disallows using display names in the following parameters: -ContentProperties, -SelectColumns, -Sorting, -Where and -SQL.</maml:para> <maml:para>By default, display names in these parameters are converted into canonical names before processing. When this parameter is specified, they causes an error.</maml:para> <maml:para>In the -Query parameter, display names are always allowed.</maml:para> </maml:Description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>SelectColumns</maml:name> <maml:Description> <maml:para>Sets the columns (or properties) requested in the SELECT statement. If not specified, the following columns are set by default:</maml:para> <maml:para>- System.Search.Rank</maml:para> <maml:para>- System.ItemPathDisplay</maml:para> <maml:para>- System.ItemFolderPathDisplay</maml:para> <maml:para>- System.ItemFolderNameDisplay</maml:para> <maml:para>- System.ItemName</maml:para> <maml:para>- System.ItemTypeText</maml:para> <maml:para>- System.DateModified</maml:para> <maml:para>- System.DateCreated</maml:para> <maml:para>- System.DateAccessed</maml:para> <maml:para>- System.Size</maml:para> <maml:para>- System.Kind</maml:para> <maml:para></maml:para> <maml:para>These values are set to the `QuerySelectColumns` property of `ISearchQueryHelper` that is used internally on AQS-to-SQL conversion. For more information on `ISearchQueryHelper`, see the RELATED LINKS section.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="MaxResults"> <maml:name>TotalCount</maml:name> <maml:Description> <maml:para>Sets the maximum number of results to be returned by the query.</maml:para> <maml:para>This value is set to the `QueryMaxResults` property of `ISearchQueryHelper` that is used internally on AQS-to-SQL conversion. For more information on `ISearchQueryHelper`, see the RELATED LINKS section.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>Sorting</maml:name> <maml:Description> <maml:para>Sets the sort order for the query result set.</maml:para> <maml:para>The value should be a string or an array of strings that contain a property name followed by the `DESC` or `ASC` keyword. For example, "System.ItemName DESC" or "DateModified ASC".</maml:para> <maml:para>If not specified, "System.Search.Rank DESC" is used by default.</maml:para> <maml:para>This value is set to the `QuerySorting` property of `ISearchQueryHelper` that is used internally on AQS-to-SQL conversion. For more information on `ISearchQueryHelper`, see the RELATED LINKS section.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>Where</maml:name> <maml:Description> <maml:para>Sets the restrictions appended to a query in WHERE clauses.</maml:para> <maml:para>This value is set to the `QueryWhereRestrictions` property of `ISearchQueryHelper` that is used internally on AQS-to-SQL conversion. For more information on `ISearchQueryHelper`, see the RELATED LINKS section.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="6" aliases="none"> <maml:name>QuerySyntax</maml:name> <maml:Description> <maml:para>Sets the syntax of the query.</maml:para> <maml:para>This value is set to the `QuerySyntax` property of `ISearchQueryHelper` that is used internally on AQS-to-SQL conversion. For more information on `ISearchQueryHelper`, see the RELATED LINKS section.</maml:para> </maml:Description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">NoSyntax</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">SEARCH_NO_QUERY_SYNTAX</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">SEARCH_ADVANCED_QUERY_SYNTAX</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">Advanced</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">SEARCH_NATURAL_QUERY_SYNTAX</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">Natural</command:parameterValue> </command:parameterValueGroup> <command:parameterValue required="true" variableLength="false">SEARCH_QUERY_SYNTAX</command:parameterValue> <dev:type> <maml:name>SEARCH_QUERY_SYNTAX</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="7" aliases="none"> <maml:name>ContentLocale</maml:name> <maml:Description> <maml:para>Sets the locale of the query.</maml:para> <maml:para>This value is set to the `QueryContentLocale` property of `ISearchQueryHelper` that is used internally on AQS-to-SQL conversion. For more information on `ISearchQueryHelper`, see the RELATED LINKS section.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">CultureInfo</command:parameterValue> <dev:type> <maml:name>CultureInfo</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="8" aliases="none"> <maml:name>KeywordLocale</maml:name> <maml:Description> <maml:para>Sets the locale to use when parsing Advanced Query Syntax (AQS) keywords.</maml:para> <maml:para>This value is set to the `QueryKeywordLocale` property of `ISearchQueryHelper` that is used internally on AQS-to-SQL conversion. For more information on `ISearchQueryHelper`, see the RELATED LINKS section.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">CultureInfo</command:parameterValue> <dev:type> <maml:name>CultureInfo</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="9" aliases="none"> <maml:name>Path</maml:name> <maml:Description> <maml:para>Restricts the locations to be searched.</maml:para> <maml:para>The search engine looks up for files in the specified directory and its subdirectories. If you limit a location to a particular directory only, use the `ItemFolderPathDisplay` or `ItemFolderPathDisplayNarrow` properties in the query (their display names are `folder path` and `folder` in the English locale).</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Invoke-WindowsSearch</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>SQL</maml:name> <maml:Description> <maml:para>Specifies the query in Windows Search SQL.</maml:para> <maml:para>This value is directly passed to the search engine.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="MaxResults"> <maml:name>TotalCount</maml:name> <maml:Description> <maml:para>Sets the maximum number of results to be returned by the query.</maml:para> <maml:para>This value is set to the `QueryMaxResults` property of `ISearchQueryHelper` that is used internally on AQS-to-SQL conversion. For more information on `ISearchQueryHelper`, see the RELATED LINKS section.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="10" aliases="none"> <maml:name>AdditionalColumns</maml:name> <maml:Description> <maml:para>Adds columns to the columns defined by the -SelectColumns parameter.</maml:para> <maml:para>Use this parameter when you want to keep the predefined columns (See the description on -SelectColumns) and add your own columns to a result set.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="11" aliases="none"> <maml:name>DisallowDisplayName</maml:name> <maml:Description> <maml:para>Disallows using display names in the following parameters: -ContentProperties, -SelectColumns, -Sorting, -Where and -SQL.</maml:para> <maml:para>By default, display names in these parameters are converted into canonical names before processing. When this parameter is specified, they causes an error.</maml:para> <maml:para>In the -Query parameter, display names are always allowed.</maml:para> </maml:Description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="7" aliases="none"> <maml:name>ContentLocale</maml:name> <maml:Description> <maml:para>Sets the locale of the query.</maml:para> <maml:para>This value is set to the `QueryContentLocale` property of `ISearchQueryHelper` that is used internally on AQS-to-SQL conversion. For more information on `ISearchQueryHelper`, see the RELATED LINKS section.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">CultureInfo</command:parameterValue> <dev:type> <maml:name>CultureInfo</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>ContentProperties</maml:name> <maml:Description> <maml:para>Sets the properties to include in the query if search terms do not explicitly specify properties.</maml:para> <maml:para>This value is set to the `QueryContentProperties` property of `ISearchQueryHelper` that is used internally on AQS-to-SQL conversion. For more information on `ISearchQueryHelper`, see the RELATED LINKS section.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="8" aliases="none"> <maml:name>KeywordLocale</maml:name> <maml:Description> <maml:para>Sets the locale to use when parsing Advanced Query Syntax (AQS) keywords.</maml:para> <maml:para>This value is set to the `QueryKeywordLocale` property of `ISearchQueryHelper` that is used internally on AQS-to-SQL conversion. For more information on `ISearchQueryHelper`, see the RELATED LINKS section.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">CultureInfo</command:parameterValue> <dev:type> <maml:name>CultureInfo</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="9" aliases="none"> <maml:name>Path</maml:name> <maml:Description> <maml:para>Restricts the locations to be searched.</maml:para> <maml:para>The search engine looks up for files in the specified directory and its subdirectories. If you limit a location to a particular directory only, use the `ItemFolderPathDisplay` or `ItemFolderPathDisplayNarrow` properties in the query (their display names are `folder path` and `folder` in the English locale).</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>Query</maml:name> <maml:Description> <maml:para>Specifies the query in Advanced Query Syntax.</maml:para> <maml:para>The query is converted to Windows Search SQL internally by calling the `GenerateSQLFromUserQuery` method of `ISearchQueryHelper`. For more information on `ISearchQueryHelper`, see the RELATED LINKS section.</maml:para> <maml:para>By specifying the -Verbose parameter, you can see the SQL statement generated by the cmdlet internally. It is useful to make sure what query is actually made when you make a complicated query or get unexpected results.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="6" aliases="none"> <maml:name>QuerySyntax</maml:name> <maml:Description> <maml:para>Sets the syntax of the query.</maml:para> <maml:para>This value is set to the `QuerySyntax` property of `ISearchQueryHelper` that is used internally on AQS-to-SQL conversion. For more information on `ISearchQueryHelper`, see the RELATED LINKS section.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">SEARCH_QUERY_SYNTAX</command:parameterValue> <dev:type> <maml:name>SEARCH_QUERY_SYNTAX</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>SQL</maml:name> <maml:Description> <maml:para>Specifies the query in Windows Search SQL.</maml:para> <maml:para>This value is directly passed to the search engine.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none"> <maml:name>SelectColumns</maml:name> <maml:Description> <maml:para>Sets the columns (or properties) requested in the SELECT statement. If not specified, the following columns are set by default:</maml:para> <maml:para>- System.Search.Rank</maml:para> <maml:para>- System.ItemPathDisplay</maml:para> <maml:para>- System.ItemFolderPathDisplay</maml:para> <maml:para>- System.ItemFolderNameDisplay</maml:para> <maml:para>- System.ItemName</maml:para> <maml:para>- System.ItemTypeText</maml:para> <maml:para>- System.DateModified</maml:para> <maml:para>- System.DateCreated</maml:para> <maml:para>- System.DateAccessed</maml:para> <maml:para>- System.Size</maml:para> <maml:para>- System.Kind</maml:para> <maml:para></maml:para> <maml:para>These values are set to the `QuerySelectColumns` property of `ISearchQueryHelper` that is used internally on AQS-to-SQL conversion. For more information on `ISearchQueryHelper`, see the RELATED LINKS section.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none"> <maml:name>Sorting</maml:name> <maml:Description> <maml:para>Sets the sort order for the query result set.</maml:para> <maml:para>The value should be a string or an array of strings that contain a property name followed by the `DESC` or `ASC` keyword. For example, "System.ItemName DESC" or "DateModified ASC".</maml:para> <maml:para>If not specified, "System.Search.Rank DESC" is used by default.</maml:para> <maml:para>This value is set to the `QuerySorting` property of `ISearchQueryHelper` that is used internally on AQS-to-SQL conversion. For more information on `ISearchQueryHelper`, see the RELATED LINKS section.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="MaxResults"> <maml:name>TotalCount</maml:name> <maml:Description> <maml:para>Sets the maximum number of results to be returned by the query.</maml:para> <maml:para>This value is set to the `QueryMaxResults` property of `ISearchQueryHelper` that is used internally on AQS-to-SQL conversion. For more information on `ISearchQueryHelper`, see the RELATED LINKS section.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>Int32</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none"> <maml:name>Where</maml:name> <maml:Description> <maml:para>Sets the restrictions appended to a query in WHERE clauses.</maml:para> <maml:para>This value is set to the `QueryWhereRestrictions` property of `ISearchQueryHelper` that is used internally on AQS-to-SQL conversion. For more information on `ISearchQueryHelper`, see the RELATED LINKS section.</maml:para> </maml:Description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Automation.Management.PSObject</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Note that the cmdlet searches only the files indexed by the Windows Search subsystem. This behavior is different from that of Windows Explorer.</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> iws "the beatles"</dev:code> <dev:remarks> <maml:para>This command searches for "the beatles" by Windows Search.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> iws "the beatles" -Path ~\Music -SelectColumns Search.Rank, ItemPathDisplay -TotalCount 5 -Sorting "Search.Rank DESC"</dev:code> <dev:remarks> <maml:para>This command searches for "the beatles" in the Music folder. The outputs include the columns System.Search.Rank and System.ItemPathDisplay. Top 5 results are displayed in the descending order of the search score.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 3 --------------------------</maml:title> <dev:code>PS C:\> iws "the beatles" -Where "@DateModified >= '2018/01/01'"</dev:code> <dev:remarks> <maml:para>This command searches for "the beatles" with the condition that the last modified date is newer than or equal to January 1, 2018.</maml:para> <maml:para>This is an example of a combination of AQS and SQL queries.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 4 --------------------------</maml:title> <dev:code>PS C:\> iws -Where "@Music.Artist like '%beatles%' and @DateCreated >= '2018/01/01'"</dev:code> <dev:remarks> <maml:para>This command searches for files that meet the condition that the System.Music.Artist property contains "beatles" and the created date is newer than or equal to January 1, 2018.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 5 --------------------------</maml:title> <dev:code>PS C:\> iws -SQL "SELECT System.ItemName FROM SystemIndex WHERE @Music.Artist like '%beatles%' and @DateCreated >= '2018/01/01'"</dev:code> <dev:remarks> <maml:para>This is an example using SQL as query language.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Advanced Query Syntax</maml:linkText> <maml:uri> https://docs.microsoft.com/ja-jp/windows/desktop/search/-search-3x-advancedquerysyntax</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Windows Search SQL</maml:linkText> <maml:uri> https://docs.microsoft.com/ja-jp/windows/desktop/search/-search-sql-windowssearch-entry</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Windows Property System</maml:linkText> <maml:uri> https://docs.microsoft.com/ja-jp/windows/desktop/properties/windows-properties-system</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>ISearchQueryHelper interface</maml:linkText> <maml:uri>https://docs.microsoft.com/ja-jp/windows/desktop/api/searchapi/nn-searchapi-isearchqueryhelper</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> </helpItems> |