-
Notifications
You must be signed in to change notification settings - Fork 107
SPDocIcon
dscbot edited this page Mar 17, 2023
·
5 revisions
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
FileType | Key | String | Specifies the file type to configure the docicon for | |
IconFile | Write | String | Specifies the full path to the image file for the file type | |
EditText | Write | String | Specifies the edit text for the file type | |
OpenControl | Write | String | Specifies the Open Control command for the file type | |
Ensure | Write | String | Present to configure the file type. Absent is remove the file type |
Present , Absent
|
Type: Common Requires CredSSP: No
This resource is used to configure file type icons in the docicon.xml file. It allows to configure the icon, EditText and OpenControl parameter for a file type.
The resource only changes the server it is running on, so should be added to each server in the farm.
Note: Do NOT use a dot in the file type name! Only specify the extension. For example "pdf" instead of ".pdf".
This example shows how configure a DocIcon for a file type and configure additional properties.
Configuration Example
{
param
(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost
{
SPDocIcon ConfigurePDFIcon
{
FileType = 'PDF'
IconFile = '\\server\share\icpdf.png'
EditText = 'Adobe Acrobat or Reader X'
OpenControl = 'AdobeAcrobat.OpenDocuments'
Ensure = "Present"
PsDscRunAsCredential = $SetupAccount
}
}
}
This example shows how configure a DocIcon for a file type and configure additional properties.
Configuration Example
{
param
(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost
{
SPDocIcon RemovePDFIcon
{
FileType = 'PDF'
Ensure = "Absent"
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