Solved

Win2k8 R2 Attribute Editor tab

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

A Bare Metal Image backup allows for the restore of an entire system to a similar or dissimilar hardware. They are highly useful for migrations and disaster recovery. Bare Metal Image backups support Full and Incremental backups. Differential backup…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

770 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