Set-NAVServerInstance

Set-NAVServerInstance

Changes the service state of a Microsoft Dynamics NAV Server instance.

Syntax

Parameter Set: __AllParameterSets
Set-NAVServerInstance [-ServerInstance] <String> [-Restart] [-ServiceAccount <ServiceAccount> ] [-ServiceAccountCredential <PSCredential> ] [-Start] [-Stop] [ <CommonParameters>]

Detailed Description

Use the Set-NAVServerInstance cmdlet to change the service state of a Microsoft Dynamics NAV Server instance. For example, you can change the service state from Stopped to Running. You can also use this cmdlet to change the service account for a server instance.

Parameters

-Restart

Restarts the Microsoft Dynamics NAV Server instance.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ServerInstance<String>

Specifies the name of a Microsoft Dynamics NAV Server instance. The default instance name is DynamicsNAV70. You can specify either the full name of an instance (such as MicrosoftDynamicsNavServer$myinstance) or the short name (such as myinstance).

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-ServiceAccount<ServiceAccount>

Specifies the Windows-based computer account that Microsoft Dynamics NAV Server is to use to log on. Only NetworkService and Windows User values are supported.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ServiceAccountCredential<PSCredential>

Specifies a set of security credentials that must be used when configuring the service account.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-Start

Starts the Microsoft Dynamics NAV Server instance.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Stop

Stops the Microsoft Dynamics NAV Server instance.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • System.String

    You can pipe a string that contains a Microsoft Dynamics NAV Server instance name to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • None

    This cmdlet does not generate any output.

Examples

-------------------------- EXAMPLE 1 --------------------------

Description

-----------

This example uses the Set-NAVServerInstance cmdlet to restart a Microsoft Dynamics NAV Server instance. The Verbose parameter specifies that progress information is to be written to the console.

C:\PS>Set-NAVServerInstance MyInstance -Restart -Verbose

VERBOSE: NavCommand.BeginProcessing
VERBOSE: NavCommand.ProcessRecord
VERBOSE: Attempting to stop service MyInstance
VERBOSE: Service ServerInstanceName is stopped
VERBOSE: Attempting to start service MyInstance
VERBOSE: Service MyInstance is running
VERBOSE: NavCommand.EndProcessing