Exchange Management Shell closes on command failure

Status
Not open for further replies.

SMAndy

Member
Outlook version
Email Account
Exchange Server
Hi everyone,

My first post, and a question....

My exchange Management Shell (using Office 365, and a hybrid exchange 2010 server) seems to close on its own whenever a command fails to run. (when it kicks out an exception)

This is really annoying because it only gives me about a second to read the error message, unless i can hit Pause/Break fast enough... As you can imagine, I would quite like to find out if its failing because i typed the command wrong or because the action i'm doing is already done (account already exists etc)

Any ideas on how I can fix this? If i look in the properties of the start menu entry for the shell, it has "-noexit" in it, which I assume is something to do with this...

Thanks.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange

SMAndy

Member
Outlook version
Email Account
Exchange Server
It sounds like you are opening and running it via command line.




Do you have error handlers built into the script?


Error Handling | Windows PowerShell: A More In-Depth Look | InformIT


Windows PowerShell 2.0: TFM (The F****** Manual)





No handlers that I know of...




I'm opening the management shell from the start menu shortcut, (microsoft exchange server 2010 > Exchange Management Console)




Since its powershell, would it use my default powershell profile? i'm loading the ActiveDirectory module and setting the executionpolicy to remotesigned with the profile, so that i can run scripts for creating new PC accounts directly into AD... but that's all the configuration i've got on it.
 

SMAndy

Member
Outlook version
Email Account
Exchange Server
Failure. It still closes when it throws up an exception.

Example: add-mailboxpermission <rest of="" commands="" required=""
All typed correctly, no mistakes.

exception: this account already has access <error codes="" that="" powershell="" throws="" out=""
*returns to command entry, like its taunting me to try again*

*3 seconds later, powershell closes, regardless what i'm doing*

</error></rest>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
D Microsoft Exchange account - Remote management Using Outlook.com accounts in Outlook 1
D Outlook Add-on for Exchange Spam Management? Exchange Server Administration 2
L Exchange Management Console - Initializtion failed on Logon Failure: unknown username or bad passwor Exchange Server Administration 4
Z New minimum Outlook for Windows version requirements for Microsoft 365/Exchange Online Using Outlook.com accounts in Outlook 1
L Help connecting to hosted exchange server 2016 Using Outlook 0
O Exchange Sync period only (e.g. last years mail) Using Outlook 0
J Connect outlook to office365 exchange _without_ signing in office apps Using Outlook 4
J Importing N2K from a different Exchange Server Using Outlook 1
G Forward email body to other mail list directly from Exchange server Exchange Server Administration 1
D Do I need Exchange Add-In? Using Outlook 6
O Newbie question: how to sync two Outlook -Exchange and IMAP- calendars? Using Outlook 4
I Exchange 2019 - MICROSOFT-CORP-MSN-AS-BLOCK Exchange Server Administration 0
T Outlook 2010 How to Delete “Orphaned” TO DO? ( Not on Exchange Server) Using Outlook 6
M Outlook 2010 Outlook 2010 with O365 / Exchange Online Using Outlook 0
C Transfer Autocomplete from Pop to Exchange Using Outlook 3
N Backing Up Exchange Calendar Using Outlook 13
A Ol16 desktopT suddenly can't connect with Exchange Using Outlook.com accounts in Outlook 5
T How can Exchange be configured to sync/push one-way so that the server data can't be affected Exchange Server Administration 0
E How to display "Change Folder" in Change Default Email Delivery Location in Exchange Outlook 2016 Using Outlook 1
J Outlook 2016 Moving IMAP emails to Exchange Using Outlook 1
O Outlook 365 Exchange .ost within Personal Vaul Using Outlook 0
D Outlook 2016 Migrate 'On My Computer' (local storage) Calendar from Mac Outlook to Exchange Account Using Outlook 5
A .restrict results changing after moving to Exchange online Outlook VBA and Custom Forms 0
D Can Exchange Admin Center create a pst for users email/contacts/calendar? Exchange Server Administration 0
S Messages moved / deleted by auto-archive are not synchronized to exchange Exchange Server Administration 8
llama_thumper Setting up forwarders on Exchange server Exchange Server Administration 0
D Importing Outlook Categories from another domain (Exchange 2016/Outlook 2016) Using Outlook 4
M WMI query for Get Disk IO performance in exchange Exchange Server Administration 0
B Outlook 2013/Exchange 2013 - Conf Rooms not fully booking "resolved conflict" meetings Using Outlook 3
D Adding Enterprise Exchange Email Account to Outlook Prevents Sending via Outlook.com Account Using Outlook.com accounts in Outlook 10
O Benefits of Exchange over IMAP and why would I choose Exchange? Using Outlook 2
F Delete/create/reset Exchange mailbox on Outlook.com Using Outlook.com accounts in Outlook 3
A Prevent connection to Public Folders on Exchange? Exchange Server Administration 3
S Add Exchange Account as Secondary to Existing PST? Exchange Server Administration 1
S Adding new Exchange (2016) rule very slow down Microsoft Outlook Exchange Server Administration 0
CWM030 A quick question for Diane about Exchange Exchange Server Administration 2
G How to have domain client use owa server instead of exchange server while connect to network Using Outlook 1
J Outlook 2016 message content does not display - outlook.com; exchange Using Outlook.com accounts in Outlook 9
C Filter/Search emails sent to internal Exchange address only Using Outlook 2
B Copy/Move Exchange inbox to Pop inbox Using Outlook 4
Fozzie Bear Correct Method to set up Outlook.com accounts as Exchange Using Outlook.com accounts in Outlook 7
P AutoArchive exchange folder to exchange folder Using Outlook 1
J Syncing notes between Outlook 2016/Exchange and Outlook for Android Using Outlook 2
Brian Murphy Exchange Online Everything a Transport Rule should do and cannot Exchange Server Administration 1
E Customer wants a portion of GAL from exchange to sync down to Android contacts via Activesync Using Outlook 2
R Problem with searching public folders Exchange 2013/16 Exchange Server Administration 2
I outlook 2016 manual exchange config Using Outlook 0
R Add Exchange Account to existing POP3 Outlook 2007 Profile Using Outlook 0
Fozzie Bear Office 365 Home Premium with Exchange Online email accounts Using Outlook 3
S What is /O=FIRST ORGANIZATION/OU=EXCHANGE ADMINISTRATIVE GROUP(***************)/CN=RECIPIENTS/CN=... Using Outlook 5

Similar threads

Top