Solved

Win2k8 R2 Attribute Editor tab

Posted on 2014-07-22
2
199 Views
Last Modified: 2014-07-24
I'm running a powershell script and I have a part of my script that  looks at the "employeeID" field before checking on the rest of the user's info. The issue is, I went to each one of the  test users in ADUC and set the "EmployeeID" attribute using the "Attribute Editor" tab hoping that the script would pick it up, that does not seem to  be happening, therefore I end up with the following errors:

There was a problem retrieving user
Get-ADUser : Variable: 'EmpID' found in expression: $EmpID is not defined.
At C:\scripts\Merge_Script.ps1:217 char:33
+             $ADUser = Get-ADUser <<<<  -Filter {(employeeID -eq $EmpID) -and (ObjectClass -eq "user") } -Properties e
mployeeID,givenName,sn,title,department,streetAddress,postOfficeBox,l,st,postalCode,telephoneNumber
    + CategoryInfo          : InvalidArgument: (:) [Get-ADUser], ArgumentException
    + FullyQualifiedErrorId : Variable: 'EmpID' found in expression: $EmpID is not defined.,Microsoft.ActiveDirectory.
   Management.Commands.GetADUser
0
Comment
Question by:SydNal2009
2 Comments
 
LVL 14

Accepted Solution

by:
Justin Yeung earned 500 total points
ID: 40211996
$EmpID is not defined in your script.

do you mind to post the entire script to see where the error is.
0
 

Author Comment

by:SydNal2009
ID: 40218092
Iwas able to figure this one out thanks.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
Know what services you can and cannot, should and should not combine on your server.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

912 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

18 Experts available now in Live!

Get 1:1 Help Now