DSCResources/MSFT_SPCreateFarm/MSFT_SPCreateFarm.schema.mof

/*
**Description**
 
This resource is used to provision a new SharePoint farm.
It should only be used on the first server in the farm to create the configuration database, all servers to join the farm after the first server creates the configuration database should use [SPJoinFarm](SPJoinFarm).
Once the config DB has been created, the resource will install local help collections, secure resources, activate features and provision the central admin site.
 
The passphrase is passed as a Credential object. The username of this credential is ignored, only the value of the password is used as the farm passphrase.
 
The port of the Central Admin website can be set by using the CentralAdministrationPort property, if this is not defined the site will be provisioned on port 9999.
However this setting will not impact existing deployments that already have Central Admin provisioned on another port.
Also when a farm is created, the current behavior is to not enroll the server as a cache server (which is the default behavior of SharePoint).
This means you need to use [SPDistributedCacheService](SPDistributedCacheService) on at least one server in the farm to designate it as a cache server.
 
CentralAdministrationAuth can be specified as "NTLM" or "KERBEROS". If not specified, it defaults to NTLM. If using Kerberos, make sure to have appropriate SPNs setup for Farm account and Central Administration URI.
 
**Example**
 
    SPCreateFarm CreateSPFarm
    {
        DatabaseServer = "SQL.contoso.local\SQLINSTANCE"
        FarmConfigDatabaseName = "SP_Config"
        Passphrase = $FarmPassPhrase
        FarmAccount = $FarmAccount
        PsDscRunAsCredential = $SetupAccount
        AdminContentDatabaseName = "SP_AdminContent"
        CentralAdministrationPort = 2000
        CentralAdministrationAuth = "Kerberos"
        ServerRole = Custom
    }
*/
 
[ClassVersion("1.0.0.0"), FriendlyName("SPCreateFarm")]
class MSFT_SPCreateFarm : OMI_BaseResource
{
    [Key, Description("Name of the configuration database")] String FarmConfigDatabaseName;
    [Key, Description("Server that will host the configuration and admin content databases")] String DatabaseServer;
    [Required, Description("The account to use as the main farm account"), EmbeddedInstance("MSFT_Credential")] String FarmAccount;
    [Required, Description("The passphrase to use to allow servers to join this farm"), EmbeddedInstance("MSFT_Credential")] String Passphrase;
    [Required, Description("The name of the admin content database")] String AdminContentDatabaseName;
    [Write, Description("What port will Central Admin be provisioned to - default is 9999")] uint32 CentralAdministrationPort;
    [Write, Description("The authentication provider of the CentralAdministration web application"), ValueMap{"NTLM","Kerberos"}, Values{"NTLM","Kerberos"}] String CentralAdministrationAuth;
    [Write, Description("SharePoint 2016 only - the MinRole role to enroll this server as"), ValueMap{"Application","Custom","DistributedCache","Search","SingleServer","SingleServerFarm","SpecialLoad","WebFrontEnd"}, Values{"Application","Custom","DistributedCache","Search","SingleServer","SingleServerFarm","SpecialLoad","WebFrontEnd"}] string ServerRole;
    [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsAccount if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount;
};