【问题标题】:Install Active Directory without needing RSAT无需 RSAT 即可安装 Active Directory
【发布时间】: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


【解决方案1】:

导入模块,而不是安装模块

哇,答案很简单,不使用 Install-Module,在 RSAT 功能安装之后,只运行 Import-Module! :)

所以不是这个:

Get-WindowsFeature -Name RSAT-AD-PowerShell|Install-Windowsfeature
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Install-Module ActiveDirectory -Proxy proxy.verizon.com:80

但是这个:

Get-WindowsFeature -Name RSAT-AD-PowerShell|Install-Windowsfeature
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Import-Module ActiveDirectory -Proxy proxy.verizon.com:80

我的意思是,我想修复 repo,但是,嘿,AD 模块现在可以工作了……是的!

【讨论】:

猜你喜欢
  • 2012-06-12
  • 1970-01-01
  • 2013-02-03
  • 2017-01-31
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-06-12
  • 2011-10-31
相关资源
最近更新 更多