Skip to content

Tools4everBV/HelloID-Task-SA-Target-ExchangeOnline-SharedMailboxCreate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HelloID-Task-SA-Target-ExchangeOnline-SharedMailboxCreate

Prerequisites

Before using this snippet, verify you've met with the following requirements:

  • The powershell EXO v3 module must be installed on the server running the Agent. See Exchange-online-powershell-v2 for instructions

  • User defined variables: ExchangeOnlineAdminUsername and $ExchangeOnlineAdminPassword created in your HelloID portal. See also Custom Variables

Description

This code snippet executes the following tasks:

  1. Define a hash table $formObject. The keys of the hash table represent the properties of the shared mailbox to be created, while the values represent the values entered in the form.

To view an example of the form output, please refer to the JSON code pasted below.

{
    "Name" :                "testshared1@myenvironment.onmicrosoft.com",
    "DisplayName" :         "test shared mailbox 1",
    "Alias" :               "testshared1",
    "ResourceCapacity" :    10,
    "PrimarySmtpAddress" :  "testshared1@myenvironment.onmicrosoft.com"
}

❗ It is important to note that the names of your form fields might differ. Ensure that the $formObject hashtable is appropriately adjusted to match your form fields. See the Microsoft Docs page

  1. Constructs a powershell credential object from the supplied administrative username and password

  2. Connects with the credentials to the Exchange online environment by means of the Connect-ExchangeOnline cmdlet

  3. Calls the New-Mailbox cmdlet to create the new shared mailbox.

  4. Disconnects from the Exchange environment by means of the Disconnect-ExchangeOnline cmdlet