Skip to content

SPConfigWizard

Brian Farnhill edited this page Apr 11, 2017 · 17 revisions

Parameters

Parameter Attribute DataType Description Allowed Values
Ensure Key string Present to install SharePoint. Absent is currently not supported Present, Absent
DatabaseUpgradeDays Write String Specify on which dates running the Configuration Wizard is allowed mon, tue, wed, thu, fri, sat, sun
DatabaseUpgradeTime Write String Specify in which time frame running the Configuration Wizard is allowed
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 upgrade step of installing SharePoint updates, like Cumulative Updates, Service Packs and Language Packs. The DatabaseUpgradeDays and DatabaseUpgradeTime parameters specify a window in which the update can be installed. This module has to be used to complete the update installation step, performed by SPProductUpdate.

Examples

Example 1

This example runs the Configuration Wizard as soon as it is applied.

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

        node localhost {
            SPConfigWizard RunConfigWizard
            {
                Ensure               = "Present"
                PsDscRunAsCredential = $SetupAccount
            }
        }
    }

Example 2

This example only runs the Configuration Wizard in the specified window:

  • Saturday and Sunday night between 3am and 5am.
    Configuration Example 
    {
        param(
            [Parameter(Mandatory = $true)]
            [PSCredential]
            $SetupAccount
        )
        Import-DscResource -ModuleName SharePointDsc

        node localhost {
            SPConfigWizard RunConfigWizard
            {
                Ensure               = "Present"
                DatabaseUpgradeDays  = "sat", "sun"
                DatabaseUpgradeTime  = "3:00am to 5:00am"
                PsDscRunAsCredential = $SetupAccount
            }
        }
    }
Clone this wiki locally