-
Notifications
You must be signed in to change notification settings - Fork 107
SPSearchFileType
dscbot edited this page Feb 11, 2022
·
16 revisions
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
FileType | Key | String | The name of the file type | |
ServiceAppName | Key | String | The name of the search service application | |
Description | Write | String | The description of the file type | |
MimeType | Write | String | The mime type of the file type | |
Enabled | Write | Boolean | The state of the file type | |
Ensure | Write | String | Present if the file type should exist, absent if it should not |
Present , Absent
|
Type: Distributed Requires CredSSP: No
This resource is responsible for managing the search file types in the search service application. You can create new file types, change existing types and remove existing file types.
The default value for the Ensure parameter is Present. When not specifying this parameter, the file type is added.
This example shows how to apply settings to a specific file type in search, using the required parameters
Configuration Example
{
param
(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost
{
SPSearchFileType PDF
{
FileType = "pdf"
ServiceAppName = "Search Service Application"
Description = "PDF"
MimeType = "application/pdf"
Ensure = "Present"
PsDscRunAsCredential = $SetupAccount
}
}
}
This example shows how to disable a specific file type in search
Configuration Example
{
param
(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost
{
SPSearchFileType PDF
{
FileType = "pdf"
ServiceAppName = "Search Service Application"
Description = "PDF"
MimeType = "application/pdf"
Enabled = $false
Ensure = "Present"
PsDscRunAsCredential = $SetupAccount
}
}
}
- Home
- Getting Started
- Pre-requisites
- Installing the module
- Exporting SharePoint Configuration
- Creating Configuration Files
- Pre-created Examples
- Creating an Azure development environment
- Understanding Resources & Syntax
- Remote PowerShell Authentication
- Contributing to SharePointDsc
- Other useful modules for SharePoint DSC configurations