Alex McLeish claimed his first win as Nottingham Forest manager with a deserved 2-1 victory over Peterborough.