I was sure that I fixed it earlier, but the bug is now here. :(
The problem is that both cmdlets can't decide which parameter set should be used (there is in the module a lot of inheritance, and several parameter sets are seen by a cmdlet).
Quick fix: use the Description parameter:
Start-Process calc -PassThru | Get-UIAWindow | Save-UIAScreenshot -Description asdf
This generates the following file: %TEMP%\[year][month][day]...._asdf.bmp
Now (will be published this week), I fixed it surely and the sample below is working and after having run it, I have a screenshot of the window as well as screenshots of every button:
Start-Process charmap -PassThru | Get-UIAWindow | Save-UIAScreenshot
Start-Process charmap -PassThru | Get-UIAWindow | Get-UIAButton | Save-UIAScreenshot
There is another bug: earlier, being run without pipeline input, the cmdlet returned the picture of the desktop. I'll fix it too.