[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

get-mailbox attributes

Posted on 2013-01-17
4
Medium Priority
?
2,243 Views
Last Modified: 2013-01-17
Hi,

This script works - but the data from the attribute "EmployeeType" are not included in the file.csv anyone knows why?

get-mailbox -ResultSize Unlimited -organizationalunit "OU=myoy,DC=mydc,DC=com" | Get-User | Select-Object sAMAccountName,FirstName,LastName,WindowsEmailAddress,Department,company,employeeType | Export-Csv "C:\file.csv" -Encoding "Unicode"

Regards Carsten
0
Comment
Question by:pacch
[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
  • 2
4 Comments
 
LVL 40

Expert Comment

by:Subsun
ID: 38787932
Get-User doesn't include the employeeType attribute. You may use Get-QadUser (Quest AD cmdlets) or If you have  Windows 2008 then use Get-ADUser.
0
 

Author Comment

by:pacch
ID: 38788369
Thanks for the reply

Tried changing to get-aduser in the script running ADpowershell it wil not recognize get-aduser as a cmdlet- is the syntax differenet then with get-user

get-aduser -ResultSize Unlimited -organizationalunit "OU=myoy,DC=mydc,DC=com" | Get-User | Select-Object sAMAccountName,FirstName,LastName,WindowsEmailAddress,Department,company,employeeType | Export-Csv "C:\file.csv" -Encoding "Unicode"

Regards
0
 
LVL 40

Accepted Solution

by:
Subsun earned 2000 total points
ID: 38788428
Try..
Import-Module Activedirectory
Get-ADUser -Filter * -SearchBase "OU=myoy,DC=mydc,DC=com" -Properties * | 
Select-Object sAMAccountName,FirstName,LastName,WindowsEmailAddress,Department,company,employeeType | 
Export-Csv "C:\file.csv" -Encoding "Unicode"

Open in new window

0
 

Author Closing Comment

by:pacch
ID: 38789919
Changed Firstname to givenname, lastname to sn
Worked perfect :-) thanks
0

Featured Post

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Previously, on our Nano Server Deployment series, we've created a new nano server image and deployed it on a physical server in part 2. Now we will go through configuration.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

650 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