Set-NAVServerInstance

Set-NAVServerInstance

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

Syntax

Parameter Set: __AllParameterSets
Set-NAVServerInstance [-ServerInstance] <String> [-Force] [-Restart] [-ServiceAccount <ServiceAccount> ] [-ServiceAccountCredential <PSCredential> ] [-Start] [-Stop] [-Confirm] [-WhatIf] [ <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

-Force

Forces the command to run without asking for user confirmation.

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 DynamicsNAV71. 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

-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

-ServiceAccount<ServiceAccount>

Specifies the Windows-based computer account that the Microsoft Dynamics NAV Server instance 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

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

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: Performing operation "Set-NAVServerInstance" on Target "ServerInstance = MicrosoftDynamicsNavServer$MyInstance, Start = False, Stop = False, Restart = True".
VERBOSE: Attempting to stop service MyInstance
VERBOSE: Service MicrosoftDynamicsNavServer$MyInstance is stopped
VERBOSE: Service HTTP is already running
VERBOSE: Attempting to start service MicrosoftDynamicsNavServer$NewInstance
VERBOSE: Service MicrosoftDynamicsNavServer$NewInstance is running
VERBOSE: NavCommand.EndProcessing