Weapons and armor degrade as you use them, lowering damage and protection. Instead of hunting for repair kits or a high Repair skill, the console can set the condition of your currently equipped weapon to full with player.setweaponhealthperc.
Repair your weapon to 100%
Open the console with ~ (how to open the console), then run:
The value is a percentage from 0 to 100, applied to the weapon you currently have drawn. Pull out the weapon you want to fix first, then run the command.
Repairing armor and other items
For a specific item by reference, select it in the console (or use its ref ID) and use setobjecthealth, or simply spawn a fresh, full-condition copy with player.additem and the item's base ID from the item codes list — newly added items always arrive at 100% condition.