Solved

Exchange management shell parameter not found error

Posted on 2007-11-15
6
2,299 Views
Last Modified: 2008-02-21
I have been trying to bulk load users into Exchange 2007.
Environment is a single 2003 server and a single exchange 2007 domain member server.

In the shell command I can run the following

get-user                     - correctly returns all users with and without mailboxs
get-user -organizationalunit users   - correctly returns all users
BUT
get-user - organizationalunit users where-object{$_.RecipientType -eq "User"}
gives error message
A parameter cannot be found that matches parameter name $_.RecipientType -eq "User"

I have been following instructs from exchangepedia.com/blog/2006/12/id-written-about-how-to-bulk-create.html

Any pointers greatfully appreciated. I have also noticed that one of the services I would expect to see is not present in the services list - microsoft exchange management

Thanks

Willy
0
Comment
Question by:wsmyth
[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
  • 4
  • 2
6 Comments
 
LVL 22

Expert Comment

by:ATIG
ID: 20290818
what is your over all goal...... if you already doing a get user why add the where-object?

also you can read in from a csv file if you have one.......

you want to read user from an  OU and do what?
0
 

Author Comment

by:wsmyth
ID: 20290904
The overall goal is to bulk add the non-mailbox enabled users.
I only posted the first part of the command as this was the part generating the message. The full command
get-user –organizationalUnit users | where-object{$_.RecipientType –eq “User”  Enable-Mailbox –Database “MAILSRV1\Mailbox Database” get-mailbox select name,windowsemailaddress,database

I appreciate there may be other ways of obtaining the same result ie load from CSV but I am concerned that the fact the $_.RecipientType parameter cannot be found is a pointer to something more fundamental being wrong
0
 
LVL 22

Expert Comment

by:ATIG
ID: 20291201
use a CSV file to create users.  This command can be used in the same function to create users on one database or distribute them across databases.  An example of the CSV is below the command.  There is two parts to this command.  The first line sets the password for all creations.

$Password=Read-Host "Enter Password" -AsSecureString

Import-Csv csvtest.csv | foreach { New-Mailbox –alias $_.Alias –name $_.Name –UserPrincipalName $_.UPN  â€“Database “ent-labexmb01\mailbox database” –OrganizationalUnit "XXXX" –Password $Password –ResetPasswordOnNextLogon:$true }

This would create them all on one database but with the addition of $.Database after the –database and an additional column in the CSV file you can distribute them.  The CSV file would look like this

Alias,Name,UPN
User1,User 1,user1@dell.com
User2,User 2,user2@dell.com
0
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 

Author Comment

by:wsmyth
ID: 20492708
Try installing sp1
0
 

Author Comment

by:wsmyth
ID: 20657439
I have installed SP1 and resolved the error myself.
Thanks
0
 

Accepted Solution

by:
wsmyth earned 0 total points
ID: 20821903
As  previously posted I installed SP1 and resolved the issue myself. Can this now be closed?
Thanks
0

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Question has a verified solution.

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

This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
This video discusses moving either the default database or any database to a new volume.

733 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