About Help

Choose a topic from the list on the left or search for a specific topic. Choose a topic from the list or search for a specific topic.
Cmdlets  Providers  Aliases  Modules
 

about_SPServiceInstance

Spserviceinstance

SharePointDSC
 

SHORT DESCRIPTION

 

.NAME

    SPServiceInstance 
 
# Description 
     
    This resource is used to specify if a specific service should be running 
    (Ensure = "Present") or not running (Ensure = "Absent") on the current server. 
    The name is the display name of the service as shown in the Central Admin 
     
.PARAMETER Name 
    Key - string 
    The name of the service instance to manage 
 
.PARAMETER Ensure 
    Write - string 
    Allowed values: Present, Absent 
    Present to ensure it runs on this server, or absent to ensure it is stopped 
 
.PARAMETER InstallAccount 
    Write - String 
    POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5 
 
 

.EXAMPLE

    This example shows how to ensure that the managed metadata service is running 
    on the local server.  
 
 
    Configuration Example  
    { 
        param( 
            [Parameter(Mandatory = $true)] 
            [PSCredential] 
            $SetupAccount 
        ) 
        Import-DscResource -ModuleName SharePointDsc 
 
        node localhost { 
            SPServiceInstance ManagedMetadataServiceInstance 
            {   
                Name           = "Managed Metadata Web Service" 
                Ensure         = "Present" 
                InstallAccount = $SetupAccount 
            } 
        } 
    } 
 
 

.EXAMPLE

    This example shows how to ensure that the Business Data Connectivity Service  
    is not running on the local server.  
 
 
    Configuration Example  
    { 
        param( 
            [Parameter(Mandatory = $true)] 
            [PSCredential] 
            $SetupAccount 
        ) 
        Import-DscResource -ModuleName SharePointDsc 
 
        node localhost { 
            SPServiceInstance StopBCSServiceInstance 
            {   
                Name           = "Business Data Connectivity Service" 
                Ensure         = "Absent" 
                InstallAccount = $SetupAccount 
            } 
        } 
    }