Register
: :
Login
Home
News
Forums
Scripts
User Groups
Resources
About
Forums
Search
Members
Unanswered
Active Topics
Forums
>
Using PowerShell
>
Active Directory
Seach by e-mail address across 2 domains...
Last Post 11 Aug 2010 06:51 AM by
Mihail Stacanov
. 1 Replies.
Sort:
Oldest First
Most Recent First
Prev
Next
You are not authorized to post a reply.
Author
Messages
Fred Buecker
New Member
Posts:1
27 Jul 2010 05:08 AM
I am very new to Powershell and am trying to step up my scripting past batch files... My need is to read a CSV file with a list of e-mail addresses and employee ID's that is outputted from our HR system. I then need to search our primary domain for the e-mail and, if found, update the EmployeeID field of AD. If the e-mail is not found in the primary domain I need to search our sub-domain for the address and update the AD account if it is located there. Both domains are children... primary.company.com and branch.company.com I actually have this "almost" working via batch file, but I am failing on my error handling from my DSQUERY command so I therefore fail to get it to jump domains. I figure this is a perfect way to start using PS and get away from .bat's Thank you for any assistance! (I have installed the Quest AD pack if that will help make any of this easier)
Mihail Stacanov
New Member
Posts:15
11 Aug 2010 06:51 AM
#Just one string if you have Quest AD CmdLets
Import-Csv d:\email.csv | foreach {Set-QADUser $_.logonname -Email $_.email -WhatIf}
http://proproit.com
You are not authorized to post a reply.
Using PowerShell
--General PowerShell
--Books, Tools, and Videos
--Exchange Server
--Active Directory
--System Center Family
--Non-Microsoft Products
--SharePoint
--SQL Server
--Working with .NET
--Peer Review
--Testing, Testing...
PowerShell Development
--Cmdlet Development
--PSDrive Provider Development
--Hosting the Shell
Looking Ahead
--Using PowerShell v2.0
--Developing for PowerShell v2.0
PowerShellCommunity.org
--Community Announcements and Assistance
--Completely Unrelated
--User Groups
--Community Business
----Suggestion Box
Forums
>
Using PowerShell
>
Active Directory
Active Forums 4.3
Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2