yes this is possible , u can script ur roles out as ALTER Option and then run it in batch xmla command (which contains all alter commands)
Example:-
<Batch xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
<Alter ObjectExpansion="ExpandFull" xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
<Object>
<RoleID>Role...