Skip to content

SPProductUpdate

Brian Farnhill edited this page Sep 21, 2016 · 20 revisions

Parameters

Parameter Attribute DataType Description Allowed Values
SetupFile Key String The name of the update setup file
ShutdownServices Write Boolean Shutdown SharePoint services to speed up installation
BinaryInstallDays Write String 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
InstallAccount Write String POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5

Description

This resource is used to perform the update step of installing SharePoint updates, like Cumulative Updates and Service Packs. The SetupFile parameter should point to the update file. The ShutdownServices parameter is used to indicate if some services (Timer, Search and IIS services) have to be stopped before installation of the update. This will speed up the installation. The BinaryInstallDays and BinaryInstallTime parameters specify a window in which the update can be installed. This module requires the Configuration Wizard resource to fully complete the installation of the update, which can be done through the use of SPConfigWizard.

Examples

Example 1

This example installs the Cumulative Update only in the specified window. It also shuts down services to speed up the installation process.

Configuration Example 
{
    param(
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount
    )
    Import-DscResource -ModuleName SharePointDsc

    node localhost {
        SPProductUpdate InstallCUMay2016
        {
            SetupFile            = "C:\Install\CUMay2016\ubersrv2013-kb3115029-fullfile-x64-glb.exe"
            ShutdownServices     = $true
            BinaryInstallDays    = "sat", "sun"
            BinaryInstallTime    = "12:00am to 2:00am"
            Ensure               = "Present"
            PsDscRunAsCredential = $SetupAccount
        }
    }
}

Example 2

This example installs the SharePoint 2013 Service Pack only in the specified window. It also shuts down services to speed up the installation process.

Configuration Example 
{
    param(
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount
    )
    Import-DscResource -ModuleName SharePointDsc

    node localhost {
        SPProductUpdate InstallCUMay2016
        {
            SetupFile            = "C:\Install\SP2013SP1\officeserversp2013-kb2880552-fullfile-x64-en-us.exe"
            ShutdownServices     = $true
            BinaryInstallDays    = "sat", "sun"
            BinaryInstallTime    = "12:00am to 2:00am"
            Ensure               = "Present"
            PsDscRunAsCredential = $SetupAccount
        }
    }
}

Example 3

This example installs the SharePoint 2013 Dutch Language Pack Service Pack only in the specified window. It also shuts down services to speed up the installation process.

Configuration Example 
{
    param(
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount
    )
    Import-DscResource -ModuleName SharePointDsc

    node localhost {
        SPProductUpdate InstallCUMay2016
        {
            SetupFile            = "C:\Install\SP2013-LP_NL-SP1\serverlpksp2013-kb2880554-fullfile-x64-nl-nl.exe"
            ShutdownServices     = $true
            BinaryInstallDays    = "sat", "sun"
            BinaryInstallTime    = "12:00am to 2:00am"
            Ensure               = "Present"
            PsDscRunAsCredential = $SetupAccount
        }
    }
}
Clone this wiki locally