Solved

How to Get Acceptable Domain Names from Exchange 2010 Server

Posted on 2010-11-23
3
530 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
In this video we show how to create a Contact 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 Recipients >> Contact ta…
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…

746 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

8 Experts available now in Live!

Get 1:1 Help Now