I’ve recently accepted a new role and joined a new company this week. During the first day, I’ve followed my usual practice of using chocolatey to install most of the developer’s tools I will use, installed WSL2, and I’ve created a full backup of the laptop.
Working in operations for most of my career and the improvements of package managers on Windows OS and WSL2, I can tweak the configuration with just the things that make me productive as on a Linux OS.
Exporting third-party drivers
As a useful step, I’ve also decided to export a copy of all drivers on another volume so if needed I can reinstall the previous version without visit the vendor’s website or restoring the OS from the backup.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
#Requires -RunAsAdministrator # Paolo Frigo, https://scriptinglibrary.com # More details on: # https://docs.microsoft.com/en-us/powershell/module/dism/export-windowsdriver?view=windowsserver2019-ps#examples $DestinationFolder="D:\Drivers\" if (Test-Path -Path $DestinationFolder){ Export-WindowsDriver -Online -Destination $DestinationFolder } else { Write-Error "Invalid Path: $DestinationFolder" } |
Tip
Similar to automated backups, also this step could be automated or scheduled every month or quarter.
Useful Links
There are few scenarios where this can be useful, but I recommend starting from the official documentation for also other cmd-lets that are related:
Wrap-Up
In my personal opinion when it comes to provisioning the image of the system should contain everything that is essential. Everything else I like to add is on-demand with package managers (or configuration managers). Once the provisioning is completed, to be more flexible and mitigate risks I will also have frequent (automated) backups and exporting third-party drivers or configurations. Knowing that every workstation that I used share the same resources or state thanks to cloud services.
As usual, you can find this script on my Github repository.