Unstub Command Line Tool

After removing a user from a storage management policy, email messages which had previously been stubbed are not automatically unstubbed. To unstub a message use the unstub command line tool available on the AMSVaultBox.

The unstub command line can be found at the AMS client installation folder.

For detailed usage instructions type: unstub -help, you will see the following help description:

Usage: unstub [-verbose] and [-all], [-primarySMTPAddress {userEmailAddress}], [-inputfile {path to the file}] or {exchange-mailbox-id}

Where:

-all

Unstub all users

-primarySMTPAddress {the user smtp address}

User's primary smtp email address to be unstubbed

-inputfile {the path to the input file}

The path to input file containing list of primary smtp email addresses to be unstubbed

{exchange-mailbox-id}

User's MailboxDN to be unstubbed

-verbose

Enable verbose output

Example:

To unstub all users

unstub -all

To unstub all users with verbose flag on

unstub -verbose -all

To unstub single user by primary smtp address

unstub –primarySMTPAddress test_1@lab.com

To unstub users based on input text file

unstub -verbose –inputfile "C:\input.txt"

To unstub single user by mailboxID

unstub /o=first organization/ou=first administrative group/cn=recipients/cn=test_1

NOTE

If you choose the -all option to unstub all users, the unstub tool will execute for only the on-premises users who are not members of a storage management policy.
  • Cloud users will not be processed.
  • Users who are members of a storage management policy will also not be processed.

If you attempt to unstub a cloud user by specifying their primary SMTP address, you will receive an error stating the tool is unable to find the user with that SMTP email address. In verbose logging an exception is logged that the property homeMDB is not found. This is expected.

To unstub by primary SMTP addresses that are listed on the input file, you need to prepare the file first. The file should consist of a single primary SMTP address per line. One way to produce this file is using Exchange PowerShell.

Example:

Get-MailboxDatabase -identity ExchangeServ | Get-Mailbox -ResultSize Unlimited | Select-Object PrimarySmtpAddress > PrimarySMTPAddressList.txt

The above command lists the primary SMTP address of all mailboxes on the mailbox database named "ExchangeServ" store outputs that to the file PrimarySMTPAddressList.txt.