Solved

Win2k8 R2 Attribute Editor tab

Posted on 2014-07-22
2
203 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: 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!

Question has a verified solution.

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

Issue: One Windows 2008 R2 64bit server on the network unable to connect to a buffalo Device (Linkstation) with firmware version 1.56. There are a total of four servers on the network this being one of them. Troubleshooting Steps: Connect via h…
Determining the an SCCM package name from the Package ID
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…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

734 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