When it comes to scripting the setup of performance counters Logman is your friend; and Relog comes in really handy for converting a binary log to SQL log.