61 31 241 Removing And Installing/Replacing Engine Hood Contact Switch
WARNING: This page is about a different car, the 2007 BMW 550i and 2006 BMW 550i. However, it is still accessible from the selected car via links, so may be relevant.
Unfasten plug connection (1) and disconnect.
Pull engine hood contact switch (2) in direction of arrow and feed out of microfilter air duct (3).
Fig 1: Pulling Engine Hood Contact Switch And Microfilter Air Duct