'How can i count Get-SFTPChildItem folder size together?

I need help with my Project

I'm trying to display the size of a folder called sh-modules but only thing I can achieve is displaying individual subfolder sizes...

Get-SFTPChildItem -SessionId 0 -Path sh-modules -Recursive | select FullName, @{N='Size (kB)';E={$_.Length/1kb}}

This is what I get

screenshot

Is there any way to combine all those sizes to one number?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source