Solved

list of users that we on Exchange online in a excel format

Posted on 2011-09-15
8
653 Views
Last Modified: 2012-05-12
1.      Save below script to note pad document as a .ps1 file.
2.      Save to desktop.
3.      Run PowerShell migration tool.
4.             Then go to start
5.             All Programs
6.             Microsoft Online Services  
7.             Migration
8.             Migration command shell
 
$owaserver = "red002.mail.microsoftonline.com"
$AdminCredential = get-Credential
$colUsers = get-msonlineuser -Credential $AdminCredential -Enabled `
| Select-Object @{name='DisplayName';Expression={$_.displayname}}, `
@{name='Identity';Expression={$_.identity}}, `
@{name='IsActive';Expression={$_.isactive}}, `
@{name='PasswordExpirationDate';Expression={$_.passwordexpirationdate}},`
@{name='LastSignedInDate';Expression={$_.lastsignedindate}},`
@{name='CreatedDate';Expression={$_.createddate}},`
@{name='FirstName';Expression={$_.FirstName}}, `
@{name='Lastname';Expression={$_.LastName}}
$colusers | Export-Csv "-$((Get-Date -uformat %Y%m%d%H%M%S).ToString()).csv" -NoTypeInformation

The script is only exporting 252 users out of 320 users, Attched screen shot of the warning. This is been run in the migration console for Microsoft's BPOS.
What needs to be change on the script above to allow all 320 users to be pulled.

 Powershell warning
0
Comment
Question by:Rickdangerousire
8 Comments
 
LVL 9

Assisted Solution

by:Benjamin MOREAU
Benjamin MOREAU earned 125 total points
ID: 36545347
Try to add :

Get-MSOnlineUser -ResultSize 9999 ...
0
 
LVL 16

Expert Comment

by:Dale Harris
ID: 36545376
Can't you use "0" as a universal "unlimited feature"?  I don't know because I haven't tried it, but that's how you can specify it in other commands.

DH
0
 

Author Comment

by:Rickdangerousire
ID: 36545420
script was ran after this was added, came back with errors

$colUsers = Get-MSOnlineuser -Credential $AdminCredential -resultsize 999999 -Enabled `
0
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
LVL 49

Assisted Solution

by:Akhater
Akhater earned 125 total points
ID: 36546144
please run the below alone does it return the same warning ?

 $colUsers = get-msonlineuser -Credential $AdminCredential -Enabled -ResultSize unlimited

0
 
LVL 16

Accepted Solution

by:
Dale Harris earned 125 total points
ID: 36546174
according to a microsoft page, it's supposed to be <Int32>.

This would tell me ResultSize cannot be a string.  Int32 maximum value in case you're wondering: 2,147,483,647

I think your ` at the end might be causing you some issues.

If you're troubleshooting this one command and waiting for us to help, it might be beneficial to try to troubleshoot your command one step at a time.

So I would do something like this:

Get-MSOnlineUser

What does that return?

Then

Get-MSOnlineuser -Credential $AdminCredential

Then

Get-MSOnlineuser -Credential $AdminCredential -Enabled

Then

Get-MSOnlineuser -Credential $AdminCredential -Enabled -resultsize 999999

HTH,

Dale Harris
0
 
LVL 9

Assisted Solution

by:chrismerritt
chrismerritt earned 125 total points
ID: 36546416
Not used MSOnline, but in regular Exchange powershell this error shows up if you don't include a switch for -ResultSize.

What happens if you enter this?

$Mailboxes = get-msonlineuser -Credential $AdminCredential -Enabled
$Mailboxes.count

How many objects does that return? if you then run this what is returned?

$Mailboxes = get-msonlineuser -Credential $AdminCredential -Enabled -ResultSize "Unlimited"
$Mailboxes.count
0
 

Author Comment

by:Rickdangerousire
ID: 36554496
Thanks for the help everyone. The issue was internal with user names, however all of the above worked once that other issue was fixed.
0
 

Author Closing Comment

by:Rickdangerousire
ID: 36554506
Very long day, My writing was not the best. Thanks again.
0

Featured Post

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

Question has a verified solution.

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

MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
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…
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

815 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now