This is a follow-up to Murray's article for scripting pButtons data extraction on Unix/MacOS:
Extracting pButtons data to CSV for UNIX/MacOS
Extracting pButtons data to a CSV file on Windows
PowerShell scripting was used in this article because it is available by default on Windows platforms.