I see a lot of reference to the command 'get-adcomputer' but I don't seem to be able to install it. One source that I looked at suggested that I use 'install-windowsfeature'. When I try to get help on that I get:
Get-Help : Get-Help could not find install-windowsfeature in a help file in this session. To download updated help
And I did to 'Update-help'. It was also suggested that I 'Import-Module ActiveDirectory'. When I do that I get:
Import-Module : The specified module 'ActiveDirectory' was not loaded because no valid module file was found in any
Finally just getting help on 'get-adcomputer' gives me:
get-help : Get-Help could not find get-adcomputer in a help file in this session. To download updated help topics
I am running PS v3 on a Windows Server 2008 SP2 x64. Ideas how I can get access to this command?
The ActiveDirectory module, which contains Get-ADComputer and the other AD-related commands, is installed on Windows Server 2008R2 and later domain controllers. It is also available as part of the Windows 7 and Windows 8 Remote Server Administration Toolkits (RSATs). It is not a Windows feature. It cannot be installed on Windows XP or Windows Vista, and to have it on a client computer you must install the RSAT. It is not intended to be run on server computers that are not domain controllers.
Update help is only capable of downloading help for locally installed modules. If you don't have the module, you can't have the help for it.
The module is capable of talking to any domain controller that runs Microsoft's Active Directory Management Gateway service. This service is pre-installed on all DCs 2008R2 and later, and can be downloaded and installed on 2003 and 2008 DCs.
If you have at least one computer in your environment with the module installed (as a 2008R2 or 2012 DC would have), and that computer has PowerShell Remoting enabled, then you can implicitly remote the module (using Import-Module on v3 or Import-PSSession on v2), allowing you to use it locally even though it is not installed locally. Again, Remoting has to be enabled and configured for this to work, and there are a few bugs in the implementation that may prevent some commands from working correctly through that model.
(a short summary: The ActiveDirectory module is a feature of the OPERATING SYSTEM, not a feature of a PowerShell version; 2008 does not include this feature and never will – it is a feature of newer versions of the OS).
You must be logged in to reply to this topic.