I have a windows server 2003 domain controller and a 2008 r2 dfs server. I am trying to run a script to update a computers description in AD.So far I have
$Session = New-PSSession -Computername Server01 -Credential $Cred
Invoke-Command -Session $Session -Scriptblock {
$env:adps_loaddefaultdrive = 0
Import-Module Active Directory
Get-ADuser -Filter *
}
I get the message Unable to connect to the server.This may be because the server does not exist, it is currently down or it does not have AD web services running. I have checked and the web service is running. Server01 is the DFS server which has the ad module installed. I have not managed to get the module installed on the server 2003 DC. Do I need to connect to a domain controller to do this? I can run the commands on server01 and get the perfect results. I thought if I can run them there, they should run remotely?