How To Process All the Dimensions in the Data Warehouse in Bulk Using PowerShell

Ever wanted to process all the dimensions in the warehouse?  I did while I was preparing for a presentation.  I got tired of doing them one at a time so I figured out how to do it with PowerShell.  I ran this on my SQL Server that had the Analysis Services instance on it.