Search code examples
powershellnugetchocolatey

Warnings When Attempting to Install Sysinternals With Powershell


I am trying to install the sysinternals package with powershell, but is instead greeted with tons of warnings. It should be noted that I am following a set of instructions and don't know a lot about this subject yet. Here are the warnings when attempting to run the install-package command:

Install-Package sysinternals
WARNING: NuGet: System.InvalidOperationException: Unable to find version '1.3.5.1' of package 'chocolatey-core.extension'.
WARNING: NuGet:    at NuGet.PackageRepositoryHelper.ResolvePackage(IPackageRepository sourceRepository, IPackageRepository
localRepository, IPackageConstraintProvider constraintProvider, String packageId, SemanticVersion version, Boolean
allowPrereleaseVersions)
WARNING: NuGet:    at NuGet.PackageManager.InstallPackage(String packageId, SemanticVersion version, Boolean ignoreDependencies,
Boolean allowPrereleaseVersions)
WARNING: NuGet:    at NuGet.Commands.InstallCommand.InstallPackage(IFileSystem fileSystem, String packageId, SemanticVersion version)
WARNING: NuGet:    at NuGet.Program.Main(String[] args)
WARNING: NuGet: System.InvalidOperationException: Unable to find version '2019.12.19' of package 'sysinternals'.

As for what I've done before this, I've only installed the Chocolatey package provider and updated windows, but maybe I did something wrong? Here are the steps leading up to this:

Set-ExecutionPolicy RemoteSigned
Install-PackageProvider Chocolatey

Install-Module -Name PSWindowsUpdate
Get-WUInstall -Verbose
Get-WUInstall -Install

Any help is much appreciated.


Solution

  • Though you can use Chocolatey and NuGet, PowerShell's package manager is PowerShellGet (well, that uses NuGet by design). So, Choco is not really needed, yet, many still install and use it for the other sources.

    If you use PowerShellGet directly, you'll see the same errors.

    Find-Module -Name 'SysInternals' -AllVersions | 
    Format-Table -AutoSize
    <#
    # Results
    PackageManagement\Find-Package : No match was found for the specified search criteria and module name 'SysInternals'. Try Get-PSRepository to see all available registered module 
    repositories.
    At C:\Users\Daniel\Documents\WindowsPowerShell\Modules\PowerShellGet\2.2.3\PSModule.psm1:8873 char:9
    +         PackageManagement\Find-Package @PSBoundParameters | Microsoft ...
    +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Microsoft.Power...ets.FindPackage:FindPackage) [Find-Package], Exception
        + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.FindPackage
    
    #>
    
    Find-Package -Name 'SysInternals' -AllVersions | 
    Format-Table -AutoSize
    <#
    # Results
    
    Find-Package : No match was found for the specified search criteria and package name 'SysInternals'. Try Get-PackageSource to see all available registered package sources.
    At line:1 char:1
    + Find-Package -Name 'SysInternals' -AllVersions |
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Microsoft.Power...ets.FindPackage:FindPackage) [Find-Package], Exception
        + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.FindPackage
    #>
    

    Yet, if you do a wildcard search...

    Find-Module -Name '*Internals*' |
    Format-Table -AutoSize
    <#
    # Results
    
    Version Name          Repository Description                                                                                                                                               
    ------- ----          ---------- -----------                                                                                                                                               
    1.0.34  PoshInternals PSGallery  Collection of system internals tools for PowerShell.                                                                                                      
    4.3     DSInternals   PSGallery  The DSInternals PowerShell Module exposes several internal features of Active Directory and Azure Active Directory. These include FIDO2 and NGC key aud...
    0.2.8   AADInternals  PSGallery  The AADInternals PowerShell Module utilises several internal features of Azure Active Directory, Office 365, and related admin tools. DISCLAIMER: Funct...
    0.1     LCMInternals  PSGallery  Demo scripts explaining the internals of LCM  
    #>
    
    Find-Package -Name '*Internals*' | 
    Format-Table -AutoSize
    <#
    # Results
    
    Name                                    Version Source    Summary                                                                                                                          
    ----                                    ------- ------    -------                                                                                                                          
    PoshInternals                           1.0.34  PSGallery Collection of system internals tools for PowerShell.                                                                             
    DSInternals                             4.3     PSGallery The DSInternals PowerShell Module exposes several internal features of Active Directory and Azure Active Directory. These incl...
    AADInternals                            0.2.8   PSGallery The AADInternals PowerShell Module utilises several internal features of Azure Active Directory, Office 365, and related admin...
    LCMInternals                            0.1     PSGallery Demo scripts explaining the internals of LCM                                                                                     
    SilverlightToolkit-Internals-Unofficial 1.0.0   nuget.org The missing part of Microsoft Silverlight Toolkit. The internals DLL. 'System.Windows.Controls.Toolkit.Internals'                
    AppInternals.Agent.Cloud.Support        10.10.0 nuget.org Configure an Azure Cloud Service solution for AppInternals application performance monitoring.                                   
    InternalsVisibleTo.MSBuild              1.0.3   nuget.org Enables declaring 'InternalsVisibleTo' items in a .NET project file, rather than declaring them to an AssemblyInfo.cs file.      
    Akrual.DDD.Utils.Internals              1.0.8   nuget.org Useful Classes yo use everywhere                                                                                                 
    Meziantou.MSBuild.InternalsVisibleTo    1.0.1   nuget.org Allow to declare 'InternalsVisibleTo' in the csproj file, rather than declaring them to an AssemblyInfo.cs file.                 
    microServiceBus.InternalService         1.0.0   nuget.org This package creates a stub from which you can create an Internal Service for microServiceBus.com   
    #>
    

    So, as you can see, there is no such module/package called SysInternals to install.

    What you do is just download the zip file from here and unpack and use it as normal.

    Sysinternals Suite https://learn.microsoft.com/en-us/sysinternals/downloads/sysinternals-suite