Yes it does.
If Aegislash uses the move while it is in Shield Forme it will swap Aegislash's Defence Stat with it's Attack Stat.
If Aegislash uses the move while it is in Blade Forme it will swap Aegislash's Attack Stat with it's Defence Stat.
So for example if I used Power Trick while in Shield Forme I would essentially swap my Attack and Defence Stats round. Therefore Aegislash would have high Attack and Special Defence in Shield Forme and when it changed to Blade Form it would have high Defence and Special Attack. This would be in effect until you switched out.
Source: Knowledge and Bulbapedia
Hope I helped :)