Solved

looking for a script that can identify if user is on premise or cloud

Posted on 2016-11-01
3
52 Views
Last Modified: 2016-11-22
have a list of UPN's or email addresses in a csv format and looking to generate an output with location of mailbox... i.e prem or on cloud.
0
Comment
Question by:ARM2009
[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
3 Comments
 
LVL 42

Assisted Solution

by:Vasil Michev (MVP)
Vasil Michev (MVP) earned 100 total points (awarded by participants)
ID: 41869654
Simply look at the recipient type details for the object on-prem, it should give you the relevant information.
0
 
LVL 16

Accepted Solution

by:
Todd Nelson earned 400 total points (awarded by participants)
ID: 41870974
Unfortunately, Get-Mailbox will only get you a list of on premises mailboxes and not a list of Exchange Online mailboxes; and vice versa with Get-RemoteMailbox.

Therefore, you will need to use Get-Recipient to provide the informaiton you are looking for.  Similar to this...

Get-RecipientType | Select DisplayName,Alias,RecipientType,RecipientTypeDetails | Export-Csv C:\RecipientType.csv -NoTypeInformation

Open in new window

0
 
LVL 16

Expert Comment

by:Todd Nelson
ID: 41897216
Sufficient information provided to obtain answer.
0

Featured Post

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
This Experts Exchange lesson shows how to use VBA to loop through rows in Excel.  In order to sort, filter, and use database features, there needs to be a value in each column for every row. When data arrives with values missing, code to copy values…
This video discusses moving either the default database or any database to a new volume.
Suggested Courses

617 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