diff --git a/input/posts/package-console-powershell-cheat-sheet.md b/input/posts/package-console-powershell-cheat-sheet.md index 6d9af6d..68f8496 100644 --- a/input/posts/package-console-powershell-cheat-sheet.md +++ b/input/posts/package-console-powershell-cheat-sheet.md @@ -10,6 +10,11 @@ A cheat sheet of all the cool things that knowing PowerShell can help with when Get-Package -ProjectName {From Project} | Install-Package -ProjectName {Target Project} -IgnoreDependencies ``` +> Same as above, but if you care about versions +``` +Get-Package -ProjectName {From Project} | % { Install-Package -ProjectName {Target Project} -IgnoreDependencies -Version $_.Version.ToString() $_.Id } +``` + > Batch install packages ``` @@ -26,4 +31,4 @@ Get-Project -All | Install-Package Microsoft.Net.Compilers ``` Get-Package -Updates | ?{$_.Id -ne "refit"} | Update-Package -``` \ No newline at end of file +```