windows server 2008 enterprise, without hyper-v x64
We have a client server that I am trying to automate some functions on using power shell directly on the server. I have the gateway service installed, and can manage via RSAT from a client machine, but I want to have the cmdlets on the server itself so I may schedule the task to run locally.
Is there any way to actually get the AD powershell tools installed on the server, or will this HAVE to be done from a client machine?
If so, are there any viable reasons to not do this? If not, why is it not possible? (just because it is not supported, or is there a technical barrier I do not understand that prevents it?)
You probably want to install the following on your 2008 box:
.NET Framework 4.0 (Download)
Windows Management Framework 3.0 (Download)
You just can't use the AD cmdlets on systems older than Windows 7 or Windows Server 2008 R2; they are not available.
You can try Quest's (free) set of AD PowerShell cmdlets; they have been quite popular for a while, before Microsoft implemented its own solution.
As others have said, the native AD cmdlets module is not available on Windows Server 2008 (non-R2). What I have done in a similar situation is to import a PS session from a domain controller where the AD module is installed, and then use that. For example:
Then on the machine where I want to run the AD cmdlets but don't have them installed, I just load the function defined above and run:
This will give you a virtual copy of the AD cmdlets that you can run locally. You can do
Get-Help Import-PSSession -Full
for more information on how this works.I don't know if this method would work remoting into a Windows 7 client machine with the AD cmdlets installed -- I think there might be two-hop issues when actually connecting to a domain controller in that case. I hope this helps.