Get-NAVDataUpgrade

Gets information about a data upgrade process that is currently running, or the last completed data upgrade process.

Syntax

Get-NAVDataUpgrade
   [[-Tenant] <TenantId>]
   [-ServerInstance] <String>
   [-Force]
   [<CommonParameters>]
Get-NAVDataUpgrade
   [[-Tenant] <TenantId>]
   [-ErrorOnly]
   [-ServerInstance] <String>
   [-Force]
   [<CommonParameters>]
Get-NAVDataUpgrade
   [[-Tenant] <TenantId>]
   [-Detailed]
   [-ServerInstance] <String>
   [-Force]
   [<CommonParameters>]
Get-NAVDataUpgrade
   [[-Tenant] <TenantId>]
   [-Progress]
   [[-Interval] <Int32>]
   [-ServerInstance] <String>
   [-Force]
   [<CommonParameters>]

Description

This information is available until the Business Central Server instance is restarted.

Examples

EXAMPLE 1

Get-NAVDataUpgrade -ServerInstance BC

ExtensionData             : System.Runtime.Serialization.ExtensionDataObject
TenantId                  : default
TotalFunctionCount        : 4
ExecutedFunctions         : 4
UpgradeExecutionMode      : UsingParallelOrSerialTransaction
Progress                  : 100.00 %
Details                   : {}
Errors                    : 
ExecutionDetails          : {BASE, BASE, BASE, BASE...}
ExecutionErrors           : 
State                     : Completed
NumericProgress           : 1
IsTenantInExclusiveAccess : False

This example gets information about the data upgrade process that is currently running or the last completed data upgrade process. The following table describes the details:

Detail Description
ExtensionData Data object used to extend this type
TenantId The ID of the tenant being upgraded
TotalFunctionCount The total number of upgrade events to be executed in the upgrade
ExecutedFunctions The total number of successfully executed upgrade events
UpgradeExecutionMode Indicates whether upgrade was run in UsingSingleTransaction mode (using the -SingleTransaction parameter) or UsingParallelOrSerialTransaction mode (using the -FunctionExecutionMode parameter)
Progress The progress of upgrade process execution shown as a percentage of ExecutedFunctions/TotalFunction
Details Obsolete; not used
ExecutionDetails A collection of details for upgrade execution
ExecutionErrors Indicates whether any activities reported errors during execution
State Indicates the current state of upgrade process, like InProgress or Completed
NumericProgress The progress of upgrade process execution shown as a numeric value (ExecutedFunctions/TotalFunction)
IsTenantInExclusiveAccess Indicates whether the tenant in in ExclusiveAccess state

EXAMPLE 2

Get-NAVDataUpgrade -ServerInstance BC -Progress -Interval 2

Data Upgrade Process is currently in progress...


   Percent complete: 0.00 %


   [                                                                    ]

This example monitors progress of current data upgrade process by requesting the Business Central Server for status every 2 seconds (the default is every second).

EXAMPLE 3

Get-NAVDataUpgrade -ServerInstance BC -Detailed

ModuleName                          : BASE
WorkflowStep                        : CheckPreconditions
ExtensionName                       : 
ExtensionId                         : 
ExtensionVersion                    : 
ExecutionSourceId                   : 00000000-0000-0000-0000-000000000000
SessionId                           : 9
CompanyName                         : CRONUS International Ltd.
StartTime                           : 04/27/2022 2:45:19 PM
Duration                            : 00:00:00.0780024
State                               : Completed
Error                               : 
NavDataUpgradeExecutionErrorDetails : 
PostUpgrade                         : False

ModuleName                          : BASE
WorkflowStep                        : OnUpgrade
ExtensionName                       : 
ExtensionId                         : 
ExtensionVersion                    : 
ExecutionSourceId                   : 00000000-0000-0000-0000-000000000000
SessionId                           : 9
CompanyName                         : CRONUS International Ltd
StartTime                           : 04/27/2022 2:45:19 PM
Duration                            : 00:00:00.0030001
State                               : Completed
Error                               : 
NavDataUpgradeExecutionErrorDetails : 
PostUpgrade                         : False

ModuleName                          : BASE
WorkflowStep                        : ValidateUpgrade
ExtensionName                       : 
ExtensionId                         : 
ExtensionVersion                    : 
ExecutionSourceId                   : 00000000-0000-0000-0000-000000000000
SessionId                           : 9
CompanyName                         : CRONUS International Ltd
StartTime                           : 04/27/2022 2:45:19 PM
Duration                            : 00:00:00.0009956
State                               : Completed
Error                               : 
NavDataUpgradeExecutionErrorDetails : 
PostUpgrade                         : False

ModuleName                          : BASE
WorkflowStep                        : AfterUpgradeCommit
ExtensionName                       : 
ExtensionId                         : 
ExtensionVersion                    : 
ExecutionSourceId                   : 00000000-0000-0000-0000-000000000000
SessionId                           : 9
CompanyName                         : CRONUS International Ltd
StartTime                           : 04/27/2022 2:45:26 PM
Duration                            : 00:00:00
State                               : Completed
Error                               : 
NavDataUpgradeExecutionErrorDetails : 
PostUpgrade                         : False

This example returns a detailed status of a currently running or completed data upgrade process.The following table describes the details:

Detail Description
ModuleName The name of the module that was upgraded; always BASE
WorkflowStep The upgrade event that ran
ExtensionName The name of the extension that was upgraded
ExtensionId The ID of the extension that was upgraded
ExtensionVersion The version of the extension that was upgrade
ExecutionSourceId The ID of the source where the event came from
SessionId The ID of the session that ran the step
CompanyName The company the upgrade was run on
StartTime Date and time that step started
Duration The time it took to complete the step
State The state of the step, like InProgress, Failed, Completed or NotExecuted
Error The error that occurred in the step, if any.
PostUpgrade Indicates whether step occurred after the upgrade was completed.

Parameters

-Detailed

Lists details about all the upgrade events that were invoked during the data upgrade process. You can format the output as a table by appending the command with "| ft" or "| ogv".

Type:SwitchParameter
Position:3
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ErrorOnly

Lists errors that occurred during the data upgrade process.

Type:SwitchParameter
Position:2
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

-Interval

Specifies how often (in seconds) the cmdlet requests the current status of data upgrade process. This parameter can only be used together with the -Progress switch. The default value is 1 second.

Type:Int32
Position:5
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Progress

Provides live progress indication about the data upgrade process that is currently running.

Type:SwitchParameter
Position:4
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ServerInstance

Specifies the name of a Business Central Server instance, for example, BC or myinstance. You can specify either the full name of an instance, such as MicrosoftDynamicsNavServer$myinstance or the short name such as myinstance. Include the name in single-quotes.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Tenant

Specifies the ID of a tenant on the Business Central Server instance. You can omit the Tenant parameter only if the Business Central Server instance is not configured to run multiple tenants.

Type:TenantId
Aliases:Id
Position:1
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Inputs

System.String

You can pass the value of the ServerInstance and Tenant parameters as a string to this cmdlet.

Outputs

Microsoft.Dynamics.Nav.Types.NavUpgradeProcessExecutionDetails