Solved

Win2k8 R2 Attribute Editor tab

Posted on 2014-07-22
2
202 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
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…
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…

821 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