I have found some examples, https://d365dotblog.com/2020/05/04/powershell-scripts-to-export-and-import-the-dynamics-365-ce-solution/ - it is one of them, but it doesnt work inside pipeline and has another type of auth.
I am newbie in PowerShell and dont know how to write script by myself. Also I haven't found info about my question in the internet. Can you give me an example please?