The player.additem command drops any weapon, armor, aid item, or piece of junk straight into your inventory. All you need is the item's base ID.
The command
Open the console with ~ (how to open the console), then use player.additem <item id> <amount>:
That spawns one 9mm Pistol. Change the amount to spawn stacks — handy for ammo and consumables:
Finding item IDs
Every weapon, armor, consumable, and collectible has a base ID. Search the full item codes list by name to find the one you want — filter by category (Weapon, Armor, Ammunition, Consumable…) or by DLC.
DLC items start with xx
Item codes that begin with xx are from a DLC, and that prefix is different for every player. Replace it with your own two-digit DLC number — see how to find your DLC number. Base-game items always start with 00 and never change.
Quick favorites
5,000 caps (money):
100 Stimpaks:
For caps specifically, see the dedicated how to get caps guide.