Hi,
I'm a newbie at Powershell scriptiong and I'm trying to Implicit Remote to the a Windows 2008 sp2 (R1) DC from a Windows 7 workstation to run AD commands. My goal is to script user creation in the AD.
Here's the configuration:
Domain controller:
Windows 2008 Sp2 (not R2)
- Has Active Directory Web Services installed and Running.
- Has Windows Remote Management (WS-Management) installed and running.
- Has Powershell 2.0 installed
- Has Hotfix for .NET Framework 3.5 SP1 (kb 969166 and KB958484) installed
- winrm quickconfig was executed and running.
C:\Windows\system32>winrm quickconfig
WinRM already is set up to receive requests on this machine.
WinRM already is set up for remote management on this machine.
Workstation:
windows 7
- Has Windows Remote Management (WS-Management) installed and running.
- Has Powershell 2.0 installed
- Has the Active Directory Module installed and enabled in features.
- Has the AD DS Tools installed and enabled in features.
- Has the AD LDS Snap-ins and Command-line Tools installed and enabled in features.
On the Windows 7 workstation, I run the following from powershell:
PS C:\Windows\system32> $sconnect = new-pssession -computername dc1 -credential dev\admin
PS C:\Windows\system32> import-module ActiveDirectory
PS C:\Windows\system32> get-module
ModuleType Name ExportedCommands
---------- ---- ----------------
Manifest ActiveDirectory {Set-ADOrganizationalUnit, Get-ADDomainControllerPasswordReplicationPoli...
PS C:\Windows\system32> get-aduser -filter *
Get-ADUser : Unable to find a default server with Active Directory Web Services running.
At line:1 char:11
+ get-aduser <<<< -filter *
+ CategoryInfo : ResourceUnavailable: (:) [Get-ADUser], ADServerDownException
+ FullyQualifiedErrorId : Unable to find a default server with Active Directory Web Services running.,Microsoft.ActiveDirectory.Management.Commands.GetADUser
PS C:\Windows\system32> get-pssession
Id Name ComputerName State ConfigurationName Availability
-- ---- ------------ ----- ----------------- ------------
1 Session1 dc1 Opened Microsoft.PowerShell Available
I've already confirmed that the ADWS service is running on the DC and is not crashing.
Would anyone be able to tell me what I'm doing wrong? I would like some direction on what should be ran from the Workstation and what should be run from the DC.
Any help would be greatly appreciated.