Nuget - update all packages starting with something specific using command line

Working with Nuget and having a lot of internal packages at a previous job, updating all packages was always a pain. Often you can just update all packages within a feed using the Nuget UI, but if they are spread across different feeds even this will take some time. An old colleague of mine introduced me to the following command - which can be run in the Nuget Package Manager Console:

get-project -all | get-package | ?{ $_.Id -like 'MyPackagePrefix*' } | update-package

It updates all packages starting with something specific. It runs a little slow if there are many projects and packages - which means it is a good idea to grab a cup of coffee after starting it :)

This is also perfect for updating all packages from an internal feed or a feed used on your team only (if the packages are prefixed). I hope you will find this helpful!