a command line interface and scripting platform for Microsoft Exchange Server. It is a fully featured version of Windows PowerShell with Exchange-specific extensions, first introduced with Exchange Server 2007 and included in all later versions.
Questions tagged [exchange-management-shell]
48 questions
1
vote
0 answers
Export All Users Disclaimer From Exchange 2010 With Exchange Management Shell
I need to Export User Disclaimer From Exchange 2010 With Exchange Management Shell. Is that possible? Example of Disclaimer:
Kathleen Mayer
Sales Department
Contoso
www.contoso.com
kathleen@contoso.com
cell: 111-222-1234
I tried this script but its…

alex canali
- 11
- 2
1
vote
1 answer
Execute exchange management shell cmdlets using C#?
I am trying to execute the following exchange management shell cmdlets using C# in order to get total number of mailbox on the server.
cmdlets:-
Get-mailbox -resultsize unlimited
My code snippet is as following
PSCredential credential =…

user3571578
- 37
- 6
1
vote
4 answers
Search-Mailbox SearchQuery not working
I am trying to delete the contents of an Exchange 2013 mailbox before today's date. It must be specific to the second I call the Get-Date cmdlet.
This code runs without error:
Search-Mailbox myID -SearchQuery Received:

Johnrad
- 2,637
- 18
- 58
- 98
1
vote
1 answer
Listing distribution groups only if smtp address exists
I'm trying to list all groups that contain a specific SMTP address in the group. Below is the code I'm using but its outputting everything and not just the groups with the specified SMTP address:
$temp = Get-DistributionGroup -ResultSize Unlimited…

JoeRod
- 899
- 8
- 20
- 30
0
votes
0 answers
After Microsoft disabled the RPS for exchange my code is throwing 'System.Management.Automation.PSNotImplementedException'
After Microsoft has disable the use of RPS (https://techcommunity.microsoft.com/t5/exchange-team-blog/deprecation-of-remote-powershell-in-exchange-online-re-enabling/ba-p/3779692) my code has broken.
Below is the C# code.
HttpClient Client = new…
0
votes
0 answers
How can i export the member list of a exchange online dynamic distribution group to inc the attribute employeenumber
How can i export the members list of a exchange online dynamic distribution group to inc the attribute employeenumber?
EmployeeNumber is an onprem attribute but we have synced this to Azure AD using Directory Sync
i would like a export of all users…

Dougdog
- 1
0
votes
0 answers
Needing to read data from Excel and output it into EMS command
I am currently working on a project to help me with a job at work. Currently we are copying and pasting a command over and over and over and over (1800 times to be exact) into a mail server similar to Power Shell. The command has 2 variables that…

Sloppy_Salmon
- 1
- 3
0
votes
1 answer
How to run PS1 file on a Server 2016 from a remote computer?
i wrote a script for Exchange Management Shell. i've saved the script on the server.
my question is: how can i run the script from a remote windows 10 Computer?
*regarding to server authentiication - it's O.K for me to write my server Credentials on…

Aviad Ofek
- 13
- 4
0
votes
2 answers
Acquiring OAuth2 access tokens for Exchange Management Shell cmdlets
In our python application, we use the Exchange Management Shell cmdlets to perform some tasks.
(In fact, the python application runs .Net application, which calls the Exchange Management Shell cmdlets.)
Currently we use basic authentication with…

Aleksey
- 179
- 1
- 1
- 13
0
votes
0 answers
Turn on or off all mail flowrules using powershell
I have 128 MailFlow rules within an exchange 2013 server. I am looking for a way to turn on or turn off all the rules with a powershell script.
I know that I can use
Disable-TransportRule "RuleName"
to turn off a rule.
My problem is trying to…

Matt Bartlett
- 348
- 1
- 3
- 21
0
votes
1 answer
Export e-mail address for all public folders
I have a large group of public folders. Each folder has a minimum of 3 up to a max of 20 e-mails address that will direct to that public folder.
I have tried writing a ExchangeManagementShell script to extract the e-mail addresses to a CSV file.
The…

Matt Bartlett
- 348
- 1
- 3
- 21
0
votes
0 answers
Set-MalwareFilterPolicy example given by Microsoft documentation fails
I'm trying to add file types to Exchange Server 2019 malware policy. For that purpose, I follow Microsoft documentation shown at…

fpiette
- 11,983
- 1
- 24
- 46
0
votes
1 answer
Error passing a comma separated String to Add-UnifiedGroupLinks resuling in a "Couldn't find object" error
I am trying to bulk-load an Office 365 Group using Add-UnifiedGroupLinks which works if only passing one value as a string but the command supports a comma separated list. However, when passing it a comma separated string it returns "Couldn't find…

Danny
- 1
0
votes
1 answer
Exchange Management Shell - Exchange 2010 - Exporting with DateRange to PST ignoring the filtering
I’ll elaborate on the title a bit.
I’m currently creating a script to export a mailbox on Exchange 2010 to a PST, only emails from a specific date range.
However, it seems to be ignoring the filter and exporting all 37gb to a PST.
I’m creating the…

James Timms
- 120
- 1
- 15
0
votes
1 answer
How to know if user has a mailbox on Exchange using C# or PowerShell
We developed a SharePoint web part that displays selected users's calender items by requesting Exchange OnPrem 2013 or Exchange Online for users that have thier mailbox on Office 365. The code we're using is as follows :
// Impersonate the…

KhalilG
- 201
- 5
- 13