0

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?)

8
  • 1
    I really am not sure what you are asking here... You mention hyper-v, but what does hyper-v have to do with anything? What do you mean by 'we have a client server'. Is it really 2008, or is it 2008r2? Is the remote setup as core, or what? Is that 2008 server a domain controller within the domain, or just a member server? Commented Sep 17, 2014 at 18:06
  • just stating the version as listed in the system properties. As for "client server" = "server belonging to a client" (sorry that was a bit ambiguous) The server is the only DC, it services a factory floor where all of the clients are machines, not humans. We are trying to automate some of the tasks on the AD so it can exist with minimal oversight, however the only machine I can guarantee to always be on is the server itself. I have no control over upgrading the server or replacing it. End game is to schedule .ps scripts using Get-AD**** cmdlets locally on the 2008 DC machine. Commented Sep 17, 2014 at 18:18
  • I don't have a 'Server 2008' can you see if the AD powershell feature is available? Here is my screen from a 2008r2 box. i.sstatic.net/SuGbx.png Commented Sep 17, 2014 at 18:25
  • 1
    Well I suspect that it is time for you to strongly think about upgrading your server... Commented Sep 17, 2014 at 18:37
  • 1
    well hence my comment "I have no control over upgrading the server or replacing it." it belongs to a client, and the call to replace it is not mine. I just need to work with it for this job... Commented Sep 17, 2014 at 18:40

3 Answers 3

0

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:

function Get-ActiveDirectorySession { param( [string]$Server = '2008R2.domain.controller' ) $session = New-PSSession -ComputerName $Server Invoke-Command -Session $session -ScriptBlock {Import-Module ActiveDirectory} return $session } 

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:

Import-PSSession -Session (Get-ActiveDirectorySession) -Module ActiveDirectory | Out-Null 

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.

1
  • Just wanted to say thank you for that excellent suggestion. I had a nasty reaction to a be sting and have been down for a while, but this is in my cheat sheet repository for sure now. Commented Oct 3, 2014 at 18:42
1

You probably want to install the following on your 2008 box:

.NET Framework 4.0 (Download)

Windows Management Framework 3.0 (Download)

2
  • These are already both installed, this puts me up to powershell 3 according to $PSVersionTable, but does not include the AD cmdlets. Commented Sep 17, 2014 at 19:23
  • 3
    Unfortunately the Active Directory module for Windows PowerShell is only available on Windows 7 (as part of RSAT) and Windows Server 2008 R2. The Active Directory Management Gateway Service is a web-service for down-level operatings ystem which the Active Directory module for PowerShell can communicate with. Commented Sep 17, 2014 at 20:22
1

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.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.