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 and codeunit methods to be executed in the upgrade
ExecutedFunctions
The total number of successfully executed upgrade events and codeunit methods
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 is 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).
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
CodeunitId
The ID of the upgrade codeunit that ran
FunctionName
The method in the upgrade codeunit that ran
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 or method started
Duration
The time it took to complete the step or method
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 and methods that were invoked during the data upgrade process.
You can format the output as a table by appending the command with "| ft" or "| ogv".
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Detailed
Position:
3
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ErrorOnly
Lists errors that occurred during the data upgrade process.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
ErrorOnly
Position:
2
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Force
Forces the command to run without asking for user confirmation.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
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.
Parameter properties
Type:
Int32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Progress
Position:
5
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Progress
Provides live progress indication about the data upgrade process that is currently running.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Progress
Position:
4
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
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.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
0
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
True
Value from remaining arguments:
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.
Parameter properties
Type:
TenantId
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
Id
Parameter sets
(All)
Position:
1
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
Inputs
System.String
You can pass the value of the ServerInstance and Tenant parameters as a string to this cmdlet.