Preheat the pellet smoker to 225 °F.
Combine the garlic, rosemary, pepper, and salt in a bowl.
Add olive oil and combine.
Pat the prime rib dry with kitchen down and using your hands or basting brush, spread the rub all over the prime rib.
Place the prime rib bone-side-down on the grill and close the lid.
Check the internal temperature every hour once it’s been on for a few hours.
When it reaches temperature, remove it from the heat, let it rest for 20 minutes, and serve!