【发布时间】:2021-08-19 17:40:51
【问题描述】:
在没有 RSAT 的服务器中安装 Active Directory
我可以在某些服务器上安装 Active Directory 模块,但不能 在其他人......
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Install-Module -AllowClobber -SkipPublisherCheck .\Microsoft.ActiveDirectory.Management.dll -ErrorAction Continue -Force
Install-Module -AllowClobber -SkipPublisherCheck .\Microsoft.ActiveDirectory.Management.resources.dll -ErrorAction Continue -Force
我不断收到此错误:
PackageManagement\Install-Package : No match was found for the specified
search criteria and module name
'D:\install\ADPoSh\Microsoft.ActiveDirectory.Management.resources.dll'. Try
Get-PSRepository to see all available registered module repositories.
At C:\Program
Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1772
char:21
+ ... $null = PackageManagement\Install-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Microsoft.Power....InstallPacka
ge:InstallPackage) [Install-Package], Exception
+ FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.Pac
kageManagement.Cmdlets.InstallPackage
我只是将 DLL 从具有 RSAT AD 模块和 C:\Windows\System32\WindowsPowerShell\v1.0\Modules\ActiveDirectory 的系统上的 WinSXS 文件夹复制到同一个文件夹中。 我在这里错过了什么?
【问题讨论】:
-
在无法安装的机器上,您从
Get-PSRepository得到什么回复?您最好排除故障,尝试复制文件以使其正常工作 -
@Sceptalist 警告:无法找到模块存储库。
标签: powershell active-directory powershellget