尝试使用Powershell安装系统内部构件时出现警告

尝试使用Powershell安装系统内部构件时出现警告,powershell,nuget,chocolatey,Powershell,Nuget,Chocolatey,我正在尝试使用powershell安装sysinternals包,但却收到了大量警告。应该注意的是,我正在遵循一系列的说明,对这个主题还不太了解。以下是尝试运行install package命令时出现的警告: Install-Package sysinternals 至于我之前做过什么,我只安装了巧克力包提供商和更新的windows,但也许我做错了什么?以下是实现这一目标的步骤: Set-ExecutionPolicy RemoteSigned Install-PackageProvider

我正在尝试使用powershell安装sysinternals包,但却收到了大量警告。应该注意的是,我正在遵循一系列的说明,对这个主题还不太了解。以下是尝试运行install package命令时出现的警告:

Install-Package sysinternals
至于我之前做过什么,我只安装了巧克力包提供商和更新的windows,但也许我做错了什么?以下是实现这一目标的步骤:

Set-ExecutionPolicy RemoteSigned
Install-PackageProvider Chocolatey

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

非常感谢您的帮助。

尽管您可以使用Chocolate和NuGet,但PowerShell的软件包管理器是PowerShellGet(当然,它设计使用NuGet)。因此,Choco并不是真正需要的,然而,许多人仍然安装并将其用于其他来源

如果直接使用PowerShellGet,您将看到相同的错误

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
#>
Find模块-名称'SysInternals'-AllVersions |
表格格式-自动调整大小
查找包-名称“SysInternals”-所有版本
表格格式-自动调整大小
然而,如果你做一个通配符搜索

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   
#>
查找模块-名称'*Internals*'|
表格格式-自动调整大小
查找包-名称“*Internals*”|
表格格式-自动调整大小
因此,正如您所看到的,没有需要安装的名为SysInternals的模块/包

你要做的就是从这里下载zip文件,然后解包,像平常一样使用它

系统内部组件套件

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   
#>