Set-NAVServerInstance
Changes the service state of a Microsoft Dynamics NAV Server instance.
Syntax
Set-NAVServerInstance
[-ServerInstance] <String>
[-Stop]
[-Start]
[-Restart]
[-ServiceAccount <ServiceAccount>]
[-ServiceAccountCredential <PSCredential>]
[-Force]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
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.
Examples
EXAMPLE 1
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
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.
Parameters
-Confirm
Prompts you for confirmation before executing the command.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Force
Forces the command to run without asking for user confirmation.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Restart
Restarts the Microsoft Dynamics NAV Server instance.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ServerInstance
Specifies the name of a Dynamics NAV Server instance, for example, DynamicsNAV or myinstance. You can specify either the full name of an instance, such as MicrosoftDynamicsNavServer$myinstance or the short name such as myinstance.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-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.
Type: | ServiceAccount |
Accepted values: | LocalService, NetworkService, LocalSystem, User |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ServiceAccountCredential
Specifies a set of security credentials that must be used when configuring the service account.
Type: | PSCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Start
Starts the Microsoft Dynamics NAV Server instance.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Stop
Stops the Microsoft Dynamics NAV Server instance.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
System.String
You can pipe a string that contains a Microsoft Dynamics NAV Server instance name to the cmdlet.
Outputs
None