Similar to this: https://github.com/MadeiraData/microsoft-dbas-club/blob/master/TempDB/Create%20TempDB%20File%20Per%20Processor.sql With the addition of: - Support for REMOVING TempDB files if there are too many. - Make sure number of TempDB files is divisible by 4. - Only output the commands without executing them immediately.