If you are using the Exchange Admin Integration Pack. You might have tried to use the run exchange shell cmdlet” activity and disocvered that the result is kind special in formatting.

 

Your result will look similar to this:

[PSComputerName: ex2010.cloud.local]
[RunspaceId: f30b4063-2b50-4609-9f84-91a480ac4bea]
[Database: Mailbox Database 1872261918]
[UseDatabaseRetentionDefaults: True]
[RetainDeletedItemsUntilBackup: False]

to help you , i have created a function for powershell that does it job:

 

use the function as shown here:

 

The function created a key/pair collection containing all parts of the result, you then use the standard dot or [] syntax to get the value from the collection into a single simple string variable.

then get map the variable to published data as seen in this screenshot:

image

 

Update 15/05/2013: added [String] in parameter to make sure the input is in the right format. Thank you for reminding me Andy