I can find sample VBA, and C# code to do this, but no Powershell snippets (google is surprisingly silent on this, as is Stackoverflow). Can anyone point me at some Powershell (or provide some) that does this? I’m expecting it would get at Access’s API via COM.
Thank you!
I should know better than to ask on the day before Christmas and hope for a quick response, so I did it myself. Turns out the answer is super-simple in any case. The top function below does what I needed and the driver function will loop over all the access databases in a directory and compact each one of them.