Preheat the oven to 180°C, fan 160°C, gas 4.
Put the potatoes in a large pan of cold water and bring to the boil. Cook for 5 minutes then drain.
Meanwhile, heat the oil in a heavy-based pan and fry the mushrooms until golden.
Layer the potatoes in a 1.5-litre ovenproof dish, alternating with the mushrooms and the pieces of torn ham.
In a bowl, mix together the cream, milk, mustard, garlic and parsley and season with freshly ground black pepper. Pour over the potatoes and mushrooms then sprinkle the cheese on top. Bake for 1 hour, until the potatoes are tender and the cheese is bubbling.