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
Solved

How to Get Acceptable Domain Names from Exchange 2010 Server

Posted on 2010-11-23
3
538 Views
Last Modified: 2012-05-10
Can anyone show how to retrieve acceptable domain names from an Exchange Server using any of the following technologies:
    * Powershell
    * SQL Server OpenQuery
    * C# Programming
I currently use the System.Management namespace within managed code (C#), along with an instance of Powershell, to get and/or add mailboxes from/to Exchange. During the process, I also utilize SQL Server's OpenQuery to ping an Active Directory for related information.

One piece that I have not been able to figure out is how to retrieve the current list of acceptable domain names from Exchange. Can someone show or explain how this can be done?
0
Comment
Question by:brian_appliedcpu
3 Comments
 
LVL 76

Accepted Solution

by:
Alan Hardisty earned 250 total points
ID: 34200737
get-accepteddomain

That should list all the accepted domains on your server.

Alan
0
 
LVL 2

Author Comment

by:brian_appliedcpu
ID: 34207125
Alan,
Thanks a bunch. That is what I needed.
I am not an Exchange admin, but I have been assigned the task of creating a GUI to retrieve basic info from Exchange without having to run powershell cmdlets. That being said, I am also trying to list the UPNs. IOWs, within the Exchange mgmt console, if you doulble-click a mailuser account, you can view the properties for that mailbox. Under the Account tab, there is the User Logon Name (user principal name). I have been trying to use Get-User -Identity ... or Get-MailUser -Identity ... (etc.) to list *all* existing UPNs. Do you have any suggestions?
TIA
0
 
LVL 49

Assisted Solution

by:Akhater
Akhater earned 250 total points
ID: 34209379
Get-user username | fl UserPrincipalName
or if you prefer

$user = Get-user username
write-host $user.UserPrincipalName
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
A list of top three free exchange EDB viewers that helps the user to extract a mailbox from an unmounted .edb file and get a clear preview of all emails & other items with just a single click on mailboxes.
how to add IIS SMTP to handle application/Scanner relays into office 365.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

792 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