The term 'umod' is not recognized as the name of a cmdletSolved

I am trying to install umod for Valheim. First step is getting uMod to work which I can not. I Am running Windows 10 pro 20H2.

I have done this on a clean install of windows and I get the same error. UMod is not reconized. I restarted the PC and terminal.

This is what my terminal looks like:

PS C:\WINDOWS\system32> &powershell -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;&([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://umod.io/umod-develop.ps1')))"
  _   _ __  __  ___  ____
 | | | |  \/  |/ _ \|  _ \
 | | | | |\/| | | | | | | |
 | |_| | |  | | |_| | |_| |
  \___/|_|  |_|\___/|____/

Downloading dotnet-install...
Installing .NET 5.0...
dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Sdk/5.0.103/dotnet-sdk-5.0.103-win-x64.zip
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/5.0.103/dotnet-sdk-5.0.103-win-x64.zip
dotnet-install: Adding to current process PATH: "C:\Users\Matt\AppData\Local\Microsoft\dotnet\". Note: This change will not be visible if PowerShell was run as a child process.
dotnet-install: Note that the script does not resolve dependencies during installation.
dotnet-install: To check the list of dependencies, go to https://docs.microsoft.com/dotnet/core/install/windows#dependencies
dotnet-install: Installation finished
Installing uMod global tool...
Tool 'umod' was reinstalled with the latest stable version (version '1.2.306-develop').

uMod install complete! Please restart the terminal window to use the umod commands.

PS C:\WINDOWS\system32> umod
umod : The term 'umod' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ umod
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (umod:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Ive reinstalled twice for a sanity check and nothing. 

 

Update:

I tried to manually force the templates update with

dotnet new -i "uMod.Templates::*-*" --nuget-source https://www.myget.org/f/umod/api/v3/index.json


This is what happened

PS C:\WINDOWS\system32> dotnet new -i "uMod.Templates::*-*" --nuget-source https://www.myget.org/f/umod/api/v3/index.json
  Determining projects to restore...
C:\Users\Matt\.templateengine\dotnetcli\v5.0.103\scratch\restore.csproj : error NU1101: Unable to find package Microsoft.NETCore.App.Ref. No packages exist with this id in source(s): uMod
C:\Users\Matt\.templateengine\dotnetcli\v5.0.103\scratch\restore.csproj : error NU1101: Unable to find package Microsoft.WindowsDesktop.App.Ref. No packages exist with this id in source(s): uMod
C:\Users\Matt\.templateengine\dotnetcli\v5.0.103\scratch\restore.csproj : error NU1101: Unable to find package Microsoft.AspNetCore.App.Ref. No packages exist with this id in source(s): uMod
  Failed to restore C:\Users\Matt\.templateengine\dotnetcli\v5.0.103\scratch\restore.csproj (in 570 ms).

Templates                                         Short Name                       Language          Tags                  
--------------------------------------------      ---------------------------      ------------      ----------------------
uMod Plugin                                       umod-plugin                      [C#]              Common/Code           
Console Application                               console                          [C#], F#, VB      Common/Console        
Class library                                     classlib                         [C#], F#, VB      Common/Library        
WPF Application                                   wpf                              [C#], VB          Common/WPF            
WPF Class library                                 wpflib                           [C#], VB          Common/WPF            
WPF Custom Control Library                        wpfcustomcontrollib              [C#], VB          Common/WPF            
WPF User Control Library                          wpfusercontrollib                [C#], VB          Common/WPF            
Windows Forms App                                 winforms                         [C#], VB          Common/WinForms       
Windows Forms Control Library                     winformscontrollib               [C#], VB          Common/WinForms       
Windows Forms Class Library                       winformslib                      [C#], VB          Common/WinForms       
Worker Service                                    worker                           [C#], F#          Common/Worker/Web     
uMod Unity Linux Launcher                         umod-unity-linux-launcher        bash              Launcher              
uMod Unity Windows Launcher                       umod-unity-windows-launcher      batch             Launcher              
uMod Project                                      umod-project                     [C#]              Project               
Unit Test Project                                 mstest                           [C#], F#, VB      Test/MSTest           
uMod Test                                         umod-test                        [C#]              Test/MSTest/Code      
NUnit 3 Test Project                              nunit                            [C#], F#, VB      Test/NUnit            
NUnit 3 Test Item                                 nunit-test                       [C#], F#, VB      Test/NUnit            
xUnit Test Project                                xunit                            [C#], F#, VB      Test/xUnit            
Razor Component                                   razorcomponent                   [C#]              Web/ASP.NET           
Razor Page                                        page                             [C#]              Web/ASP.NET           
MVC ViewImports                                   viewimports                      [C#]              Web/ASP.NET           
MVC ViewStart                                     viewstart                        [C#]              Web/ASP.NET           
Blazor Server App                                 blazorserver                     [C#]              Web/Blazor            
Blazor WebAssembly App                            blazorwasm                       [C#]              Web/Blazor/WebAssembly
ASP.NET Core Empty                                web                              [C#], F#          Web/Empty             
ASP.NET Core Web App (Model-View-Controller)      mvc                              [C#], F#          Web/MVC               
ASP.NET Core Web App                              webapp                           [C#]              Web/MVC/Razor Pages   
ASP.NET Core with Angular                         angular                          [C#]              Web/MVC/SPA           
ASP.NET Core with React.js                        react                            [C#]              Web/MVC/SPA           
ASP.NET Core with React.js and Redux              reactredux                       [C#]              Web/MVC/SPA           
Razor Class Library                               razorclasslib                    [C#]              Web/Razor/Library     
ASP.NET Core Web API                              webapi                           [C#], F#          Web/WebAPI            
ASP.NET Core gRPC Service                         grpc                             [C#]              Web/gRPC              
dotnet gitignore file                             gitignore                                          Config                
global.json file                                  globaljson                                         Config                
NuGet Config                                      nugetconfig                                        Config                
Dotnet local tool manifest file                   tool-manifest                                      Config                
Web Config                                        webconfig                                          Config                
Solution File                                     sln                                                Solution              
Protocol Buffer File                              proto                                              Web/gRPC              

Examples:
    dotnet new mvc --auth Individual
    dotnet new worker 
    dotnet new --help
    dotnet new umod-plugin --help

Did you close an reopen the PowerShell window as the message mentioned?

Yea i even restarted my PC. Im not as good as you all with .NET framework but im thinking it has something to do with the templates not updating?

C:\Users\Matt\.templateengine\dotnetcli\v5.0.103\scratch\restore.csproj : error NU1101: Unable to find package Microsoft.NETCore.App.Ref. No packages exist with this id in source(s): uMod
C:\Users\Matt\.templateengine\dotnetcli\v5.0.103\scratch\restore.csproj : error NU1101: Unable to find package Microsoft.WindowsDesktop.App.Ref. No packages exist with this id in source(s): uMod
C:\Users\Matt\.templateengine\dotnetcli\v5.0.103\scratch\restore.csproj : error NU1101: Unable to find package Microsoft.AspNetCore.App.Ref. No packages exist with this id in source(s): uMod
  Failed to restore C:\Users\Matt\.templateengine\dotnetcli\v5.0.103\scratch\restore.csproj (in 570 ms).

That second error you're getting is due to a bug with "dotnet new" and is safe to ignore, also it will no longer happen with the most recent installers.

The "--nuget-source" and "--add-source" options are no longer required (the source of that bug).  I have updated the installer scripts and the installation guides to reflect this.

The latest installers will add the nuget source globally, like so..

dotnet nuget add source https://www.myget.org/f/umod/api/v3/index.json --name uMod

Regarding the "umod" cmdlet not being available, I would double check your PATH environment variable to ensure it points to the right place.  The dotnet installer (provided by Microsoft) is supposed to do this, and we attempt to do it again if it fails, but sometimes they both fail..

PATH should have:
"%USERPROFILE%\.dotnet\tools"

Which roughly translates to..
"C:\Users\Calytic\.dotnet\tools"

https://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them

Thanks! I'm sure that should fix it I just didn't know how. I'll give it a shot when I'm home in a couple hours 

Merged post

It worked Thanks! 

For anyone who searched and found this. 

1. Open run

2. Type sysdm.cpl

3. Go to advanced

4. Click Environment Variables

5. Double click "path" under system variables 

5. Click new

6. Make the path "C:\Users\*account name*\.dotnet\tools"

Locked automatically