DSCResources/MSFT_SPUserProfileServiceAppPermissions/MSFT_SPUserProfileServiceAppPermissions.schema.mof

/*
**Description**
 
This resource will apply permissions to a user profile service application.
These can control access to create my sites, use social features, and use tagging.
If you want to allow all users the ability to use a specific permisisons include "Everyone" as a user in the corresponding property.
To specify that there should be no permissions on a type, use "none"
 
**Example**
 
    SPUserProfileServiceAppPermissions UPAPermissions
    {
        ProxyName = "User Profile Service Application Proxy"
        CreatePersonalSite = @("DEMO\Group", "DEMO\User1")
        FollowAndEditProfile = @("Everyone")
        UseTagsAndNotes = @("None")
        PsDscRunAsCredential = $InstallAccount
    }
*/
 
[ClassVersion("1.0.0.0"), FriendlyName("SPUserProfileServiceAppPermissions")]
class MSFT_SPUserProfileServiceAppPermissions : OMI_BaseResource
{
    [Key, Description("The name of the proxy that is attached to the user profile service you wish to set permissions for")] string ProxyName;
    [Required, Description("A list of user principals that will have the Create personal site permission")] string CreatePersonalSite[];
    [Required, Description("A list of user principals that will have the Follow users and edit profile permission")] string FollowAndEditProfile[];
    [Required, Description("A list of user principals that will have the Use tags and notes permission")] string UseTagsAndNotes[];
    [Write, Description("POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5"), EmbeddedInstance("MSFT_Credential")] String InstallAccount;
};