Some Poskim do not recommend kashering a dishwasher.
To kasher a dishwasher for non-Pesach use:
Do not kasher a dishwasher until 24 hours has elapsed from its last use. The dishwasher must be deep cleaned; pay special attention to food debris that can be trapped in difficult to reach spaces.
Run the dishwasher with soap three consecutive times on the longest and hottest cycle. Then run it again without detergent. It is now kosher.