Need to have a diagnosis performed of the 4 wheel drive system and transfer case, along with related electrical components. Can't really guess at anything.
RepairPal Certified shops can diagnose and repair your 2006 Hummer H2. They provide transparent pricing with a minimum 12-month or 12,000-mile warranty on repairs and services.