The London Borough of Haringey issued an enforcement notice against Paul Muir in May last year, alleging a breach of planning control after he installed UPVC windows in his home which sits within the Bowes Park Conservation Area.
Muir, however, pointed out that an estimated 90 per cent of front-facing windows fitted to other nearby properties are made of UPVC.
No action had been taken against other homeowners, Muir argued, characterising his treatment by the council as unfair.
He also argued that, in any event, his UPVC window was not a "development" because it did not "materially affect the building's external appearance."
Muir successfully appealed against the enforcement notice to a planning inspector in April this year.
The inspector defined the "building" under consideration as the block of three terraced houses of which Muir's flat conversion forms part.
All of the ground floor windows across the whole block were made of UPVC, the inspector noted.
However, in upholding Haringey's challenge to the inspector's decision last week, Mrs Justice Lieven ruled that he erred in law.
The inspector, she said, gave inadequate reasons for his conclusion that the relevant "building" was the whole terrace.
That was a "somewhat surprising proposition" because "in common parlance each house in a terrace would be considered a building."
The inspector, the judge added, was obliged to focus on the visual impact that the window had on the building - and nothing else.
The prevalence of UPVC windows elsewhere in the conservation area was "plainly legally irrelevant," she told the court.
The inspector's decision was quashed and the housing secretary was directed to reconsider the matter.