Never mind, I see it is...

: )

Regards,

Don Guyer
Catholic Health East - Information Technology
Enterprise Directory & Messaging Services
3805 West Chester Pike, Suite 100, Newtown Square, Pa  19073
email: [email protected]<mailto:[email protected]>
Office:  610.550.3595 | Cell: 610.955.6528 | Fax: 610.271.9440
For immediate assistance, please open a Service Desk ticket or call the 
helpdesk @ 610-492-3839.
[cid:[email protected]]

From: Guyer, Don
Sent: Tuesday, April 16, 2013 3:39 PM
To: NT System Admin Issues
Subject: RE: PowerShell noob help

What is "Employeenumber", a custom attribute in AD?

Regards,

Don Guyer
Catholic Health East - Information Technology
Enterprise Directory & Messaging Services
3805 West Chester Pike, Suite 100, Newtown Square, Pa  19073
email: [email protected]<mailto:[email protected]>
Office:  610.550.3595 | Cell: 610.955.6528 | Fax: 610.271.9440
For immediate assistance, please open a Service Desk ticket or call the 
helpdesk @ 610-492-3839.
[cid:[email protected]]

From: Candee [mailto:[email protected]]
Sent: Tuesday, April 16, 2013 3:26 PM
To: NT System Admin Issues
Subject: Re: PowerShell noob help

So... now that you mention it. ;)
I'm knee deep in the first real-world task of creating a powershell script.
I will be happy to accept a nudge in the right direction (or a cluex4, if I'm 
missing the obvious)

The script imports user data from a csv; and uses that data to create their 
username and email address. Then it checks if the username / email is in use; 
gives an error if it does, creates the user or mailbox if it doesn't.
It also updates attributes, one being the employee number.
I need to export the newly created usernames, emails, and the employee number.
I've created an array that adds each new user, and then is exported to a csv.
Everything works, except the "employeenumber", which is what HR is using as the 
primary key.

 The array is
$createdusers +@()
and then:
              $createdusers += $Newuser
              $createdusers|select displayname,name,email,employeenumber 
|export-csv "C:\temp\scripts\tryagain.csv"

Any ideas to get the employeenumber to export?
The other thing is this pulls the email, even if the user doesn't get a mailbox.
Thanks all.
Candee

On Tue, Apr 16, 2013 at 2:11 PM, Ben Scott 
<[email protected]<mailto:[email protected]>> wrote:
On Tue, Apr 16, 2013 at 12:57 PM, James Rankin 
<[email protected]<mailto:[email protected]>> wrote:
> Ben, you're a wizard, that worked first time out :-)
  I am but a humble student.  Indeed, I'm getting my feet wet with
PoSh for "real use" for the first time these past few weeks.  Part of
the reason I did this was to learn how to do it.  I had to learn
Select-String last week, but didn't know how to retrieve captured
groups yet, nor how to write to the registry.  So we both learned some
things!

  It helps that I had the web at my end of the thread.  :-)

-- Ben

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
[email protected]<mailto:[email protected]>
with the body: unsubscribe ntsysadmin


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
[email protected]<mailto:[email protected]>
with the body: unsubscribe ntsysadmin

Confidentiality Notice:
This e-mail, including any attachments is the
property of Catholic Health East and is intended
for the sole use of the intended recipient(s). 
It may contain information that is privileged and
confidential.  Any unauthorized review, use,
disclosure, or distribution is prohibited. If you are
not the intended recipient, please delete this message, and
reply to the sender regarding the error in a separate email.
 

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to [email protected]
with the body: unsubscribe ntsysadmin

<<inline: image001.jpg>>

Reply via email to