Visual Studio plus Powershell

A cheat sheet of all the cool things that knowing PowerShell can help with when dealing with Visual Studio's Package Console.

PowerShell
Get-Package -ProjectName {From Project} | Install-Package -ProjectName {Target Project} -IgnoreDependencies
Copy packages from one project to another.
PowerShell
Get-Package -ProjectName {From Project} | % { Install-Package -ProjectName {Target Project} -IgnoreDependencies -Version $_.Version.ToString() $_.Id }
Same as above, but if you care about versions.
PowerShell
("xunit","autofixture", "nsubstitute", "fluentassertions") | %{ Install-Package $_ -DependencyVersion Highest }
Batch install packages.
PowerShell
Get-Project -All | Install-Package Microsoft.Net.Compilers
Install package onto all projects.
PowerShell
Get-Package -Updates | ?{$_.Id -ne "refit"} | Update-Package
Filter package upgrades.