Published on
Takes approximately 1 minute to read
Post HistoryPackage Console Powershell Cheat Sheet
This post was archived on .
The content may be old and no longer accurate.

A cheat sheet of all the cool things that knowing PowerShell can help with when dealing with Visual Studio's Package Console.
PowerShell
Skipcode block
Get-Package -ProjectName {From Project} | Install-Package -ProjectName {Target Project} -IgnoreDependencies Copy packages from one project to another.
PowerShell
Skipcode block
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
Skipcode block
("xunit","autofixture", "nsubstitute", "fluentassertions") | %{ Install-Package $_ -DependencyVersion Highest } Batch install packages.
PowerShell
Skipcode block
Get-Project -All | Install-Package Microsoft.Net.Compilers Install package onto all projects.
PowerShell
Skipcode block
Get-Package -Updates | ?{$_.Id -ne "refit"} | Update-Package Filter package upgrades.