Solved

Win2k8 R2 Attribute Editor tab

Posted on 2014-07-22
2
192 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
Comment Utility
$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
Comment Utility
Iwas able to figure this one out thanks.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

772 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

10 Experts available now in Live!

Get 1:1 Help Now