Powershell command Sync-NavTenant list is truncated
-
Powershell command Sync-NavTenant list is truncated
Posted by Jason Wilder on April 10, 2019 at 8:20 am-
In upgrading to NAV 2018 one of the steps is to “Sync Schema for All Tables” which can be done from Dev environment or Powershell.Ā Powershell is better since you can see the output.Ā So when running this command: Sync-NavTenant [YourServiceTierName] -Mode Sync if there are destructive changes it rolls back and lists all of the tables and fields that are being changed or deleted like this for example:
Table: 111, Sales Shipment Line
Field: 84012, Return Item No.: Deleted
Table: 113, Sales Invoice Line
Field: 84012, Return Item No.: Deleted
Table: 355, Ledger Entry Dimension
Field: 1, Table ID: Data type changed
Field: 2, Entry No.: Data type changed
Field: 3, Dimension Code: Data type changed
Field: 4, Dimension Value Code: Data type changed
etc…This is totally expected during an upgrade and is typically resolved by using an upgrade codeunit.Ā Turns out that due to our add-on’s there are so many changes to list that it truncates the list and I can’t see all the changes.Ā Just as an aside, not a single one of our add-on’s included an upgrade codeunit with their product to resolve this (not cool).Ā
So my question is this:Ā Isn’t there a way to run a powershell command to a file instead of the screen which would most likely end up creating the full list?Ā Or some other way to see the full results from the Sync-NavTenant command.
——————————
Jason Wilder
Senior Application Developer
Stonewall Kitchen
York ME
—————————— -
Mathew Ealy
MemberApril 11, 2019 at 7:44 AM
Add the out-file command to your script.
Sync-NavTenant [YourServiceTierName] -Mode Sync -verbose | Out-File -FilePath C:Sync.txt——————————
Mathew Ealy
Nav Support Specialist
Rentokil N. America
Reading PA
——————————
——————————————- -
Exactly what I was looking for, thanks!
——————————
Jason Wilder
Senior Application Developer
Stonewall Kitchen
York ME
——————————
——————————————- -
I spoke too soon.Ā This:
Sync-NavTenant DynamicsNAV110-2 -Mode CheckOnly -verbose Out-File -FilePath “C:binSync.txt”causes this error:
A positional parameter cannot be found that accepts argument ‘Out-File’.
——————————
Jason Wilder
Senior Application Developer
Stonewall Kitchen
York ME
——————————
——————————————- -
Mathew Ealy
MemberApril 12, 2019 at 8:22 AM
you need to include the pipe | , you are sending the output of the first commandĀ to the out-file powershell command.——————————
Mathew Ealy
Nav Support Specialist
Rentokil N. America
Reading PA
——————————
——————————————-
Jason Wilder replied 7 years, 7 months ago 1 Member · 0 Replies -
-
0 Replies
Sorry, there were no replies found.
The discussion ‘Powershell command Sync-NavTenant list is truncated’ is closed to new replies.