0 votes

I want to disable exchange mail account via script. This script will run in custom command.

I write a script like this.

"Disable-Mailbox -identity %mailNickname% -confirm:$false"

But i get an error message "The term disable-mailbox is not recognized as the name of a cmdlet ....."

I think that I must import a module that it is recognize this command.

Any one suggest something

Thanks in advanced.

by (40 points)

1 Answer

0 votes
by (216k points)

Hello Erkan,

Starting from Adaxes 2013.1, you can access Exchange functions with Adaxes ADSI API. To disable the Exchange mailbox of the user, on which the Custom Command is executed, you can use the following script:


Related questions

0 votes
1 answer

I have tried it using the Custom Commands Action "Add the user to a group", which only allows me to add the user to one group at a time, and can't use the multiple DNs that the ... I can't get it to work. Could you assist me in finding the best way to do this?

asked Jan 16 by dominik.stawny (210 points)
0 votes
1 answer

Hi, we have replaced our local Exchange server with installation of Exchange Management Tools (EMT) installed directly on Adaxes server. And my question is: How can I force ... this is how 'Set External Senders' option looks in Adaxes config Thanks in advance

asked Apr 1, 2023 by KIT (910 points)
0 votes
1 answer

Or is there another solution to solve this?

asked Sep 15, 2022 by boris (510 points)
0 votes
1 answer

We are currently working on automating the property patterns. So far we were able to add all the needed properties to a Property Pattern via PowerShell script apart from the ... 't quite match the "should be" screenshot. Any help would be much appriciated.

asked Apr 30, 2020 by MichaelM (60 points)
0 votes
1 answer

Currently, when I disable a user account in Adaxes, the group memberships of the user remain intact. I'd like to automate the removal of group memberships such as distribution ... a list of groups/DL that the user was previously in and removed from. Thanks!

asked Nov 3, 2021 by jayden.ang (20 points)
3,411 questions
3,108 answers
545,837 users