Solved

Do i need to add something extra in powershell code if AD tasks are involved ?

Posted on 2013-06-21
1
278 Views
Last Modified: 2013-06-21
Hello,
I have a code that involves AD tasks.
The code needs to be part of a schedule task

Do i need to add anything extra at the top of the code ?

Thanks,
0
Comment
Question by:namerg
1 Comment
 
LVL 7

Accepted Solution

by:
Matthew England earned 500 total points
ID: 39267116
Without knowing anything about the actual code being run, and version of powershell, it's hard to say what you need.

You can run Get-Command to see what Functions and Cmdlets are available on the system. If your code contains any which are not listed, then you likly need to add a an additional module.

Please review the following article. This goes over the pre-requisites for using the Active Directory Module for PowerShell.
Active Directory Administration with Windows PowerShell

If you're Active Directory environment meets the pre-requisites, then you can add the following to your code to load the AD Module.
PS> Import-Module ActiveDirectory

Open in new window

0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Utilizing an array to gracefully append to a list of EmailAddresses
A procedure for exporting installed hotfix details of remote computers using powershell
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now