From 988343bda3be372fee3c413982b2fdc9ba0eea99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20Kj=C3=A6rg=C3=A5rd?= Date: Mon, 4 Nov 2024 19:34:01 +0100 Subject: [PATCH 1/7] Add function to create a shared mailbox --- .../Email-Exchange/Add-CIPPSharedMailbox.ps1 | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 CIPPAPIModule/public/Email-Exchange/Add-CIPPSharedMailbox.ps1 diff --git a/CIPPAPIModule/public/Email-Exchange/Add-CIPPSharedMailbox.ps1 b/CIPPAPIModule/public/Email-Exchange/Add-CIPPSharedMailbox.ps1 new file mode 100644 index 0000000..e206393 --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Add-CIPPSharedMailbox.ps1 @@ -0,0 +1,59 @@ +<# +.SYNOPSIS + Adds a shared mailbox to a specified tenant. + +.DESCRIPTION + This function adds a shared mailbox to a specified tenant using the provided tenant ID, display name, domain, and username. Optionally, additional aliases can be added. + +.PARAMETER CustomerTenantID + The ID of the customer tenant where the shared mailbox will be added. This parameter is mandatory. + +.PARAMETER DisplayName + The display name for the shared mailbox. This parameter is mandatory. + +.PARAMETER Domain + The domain for the shared mailbox. This parameter is mandatory. + +.PARAMETER Username + The username for the shared mailbox. This parameter is mandatory. + +.PARAMETER AddedAliases + An array of additional aliases to be added to the shared mailbox. This parameter is optional. + +.EXAMPLE + Add-SharedMailbox -CustomerTenantID "d6766bb9-44e0-4a4b-b8d0-3d9c4d1d15cc" -DisplayName "Support" -Domain "example.com" -Username "support" + +.EXAMPLE + Add-SharedMailbox -CustomerTenantID "example.com" -DisplayName "Support" -Domain "example.com" -Username "support" -AddedAliases " + +.NOTES + This function uses the Invoke-CIPPRestMethod cmdlet to send a POST request to the /api/AddSharedMailbox endpoint. +#> + +function Add-SharedMailbox { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $true)] + [string]$DisplayName, + [Parameter(Mandatory = $true)] + [string]$Domain, + [Parameter(Mandatory = $true)] + [string]$Username, + [Parameter(Mandatory = $false)] + [array]$AddedAliases + ) + + Write-Verbose "Adding Shared mailbox in tenant: $CustomerTenantID" + $Endpoint = '/api/AddSharedMailbox' + $body = @{ + tenantID = $CustomerTenantID + displayName = $DisplayName + username = $Username + domain = $Domain + AddedAliases = $AddedAliases + + } + Invoke-CIPPRestMethod -Endpoint $Endpoint -Body $body -Method POST +} From c888c93f4115f2b36ebe49c3d3be855ced1f6925 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20Kj=C3=A6rg=C3=A5rd?= Date: Mon, 4 Nov 2024 19:51:35 +0100 Subject: [PATCH 2/7] Better comment and fix wrong function name --- .../Email-Exchange/Add-CIPPSharedMailbox.ps1 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/CIPPAPIModule/public/Email-Exchange/Add-CIPPSharedMailbox.ps1 b/CIPPAPIModule/public/Email-Exchange/Add-CIPPSharedMailbox.ps1 index e206393..9bc215e 100644 --- a/CIPPAPIModule/public/Email-Exchange/Add-CIPPSharedMailbox.ps1 +++ b/CIPPAPIModule/public/Email-Exchange/Add-CIPPSharedMailbox.ps1 @@ -7,6 +7,7 @@ .PARAMETER CustomerTenantID The ID of the customer tenant where the shared mailbox will be added. This parameter is mandatory. + Either TenantID or Default domain can be used to identify the tenant. .PARAMETER DisplayName The display name for the shared mailbox. This parameter is mandatory. @@ -21,16 +22,24 @@ An array of additional aliases to be added to the shared mailbox. This parameter is optional. .EXAMPLE - Add-SharedMailbox -CustomerTenantID "d6766bb9-44e0-4a4b-b8d0-3d9c4d1d15cc" -DisplayName "Support" -Domain "example.com" -Username "support" + Add-CIPPSharedMailbox -CustomerTenantID "d6766bb9-44e0-4a4b-b8d0-3d9c4d1d15cc" -DisplayName "Support" -Domain "example.com" -Username "support" + This example adds a shared mailbox with the display name "Support" and the username "support" to the tenant "d6766bb9-44e0-4a4b-b8d0-3d9c4d1d15cc". .EXAMPLE - Add-SharedMailbox -CustomerTenantID "example.com" -DisplayName "Support" -Domain "example.com" -Username "support" -AddedAliases " + Add-CIPPSharedMailbox -CustomerTenantID "example.com" -DisplayName "Support" -Domain "example.com" -Username "support" -AddedAliases "itsupport@example.com" + This example adds a shared mailbox with the display name "Support" and the username "support" to the tenant "example.com". One additional alias is also added to the mailbox. + +.EXAMPLE + Add-CIPPSharedMailbox -CustomerTenantID "example.com" -DisplayName "Support" -Domain "example.com" -Username "support" -AddedAliases 'itsupport@example.com','helpdesk@example.com','sos@example.com' + This example adds a shared mailbox with the display name "Support" and the username "support" to the tenant "example.com". Three additional aliases is also added to the mailbox. + The AddedAliases parameter accepts an array of strings. + .NOTES This function uses the Invoke-CIPPRestMethod cmdlet to send a POST request to the /api/AddSharedMailbox endpoint. #> -function Add-SharedMailbox { +function Add-CIPPSharedMailbox { [CmdletBinding()] Param( [Parameter(Mandatory = $true)] From 9e655ed8e0b627e1af833974c13e566c4b089e09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20Kj=C3=A6rg=C3=A5rd?= Date: Mon, 4 Nov 2024 19:51:45 +0100 Subject: [PATCH 3/7] Add function to create a room mailbox --- .../Email-Exchange/Add-CIPPRoomMailbox.ps1 | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 CIPPAPIModule/public/Email-Exchange/Add-CIPPRoomMailbox.ps1 diff --git a/CIPPAPIModule/public/Email-Exchange/Add-CIPPRoomMailbox.ps1 b/CIPPAPIModule/public/Email-Exchange/Add-CIPPRoomMailbox.ps1 new file mode 100644 index 0000000..e9a4ffa --- /dev/null +++ b/CIPPAPIModule/public/Email-Exchange/Add-CIPPRoomMailbox.ps1 @@ -0,0 +1,59 @@ +<# +.SYNOPSIS + Adds a room mailbox to a specified tenant. + +.DESCRIPTION + This function adds a room mailbox to a specified tenant by calling the CIPP API endpoint '/api/AddRoomMailbox'. + It requires the tenant ID, display name, domain, and username as mandatory parameters. + Optionally, the resource capacity can also be specified. + +.PARAMETER CustomerTenantID + The ID of the customer tenant where the room mailbox will be added. + Either TenantID or Default domain can be used to identify the tenant. + +.PARAMETER DisplayName + The display name for the room mailbox. + +.PARAMETER Domain + The domain for the room mailbox. + +.PARAMETER Username + The username for the room mailbox. + +.PARAMETER ResourceCapacity + The resource capacity for the room mailbox. This parameter is optional. + +.EXAMPLE + Add-RoomMailbox -CustomerTenantID "7e3effb6-6efe-42f2-b071-48ce318eaf95" -DisplayName "Conference Room 1" -Domain "example.com" -Username "confroom1" -ResourceCapacity 10 + +.NOTES + This function uses the Invoke-CIPPRestMethod cmdlet to make a POST request to the CIPP API. +#> +function Add-CIPPRoomMailbox { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $true)] + [string]$DisplayName, + [Parameter(Mandatory = $true)] + [string]$Domain, + [Parameter(Mandatory = $true)] + [string]$Username, + [Parameter(Mandatory = $false)] + [int]$ResourceCapacity + ) + + Write-Verbose "Adding room mailbox in tenant: $CustomerTenantID" + $Endpoint = '/api/AddRoomMailbox' + $body = @{ + tenantID = $CustomerTenantID + displayName = $DisplayName + username = $Username + domain = $Domain + userPrincipalName = "$Username@$Domain" + resourceCapacity = $ResourceCapacity + + } + Invoke-CIPPRestMethod -Endpoint $Endpoint -Body $body -Method POST +} From 47a5a26f092c6e3a925579c3ba6c46dbf3e6f3cf Mon Sep 17 00:00:00 2001 From: BNWEIN Date: Mon, 11 Nov 2024 13:44:55 +0000 Subject: [PATCH 4/7] Create Get-AllTenants-Role-Members.ps1 Added Example Script --- .../Get-AllTenants-Role-Members.ps1 | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 Example Scripts/Get-AllTenants-Role-Members.ps1 diff --git a/Example Scripts/Get-AllTenants-Role-Members.ps1 b/Example Scripts/Get-AllTenants-Role-Members.ps1 new file mode 100644 index 0000000..215c268 --- /dev/null +++ b/Example Scripts/Get-AllTenants-Role-Members.ps1 @@ -0,0 +1,70 @@ +<# +.SYNOPSIS + Retrieves and exports a list of all tenants and their roles from the CIPP API. + +.DESCRIPTION + This script prompts the user for CIPP API details and a Tenant ID, then retrieves a list of tenants and their roles using the CIPPAPIModule. + The roles and their members are exported to a CSV file. + +.PARAMETER CIPPAPIUrl + The URL of the CIPP API. + +.PARAMETER CIPPClientID + The Client ID for the CIPP API. + +.PARAMETER CIPPClientSecret + The Client Secret for the CIPP API. + +.PARAMETER TenantId + The Tenant ID for which to retrieve roles. + +.OUTPUTS + Exports a CSV file containing the roles and their members for each tenant. + +.NOTES + The script uses the CIPPAPIModule to interact with the CIPP API. + The CSV file is saved in the TEMP directory with a filename in the format 'Rolesyyyy-MM-dd.csv'. + +.EXAMPLE + PS> .\Get-AllTenants-Role-Members.ps1 + Enter the CIPP API URL: https://api.example.com + Enter the CIPP API Client ID: your-client-id + Enter the CIPP API Client Secret: your-client-secret + Enter the Tenant ID: your-tenant-id +#> +$CIPPAPIUrl = Read-Host 'Enter the CIPP API URL' +$CIPPClientID = Read-Host 'Enter the CIPP API Client ID' +$CIPPClientSecret = Read-Host 'Enter the CIPP API Client Secret' +$TenantId = Read-Host 'Enter the Tenant ID' + +Import-Module CIPPAPIModule +Set-CIPPAPIDetails -CIPPClientID $CIPPClientID -CIPPClientSecret $CIPPClientSecret -CIPPAPIUrl $CIPPAPIUrl -TenantID $TenantId + +Write-Output 'Getting List of tenants' +$tenantsList = Get-CIPPTenants +Write-Output 'Getting all customer roles - This can take a few minutes...' +$GlobalAdmins = $tenantsList.defaultDomainName | ForEach-Object -Parallel { + Import-Module CIPPAPIModule + Set-CIPPAPIDetails -TenantID $using:TenantId -CIPPClientID $using:CIPPClientID -CIPPClientSecret $using:CIPPClientSecret -CIPPAPIUrl $using:CIPPAPIUrl + $tenant = $_ + $Roles = Get-CIPPRoles -CustomerTenantID $tenant + foreach ($Role in $Roles) { + [PSCustomObject]@{ + Tenant = $tenant + Role = $Role.DisplayName + Description = $Role.Description + Members = $Role.Members + } + } +} -ThrottleLimit 5 + +if ($null -eq $GlobalAdmins) { + exit +} + +$filename = 'Roles' + (Get-Date -Format 'yyyy-MM-dd') + '.csv' +$filepath = "$env:TEMP\$($filename)" + +$GlobalAdmins | Export-Csv -Path $filepath + +Start-Process -FilePath $filepath \ No newline at end of file From fa7657313777dfb92cb0086406ebad4c5488960f Mon Sep 17 00:00:00 2001 From: Jr7468 <126574444+Jr7468@users.noreply.github.com> Date: Tue, 12 Nov 2024 16:26:17 +0000 Subject: [PATCH 5/7] Included MustChangePass Param --- .../public/Identity/Administration/Users/Set-CIPPUser.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPUser.ps1 b/CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPUser.ps1 index 50e38e4..db76fcd 100644 --- a/CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPUser.ps1 +++ b/CIPPAPIModule/public/Identity/Administration/Users/Set-CIPPUser.ps1 @@ -136,7 +136,7 @@ function Set-CIPPUser { value = [PSCustomObject]@{ groupid = $cippAddGroup.ID groupName = $cippAddGroup.DisplayName - groupType = $cippAddgroup.calculatedGroupType + groupType = $CIPPAddGroup.calculatedGroupType } label = "$($CIPPAddGroup.DisplayName) - $($CIPPAddGroup.calculatedGroupType)" } @@ -183,7 +183,8 @@ function Set-CIPPUser { MobilePhone = $MobilePhone ? $MobilePhone : $existingUser.MobilePhone Department = $Department ? $Department : $existingUser.Department City = $City ? $City : $existingUser.City + MustChangePass = $MustChangePass } Invoke-CIPPRestMethod -Endpoint '/api/edituser' -Body $body -Method 'POST' -} \ No newline at end of file +} From 09aa11d18563c50719e32dc62087324460ade92b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20Kj=C3=A6rg=C3=A5rd?= Date: Wed, 13 Nov 2024 19:45:32 +0100 Subject: [PATCH 6/7] Add per user MFA function --- .../Users/Get-CIPPPerUserMFA.ps1 | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPPerUserMFA.ps1 diff --git a/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPPerUserMFA.ps1 b/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPPerUserMFA.ps1 new file mode 100644 index 0000000..1b06ab2 --- /dev/null +++ b/CIPPAPIModule/public/Identity/Administration/Users/Get-CIPPPerUserMFA.ps1 @@ -0,0 +1,50 @@ +<# +.SYNOPSIS + Retrieves the per-user Multi-Factor Authentication (MFA) status for a specified user or all users in a given customer tenant. + +.PARAMETER CustomerTenantID + The ID of the customer tenant for which to retrieve the per-user MFA status. This parameter is mandatory. + +.PARAMETER UserId + The ID of the user for whom to retrieve the per-user MFA status. This parameter is optional and is ignored if the AllUsers switch is specified. + Can be either the user's email address or the user's ID. + +.PARAMETER AllUsers + A switch parameter that, when specified, retrieves the per-user MFA status for all users in the specified customer tenant. If this switch is specified, the UserId parameter is ignored. + +.EXAMPLE + Get-CIPPPerUserMFA -CustomerTenantID "12345" -UserId "user@example.com" + Retrieves the per-user MFA status for the user with ID "user@example.com" in the customer tenant with ID "12345". + +.EXAMPLE + Get-CIPPPerUserMFA -CustomerTenantID "12345" -AllUsers + Retrieves the per-user MFA status for all users in the customer tenant with ID "12345". + +.NOTES + This function uses the Invoke-CIPPRestMethod cmdlet to make a GET request to the '/api/ListPerUserMFA' endpoint with the specified parameters. +#> +function Get-CIPPPerUserMFA { + [CmdletBinding()] + Param( + [Parameter(Mandatory = $true)] + [string]$CustomerTenantID, + [Parameter(Mandatory = $false)] + [string]$UserId, + [Parameter(Mandatory = $false)] + [switch]$AllUsers + ) + + if ($AllUsers.IsPresent -eq $true) { + Write-Verbose "Getting Per user MFA for all users in $CustomerTenantID" + } else { + Write-Verbose "Getting Per user MFA for $UserId in $CustomerTenantID" + } + + $endpoint = '/api/ListPerUserMFA' + $params = @{ + TenantFilter = $CustomerTenantID + userId = $UserId + allUsers = $AllUsers.IsPresent + } + Invoke-CIPPRestMethod -Endpoint $endpoint -Params $params -Method GET +} \ No newline at end of file From 726435bb18083183b85d403205208dfb1008c486 Mon Sep 17 00:00:00 2001 From: BNWEIN Date: Thu, 14 Nov 2024 08:42:31 +0000 Subject: [PATCH 7/7] Update to 1.1.8 1.1.8 --- CIPPAPIModule/CIPPAPIModule.psd1 | 2 +- Docs/Add-CIPPRoomMailbox.md | 34 +++++++++++++++++++++++++++ Docs/Add-CIPPSharedMailbox.md | 40 ++++++++++++++++++++++++++++++++ Docs/Get-CIPPPerUserMFA.md | 28 ++++++++++++++++++++++ README.md | 5 ++++ 5 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 Docs/Add-CIPPRoomMailbox.md create mode 100644 Docs/Add-CIPPSharedMailbox.md create mode 100644 Docs/Get-CIPPPerUserMFA.md diff --git a/CIPPAPIModule/CIPPAPIModule.psd1 b/CIPPAPIModule/CIPPAPIModule.psd1 index fe27223..376b265 100644 --- a/CIPPAPIModule/CIPPAPIModule.psd1 +++ b/CIPPAPIModule/CIPPAPIModule.psd1 @@ -12,7 +12,7 @@ RootModule = 'CIPPAPIModule.psm1' # Version number of this module. -ModuleVersion = '1.1.7' +ModuleVersion = '1.1.8' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/Docs/Add-CIPPRoomMailbox.md b/Docs/Add-CIPPRoomMailbox.md new file mode 100644 index 0000000..551716d --- /dev/null +++ b/Docs/Add-CIPPRoomMailbox.md @@ -0,0 +1,34 @@ +# Add-CIPPRoomMailbox +## SYNOPSIS +Adds a room mailbox to a specified tenant. + +## DESCRIPTION +This function adds a room mailbox to a specified tenant by calling the CIPP API endpoint '/api/AddRoomMailbox'. +It requires the tenant ID, display name, domain, and username as mandatory parameters. +Optionally, the resource capacity can also be specified. + +# PARAMETERS + +## **-CustomerTenantID** +> ![Type](https://img.shields.io/badge/Type-String-Blue?) ![Mandatory](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant where the room mailbox will be added. Either TenantID or Default domain can be used to identify the tenant. + +## **-DisplayName** +> ![Type](https://img.shields.io/badge/Type-String-Blue?) ![Mandatory](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The display name for the room mailbox. + +## **-Domain** +> ![Type](https://img.shields.io/badge/Type-String-Blue?) ![Mandatory](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The domain for the room mailbox. + +## **-Username** +> ![Type](https://img.shields.io/badge/Type-String-Blue?) ![Mandatory](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The username for the room mailbox. + +## **-ResourceCapacity** +> ![Type](https://img.shields.io/badge/Type-Int32-Blue?) ![Mandatory](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![DefaultValue](https://img.shields.io/badge/DefaultValue-0-Blue?color=5547a8) \ +The resource capacity for the room mailbox. This parameter is optional. + +#### EXAMPLE 1 +```powershell +Add-CIPPRoomMailbox -CustomerTenantID "7e3effb6-6efe-42f2-b071-48ce318eaf95" -DisplayName "Conference Room 1" -Domain "example.com" -Username "confroom1" -ResourceCapacity 10 diff --git a/Docs/Add-CIPPSharedMailbox.md b/Docs/Add-CIPPSharedMailbox.md new file mode 100644 index 0000000..28103fc --- /dev/null +++ b/Docs/Add-CIPPSharedMailbox.md @@ -0,0 +1,40 @@ +# Add-CIPPSharedMailbox +## SYNOPSIS +Adds a shared mailbox to a specified tenant. +## DESCRIPTION +This function adds a shared mailbox to a specified tenant using the provided tenant ID, display name, domain, and username. Optionally, additional aliases can be added. +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant where the shared mailbox will be added. This parameter is mandatory. Either TenantID or Default domain can be used to identify the tenant. + + ## **-DisplayName** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The display name for the shared mailbox. This parameter is mandatory. + + ## **-Domain** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The domain for the shared mailbox. This parameter is mandatory. + + ## **-Username** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The username for the shared mailbox. This parameter is mandatory. + + ## **-AddedAliases** +> ![Foo](https://img.shields.io/badge/Type-Array-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +An array of additional aliases to be added to the shared mailbox. This parameter is optional. + + #### EXAMPLE 1 +```powershell +PS > Add-CIPPSharedMailbox -CustomerTenantID "d6766bb9-44e0-4a4b-b8d0-3d9c4d1d15cc" -DisplayName "Support" -Domain "example.com" -Username "support" +``` + #### EXAMPLE 2 +```powershell +PS > Add-CIPPSharedMailbox -CustomerTenantID "example.com" -DisplayName "Support" -Domain "example.com" -Username "support" -AddedAliases "itsupport@example.com" +``` + #### EXAMPLE 3 +```powershell +PS > Add-CIPPSharedMailbox -CustomerTenantID "example.com" -DisplayName "Support" -Domain "example.com" -Username "support" -AddedAliases 'itsupport@example.com','helpdesk@example.com','sos@example.com' +``` + diff --git a/Docs/Get-CIPPPerUserMFA.md b/Docs/Get-CIPPPerUserMFA.md new file mode 100644 index 0000000..a082d46 --- /dev/null +++ b/Docs/Get-CIPPPerUserMFA.md @@ -0,0 +1,28 @@ +# Get-CIPPPerUserMFA +## SYNOPSIS +Retrieves the per-user Multi-Factor Authentication (MFA) status for a specified user or all users in a given customer tenant. +## DESCRIPTION + +# PARAMETERS + +## **-CustomerTenantID** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-TRUE-Red?) \ +The ID of the customer tenant for which to retrieve the per-user MFA status. This parameter is mandatory. + + ## **-UserId** +> ![Foo](https://img.shields.io/badge/Type-String-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) \ +The ID of the user for whom to retrieve the per-user MFA status. This parameter is optional and is ignored if the AllUsers switch is specified. Can be either the user's email address or the user's ID. + + ## **-AllUsers** +> ![Foo](https://img.shields.io/badge/Type-SwitchParameter-Blue?) ![Foo](https://img.shields.io/badge/Mandatory-FALSE-Green?) ![Foo](https://img.shields.io/badge/DefaultValue-False-Blue?color=5547a8)\ +A switch parameter that, when specified, retrieves the per-user MFA status for all users in the specified customer tenant. If this switch is specified, the UserId parameter is ignored. + + #### EXAMPLE 1 +```powershell +PS > Get-CIPPPerUserMFA -CustomerTenantID "12345" -UserId "user@example.com" +``` + #### EXAMPLE 2 +```powershell +PS > Get-CIPPPerUserMFA -CustomerTenantID "12345" -AllUsers +``` + diff --git a/README.md b/README.md index efae586..20dfdac 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,8 @@ Get-CIPPLogs - [Set-CIPPPasswordSettings](./Docs/Set-CIPPPasswordSettings.md) ## Email-Exchange - [Add-CIPPContact](./Docs/Add-CIPPContact.md) +- [Add-CIPPRoomMailbox](./Docs/Add-CIPPRoomMailbox.md) +- [Add-CIPPSharedMailbox](./Docs/Add-CIPPSharedMailbox.md) - [Get-CIPPCalendarPerms](./Docs/Get-CIPPCalendarPerms.md) - [Get-CIPPContacts](./Docs/Get-CIPPContacts.md) - [Get-CIPPEnabledSharedMailboxes](./Docs/Get-CIPPEnabledSharedMailboxes.md) @@ -149,6 +151,7 @@ Get-CIPPLogs - [Add-CIPPUser](./Docs/Add-CIPPUser.md) - [Get-CIPPBECCheck](./Docs/Get-CIPPBECCheck.md) - [Get-CIPPDeletedItems](./Docs/Get-CIPPDeletedItems.md) + - [Get-CIPPPerUserMFA](./Docs/Get-CIPPPerUserMFA.md) - [Get-CIPPUniversalSearch](./Docs/Get-CIPPUniversalSearch.md) - [Get-CIPPUserCAPolicies](./Docs/Get-CIPPUserCAPolicies.md) - [Get-CIPPUserCounts](./Docs/Get-CIPPUserCounts.md) @@ -177,6 +180,7 @@ Get-CIPPLogs - [Add-CIPPUser](./Docs/Add-CIPPUser.md) - [Get-CIPPBECCheck](./Docs/Get-CIPPBECCheck.md) - [Get-CIPPDeletedItems](./Docs/Get-CIPPDeletedItems.md) +- [Get-CIPPPerUserMFA](./Docs/Get-CIPPPerUserMFA.md) - [Get-CIPPUniversalSearch](./Docs/Get-CIPPUniversalSearch.md) - [Get-CIPPUserCAPolicies](./Docs/Get-CIPPUserCAPolicies.md) - [Get-CIPPUserCounts](./Docs/Get-CIPPUserCounts.md) @@ -363,3 +367,4 @@ Some example scripts can be found Below: Special thanks to [@KelvinTegelaar](https://github.com/KelvinTegelaar/), [@JohnDuprey](https://github.com/JohnDuprey/), [@rvdwegen](https://github.com/rvdwegen) and [@Jr7468](https://github.com/Jr7468/). I Could not have got this far without you! +