Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
PowerShell script for installing/updating my dotnet CLI global tools
# Tool lists:
$tools = @(
foreach($tool in $tools) {
# Install if it doesn't exist
&dotnet tool install -g $tool
if($LastExitCode -eq 0) {
# Upgrade if it was already installed
&dotnet tool update -g $tool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.