This is a really quick tip just for myself to save the script where I can easily get to it, this time a quick way to output the duration of a PowerShell script. When a script takes longer than expected, in my mind I am waiting HOURS for it to complete but it is probably just a minute or two. I’ve run into this before, where I spend WAY too much time trying to locate a good, easy way to output the duration of a script. Without further ado, here’s the PowerShell code:
I was asked how to upload files to SFTP from Business Central, there are several ways to do it and several posts published about it for Business Central.
In this case, without going through other Azure services, PowerApps etc., it is possible to do it directly and simply via Powershell and, given that the previous post on Powershell was quite successful, I also report this functionality in the blog.
Sometimes it may be useful or necessary to use powershell to read data from SQL Server to export it to other formats This can also be used with older versions of Dynamics NAV which do not have access to the integrated powershell. Using standard powershell commands it is possible for example to read an SQL view and export it to CSV or XML file.