Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Exchange management shell parameter not found error

Posted on 2007-11-15
6
Medium Priority
?
2,379 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

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

Problems using Powershell and Active Directory?

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

Question has a verified solution.

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

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
The main intent of this article is to make you aware of ‘Exchange fail to mount’ error, its effects, causes, and solution.
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Suggested Courses

636 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