DSCResources/MSFT_xSPInstallPrereqs/MSFT_xSPInstallPrereqs.schema.mof

/*
**Description**
 
This resource is responsible for ensuring the installation of all SharePoint prerequisites.
It makes use of the PrerequisiteInstaller.exe file that is part of the SharePoint binaries, and will install the required Windows features as well as additional software.
The OnlineMode boolean will tell the prerequisite installer which mode to run in, if it is online you do not need to list any other parameters for this resource.
If you do not use online mode, you must include all other parameters to specify where the installation files are located.
These additional parameters map directly to the options passed to prerequisiteinstaller.exe.
 
Additionally, the process of installing the prerequisites on a Windows Server usually results in 2-3 restarts of the system being required. To ensure the DSC configuration is able to restart the server when needed, ensure the below settings for the local configuration manager are included in your DSC file.
 
    LocalConfigurationManager
    {
        RebootNodeIfNeeded = $true
    }
 
**Examples**
 
Online example:
 
    xSPInstallPrereqs InstallPrerequisites
    {
        InstallerPath = "C:\SPInstall\Prerequisiteinstaller.exe"
        OnlineMode = $true
    }
 
Offline example:
 
    xSPInstallPrereqs InstallPrerequisites
    {
        InstallerPath = "C:\SPInstall\Prerequisiteinstaller.exe"
        OnlineMode = $false
        SQLNCli = "C:\SPInstall\prerequisiteinstallerfiles\sqlncli.msi"
        PowerShell = "C:\SPInstall\prerequisiteinstallerfiles\Windows6.1-KB2506143-x64.msu"
        NETFX = "C:\SPInstall\prerequisiteinstallerfiles\dotNetFx45_Full_setup.exe"
        IDFX = "C:\SPInstall\prerequisiteinstallerfiles\Windows6.1-KB974405-x64.msu"
        Sync = "C:\SPInstall\prerequisiteinstallerfiles\Synchronization.msi"
        AppFabric = "C:\SPInstall\prerequisiteinstallerfiles\WindowsServerAppFabricSetup_x64.exe"
        IDFX11 = "C:\SPInstall\prerequisiteinstallerfiles\MicrosoftIdentityExtensions-64.msi"
        MSIPCClient = "C:\SPInstall\prerequisiteinstallerfiles\setup_msipc_x64.msi"
        WCFDataServices = "C:\SPInstall\prerequisiteinstallerfiles\WcfDataServices.exe"
        KB2671763 = "C:\SPInstall\prerequisiteinstallerfiles\AppFabric1.1-RTM-KB2671763-x64-ENU.exe"
        WCFDataServices56 = "C:\SPInstall\prerequisiteinstallerfiles\WcfDataServices56.exe"
    }
*/
[ClassVersion("1.0.0.0"), FriendlyName("xSPInstallPrereqs")]
class MSFT_xSPInstallPrereqs : OMI_BaseResource
{
    [Key] String InstallerPath;
    [Required] Boolean OnlineMode;
    [Write] String SQLNCli;
    [Write] String PowerShell;
    [Write] String NETFX;
    [Write] String IDFX;
    [Write] String Sync;
    [Write] String AppFabric;
    [Write] String IDFX11;
    [Write] String MSIPCClient;
    [Write] String WCFDataServices;
    [Write] String KB2671763;
    [Write] String WCFDataServices56;
    [Write] String KB2898850;
    [Write] String MSVCRT11;
    [Write] String MSVCRT14;
    [Write] String KB3092423;
    [Write] String ODBC;
    [Write] String DotNet452;
    [Required, ValueMap{"Present","Absent"}, Values{"Present","Absent"}] string Ensure;
};