The court's order came weeks after Arvind Kejriwal's Aam Aadmi Party was ousted from power by the Bharatiya Janata Party.