A microwave-assisted protocol was developed for the construction of 2-amino-1H-imidazole/triazole conjugates starting from the previously described 2-hydroxy-2,3-dihydro-1H-imidazo[1,2-a]pyrimidin-4-ium salts. The process involves a one-pot hydrazinolysis/Dimroth-rearrangement of these salts followed by a ligand-free copper nanoparticle-catalyzed azide-alkyne Huisgen cycloaddition. The 2-amino-1H-imidazole/triazole conjugates showed moderate to high preventive activity against biofilms of S. Typhimurium, E. coli, P. aeruginosa and S. aureus. The most active compounds had BIC50 values between 1.3 and 8 μM. A remarkable finding was that introduction of the triazole moiety into the side chain of 2-aminoimidazoles with a long (C8-C13) 2N-alkyl chain did drastically improve their activity. Conclusively, the 2-amino-1H-imidazole/triazole scaffold provides a lead structure for further design and development of novel biofilm inhibitors.