Preheat the waffle iron on medium.
Place the shredded potato in the middle of a paper towel and try to squeeze out as much liquid as possible.
Mix the shredded potato, rosemary, garlic, onion, salt, and pepper in a medium mixing bowl.
Brush both sides of the waffle iron with the butter, being sure to coat it well.
Spoon half of the shredded potatoes into the center of the waffle iron and close the lid, pressing down lightly. After 2 minutes, press down on the lid again to further compress the potatoes.
Cook the potatoes for approximately 10 minutes, checking on them once or twice. When golden brown all over, carefully remove them.