Overview
If you've been granted access to manage your department's accounts for the Texas A&M Exchange Email accounts, it can be useful to connect your computer's instance of PowerShell to the Texas A&M Exchange Management servers. You will need to make sure you are using Exchange Online PowerShell V2 in order to connect using Modern Authentication and multifactor authentication.
Install Exchange Online PowerShell V2
The Exchange Online PowerShell V2 (EXO V2) module can be downloaded from https://www.powershellgallery.com/packages/ExchangeOnlineManagement/. The PowerShell Gallery page will include a link that you can copy and paste into your PowerShell session to download and install the EXO V2 module.
- Open PowerShell on your computer as an administrator. Make sure the title bar displays "Administrator: Windows PowerShell."
- Paste the installation command provided by https://www.powershellgallery.com/packages/ExchangeOnlineManagement/ and hit Enter.
Example: Install-Module -Name ExchangeOnlineManagement -RequiredVersion 2.0.5
- Enter Y if asked to import the NuGet provider.
- Enter Y to allow installation of the PowerShell Gallery repository.
Connecting to Exchange
- Open PowerShell on your computer as an administrator. Make sure the title bar displays "Administrator: Windows PowerShell."
- Click Yes to allow PowerShell to make changes to your device.
- Enter
Import-Module ExchangeOnlineManagement
.
- Enter
Connect-ExchangeOnline -UserPrincipalName NetID@tamu.edu
.
- Enter your NetID password and click Next.
- Authenticate via Duo.
Note: If you are already authenticated via Duo and your NetID, you may not be prompted for your NetID password and Duo authentication.
At this point, you will be connected to Exchange Online. A list of new Exchange Online cmdlets will be presented to you. These new cmdlets are optimized for Exchange Online and are typically faster and more reliable than the older equivalent cmdlets. Ex: Get-EXOMailbox
replaces the older Get-Mailbox
.
More Information
Additional information on Exchange Online PowerShell V2 can be found at Microsoft's documentation site.
Connecting to On-Premise Exchange
TechBox
Computers that are joined to InTune will not be able to use the instructions below to connect to On-Premise Exchange. InTune managed machines have group policies applied which prevent the use of basic authentication as outlined in step 2. If your computer is managed by InTune, you will need to use TechBox to connect to On-Premise Exchange. All TAMU Exchange administrators have access to TechBox.
The instructions below will work normally once you are connected to TechBox. Use the instructions for configuring Remote Desktop for Windows or Remote Desktop for macOS to establish a connection to TechBox.
The configuration settings you will need to use to connect to TechBox are:
- Computer/PC name: techbox.ads.tamu.edu
- Gateway: rds.tamu.edu
- Select Bypass for local addresses
- For all other settings, refer to the respective Remote Desktop instructions.
Once you are logged into TechBox, follow the instructions below for non-InTune managed computers.
Instructions for non-InTune managed computers
- Open PowerShell on your computer.
- Run the following command to open the session:
$Session = New-PSSession -Credential (Get-Credential) -ConfigurationName Microsoft.Exchange -Authentication Basic -URI https://exchange.tamu.edu/powershell

- Enter your NetID credentials in the format NetID@tamu.edu.

- Run the following command to import the server commands:
Import-PSSession -Session $Session -DisableNameChecking -AllowClobber

You should now be able to run PowerShell commands such as Get-DistributionGroup
or Get-MailboxPermission
on the Exchange Management Shell.