You can search for such windows and do anything you want to do with them.
WinWindow win = new WinWindow();
UITestControlCollection col = win.FindMatchingControls();
foreach (WinWindow wind
in col)
{
// Dismiss or take appropriate actions
}
Please mark this post as answer if this answers your question