?
Solved

Help with Active Directory module in PowerShell 2

Posted on 2011-05-12
13
Medium Priority
?
918 Views
Last Modified: 2012-05-11
I'm seeing really strange behavior with our 2008R2 DC.  If I try to launch the Active Directory Module in Windows PowerShell from the provided shortcut, I get an error message in the shell that reads, "Cannot locate default server with Active Directory Web Service running".

This is despite the fact that the service is, in fact running on that very same server.  The necessary features are installed, etc.  

If I type "import-module ActiveDirectory" into the shell, it loads the module and I can access the associated cmdlets.

Further, if the module is not loaded into a shell on the DC, I cannot load the module into PowerShell from any other location within the domain, either.  However, if the module is loaded on the DC, the module can then be loaded on (for example) my Win 7 workstation.

Any thoughts?

Many thanks --
0
Comment
Question by:SchreinerTech
  • 7
  • 6
13 Comments
 
LVL 8

Expert Comment

by:ActiveDirectoryman
ID: 35750974


Just add the import-module Active Directory to your powershell profile.
0
 
LVL 8

Expert Comment

by:ActiveDirectoryman
ID: 35751037


make sure you open up powershell and run it with administrator

make sure to set your execution policy as per the directions in the link below

create a powershell profile

ihttp://technet.microsoft.com/en-us/library/ff461033.aspx
0
 

Author Comment

by:SchreinerTech
ID: 35753962
It would appear that the AD drive is not being loaded.  The "provider" seems to be there but, it's not loading the drive on either the AD Domain Controller or the Win 7 box.

...thoughts?

Thanks for your help.

I did:
set the execution policy to unrestricted (for now)
run the shell/ISE as domain admin
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Expert Comment

by:ActiveDirectoryman
ID: 35754308




did you create a powershell profile?


better yet do you have the active directory module for windows powershell installed? If not, you can install it by downloading rsat tools for windows 7 and enabling it in programs and features.  You need to download the rsat tools for windows 7. you can search for rsat tools on google. Once you download the rsat tools then enable the active directory module for windows powershell.

1.  turn on/off windows features under programs and features

2.  Remote Server Administration Tools
3. select AD tools and then active directory module for windows powershell.
0
 

Author Comment

by:SchreinerTech
ID: 35754525
I did install and enable the rsat and associated features,respectively.

The module will load but, no AD PSDrive gets mapped.  

Again, thanks for helping me muddle through this.
0
 
LVL 8

Expert Comment

by:ActiveDirectoryman
ID: 35754931



ok. see if you can bring up the active directory module for windows powershell shortcut in administrative tools and right-click on it.  Look at properties for the shortcut.    There should be a shortcut tab.  under the shortcut tab in the target field you should have the following:  %windir%\system32\WindowsPowerShell\v1.0\powershell.exe -noexit -command import-module ActiveDirectory

0
 
LVL 8

Expert Comment

by:ActiveDirectoryman
ID: 35754975


oh and can you post a screnshoot  of the error you are getting for review thanks.
0
 

Author Comment

by:SchreinerTech
ID: 35756416
ok. see if you can bring up the active directory module for windows powershell shortcut in administrative tools and right-click on it.  Look at properties for the shortcut.    There should be a shortcut tab.  under the shortcut tab in the target field you should have the following:  %windir%\system32\WindowsPowerShell\v1.0\powershell.exe -noexit -command import-module ActiveDirectory


Copied and pasted from the properties window/shortcut tab of the Active Directory Module for Windows PowerShell shortcut:
%windir%\system32\WindowsPowerShell\v1.0\powershell.exe -noexit -command import-module ActiveDirectory

oh and can you post a screnshoot  of the error you are getting for review thanks.  

 SchreinerTech-459119.flv
0
 

Author Comment

by:SchreinerTech
ID: 35756427
Not sure how to directly embed a screenshot, yet.

Again, thanks for the help.
0
 
LVL 8

Expert Comment

by:ActiveDirectoryman
ID: 35756824

no problem.

I just noticed something from the screen shoot.   You have the regular powershell window open.  You should be using the Active directory module for windows powershell shortcut. I would try searching for it.  

For example:

It should look like this


powershell.jpg
0
 
LVL 8

Expert Comment

by:ActiveDirectoryman
ID: 35756852


go here and click on the active directory module for windows powershelll
powershell1.jpg
0
 

Accepted Solution

by:
SchreinerTech earned 0 total points
ID: 35757896
I've tried running in both the regular PS and the AD PS to the same end.

The problem is a configuration issue on our domain.  Specifically, the AD server is not advertising.  Thus, it cannot push the necessary drive.  We have the Net Admin on it and we'll hopefully get going soon.
0
 

Author Closing Comment

by:SchreinerTech
ID: 35868908
This was a problem on the Domain Controllers in the network domain.
0

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Group policies can be applied selectively to specific devices with the help of groups. Utilising this, it is possible to phase-in group policies, over a period of time, by randomly adding non-members user or computers at a set interval, to a group f…
Measuring Server's processing rate with a simple powershell command. The differences in processing rate also was recorded in different use-cases, when a server in free and busy states.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question