Reputation: 171
I am able to install Active Directory module in some servers but not in others....
[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
I simply copied the DLLs from the WinSXS folder on a system that has the RSAT AD Module and the C:\Windows\System32\WindowsPowerShell\v1.0\Modules\ActiveDirectory, all into the same folder. What am I missing here?
Upvotes: 0
Views: 2952
Reputation: 171
Wow, the answer was as simple as not using Install-Module, after the RSAT Feature install and merely running Import-Module instead! :)
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
I mean, I would like to fix the repo, but, hey, AD Module works now so... yeah!
Upvotes: 1