https://github.com/tools4everbv/helloid-task-sa-source-exchangeonpremises-mailboxsearch
Exchange On-Premises - Mailbox search
https://github.com/tools4everbv/helloid-task-sa-source-exchangeonpremises-mailboxsearch
data-source exchange-on-premises powershell service-automation
Last synced: over 1 year ago
JSON representation
Exchange On-Premises - Mailbox search
- Host: GitHub
- URL: https://github.com/tools4everbv/helloid-task-sa-source-exchangeonpremises-mailboxsearch
- Owner: Tools4everBV
- Created: 2024-02-12T09:34:26.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-12T12:56:22.000Z (over 2 years ago)
- Last Synced: 2025-01-08T10:45:07.173Z (over 1 year ago)
- Topics: data-source, exchange-on-premises, powershell, service-automation
- Language: PowerShell
- Homepage:
- Size: 97.7 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HelloID-Task-SA-Source-ExchangeOnPremises-MailboxSearch
## Prerequisites
- [ ] Execute the cmdlet **Enable-PsRemoting** on the **Exchange server** to which you want to connect.
- [ ] Within **IIS**, under the **Exchange Back End site** for the **Powershell sub-site**, check that the authentication method **Windows Authentication** is **enabled**.
- [ ] Permissions to manage the Exchange objects, the default AD group **Organization Management** should suffice, but please change this accordingly.
## Description
This code snippet executes the following tasks:
1. Define a wildcard search query `$searchValue` based on the search parameter `$datasource.searchValue`
2. Creates a session to Exchange using Remote PowerShell.
3. List all mailboxes in Exchange On-Premises that match the wildcard search query `$searchValue` in their name or email addresses using the cmdlet: [Get-Mailbox](https://learn.microsoft.com/en-us/powershell/module/exchange/get-mailbox?view=exchange-ps)
> The filter property **-filter** accepts different values [See the Microsoft Docs page](https://learn.microsoft.com/en-us/powershell/module/exchange/get-mailbox?view=exchange-ps#-filter)
4. Return a hash table for each user account using the `Write-Output` cmdlet.
> To view an example of the data source output, please refer to the JSON code pasted below.
```json
{
"searchValue": "Consultancy"
}
```