Skip to content

SPInstallLanguagePack

dscbot edited this page Mar 17, 2023 · 18 revisions

SPInstallLanguagePack

Parameters

Parameter Attribute DataType Description Allowed Values
BinaryDir Key String The directory that contains all of the SharePoint binaries
BinaryInstallDays Write StringArray[] Specify on which dates the installation is allowed mon, tue, wed, thu, fri, sat, sun
BinaryInstallTime Write String Specify in which time frame the installation is allowed
Ensure Write String Present to install SharePoint. Absent is currently not supported Present, Absent

Description

Type: Distributed Requires CredSSP: No

This resource is used to install the SharePoint Language Pack binaries. The BinaryDir parameter should point to the path that setup.exe is located (not to setup.exe itself).

The BinaryInstallDays and BinaryInstallTime parameters specify a window in which the update can be installed.

Starting with SharePoint 2016, the Language Packs are offered as an EXE package. You have to extract this package before installing, using the following command: .\serverlanguagepack.exe /extract:[Extract Folder]

NOTE: When files are downloaded from the Internet, a Zone.Identifier alternate data stream is added to indicate that the file is potentially from an unsafe source. To use these files, make sure you first unblock them using Unblock-File. SPInstallLanguagePack will throw an error when it detects the file is blocked.

Examples

Example 1

This module will install the SharePoint Language Pack. The binaries for SharePoint in this scenario are stored at C:\SPInstall (so it will look to run C:\SPInstall\Setup.exe)

Configuration Example
{
    param
    (
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount
    )

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPInstallLanguagePack InstallLPBinaries
        {
            BinaryDir = "C:\SPInstall"
            Ensure    = "Present"
        }
    }
}

Example 2

This module will install the SharePoint Language Pack in the specified timeframe. The binaries for SharePoint in this scenario are stored at C:\SPInstall (so it will look to run C:\SPInstall\Setup.exe)

Configuration Example
{
    param
    (
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount
    )

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPInstallLanguagePack InstallLPBinaries
        {
            BinaryDir         = "C:\SPInstall"
            BinaryInstallDays = "sat", "sun"
            BinaryInstallTime = "12:00am to 2:00am"
            Ensure            = "Present"
        }
    }
}
Clone this wiki locally