Learning Exchange Powershell commands the easy way
If you open up your Exchange Management Console and change any information, there's a button in the bottom left hand corner of the window that will tell you exactly what Powershell code executes what you just did. You can cancel out of the Window so your changes aren't applied, and then use the code to automate changes you might need to make to a whole bunch of objects.
I checked Active Directory Users and Computers (on my test Windows 2008 R2 domain) and there's no equivalent functionality. Nor is there a 'script to Powershell' ability for SQL Server 2008 R2 that I can find. I haven't checked the 2012 versions of these products. This would be an amazing feature to have for all Microsoft's products.
Pilfered from this blog entry at msexchange.org.