From and administrative command prompt:
pnputil /export-driver * c:\backup <- Export all driver packages
Directly from pnputil /?
Backing up C:\Windows\System32\DriverStore\FileRepository
can also be done, but its all drivers including ALL the microsoft drivers and possibly all version of drivers even old ones that haven't been uninstalled.
Restore the drivers:
pnputil /add-driver c:\drivers\*.inf /install <- Add and install driver package
Sadly, you may have to script the above since I don't think it automatically recurses through sub-directories.
You can also go through the device manager one at a time, but that is too cumbersome.
dism /image:c: /Add-Driver /driver:c:\drivers /recurse
Sadly this can only be done to an offline copy of windows, like boot from the Windows DVD,usb, or etc and goto command prompt.
Something like this:
@for /R c:\Windows\System32\DriverStore\FileRepository\ %i in (*.inf); do pnputil /add-driver "%i" /install
Change the path to where ever your drivers are located.