diff --git a/CHANGELOG.md b/CHANGELOG.md index 53037ae7c0..e935868ca2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ # UNRELEASED +* EXOCalendarProcessing + * Initial release. * DEPENDENCIES * Updated MSCloudLoginAssistant to version 1.0.121. diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCalendarProcessing/MSFT_EXOCalendarProcessing.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCalendarProcessing/MSFT_EXOCalendarProcessing.psm1 new file mode 100644 index 0000000000..42d22ac99c --- /dev/null +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCalendarProcessing/MSFT_EXOCalendarProcessing.psm1 @@ -0,0 +1,930 @@ +function Get-TargetResource +{ + [CmdletBinding()] + [OutputType([System.Collections.Hashtable])] + param + ( + [Parameter(Mandatory = $true)] + [System.String] + $Identity, + + [Parameter()] + [System.Boolean] + $AddAdditionalResponse, + + [Parameter()] + [System.String] + $AdditionalResponse, + + [Parameter()] + [System.Boolean] + $AddNewRequestsTentatively, + + [Parameter()] + [System.Boolean] + $AddOrganizerToSubject, + + [Parameter()] + [System.Boolean] + $AllBookInPolicy, + + [Parameter()] + [System.Boolean] + $AllowConflicts, + + [Parameter()] + [System.Boolean] + $AllowRecurringMeetings, + + [Parameter()] + [System.Boolean] + $AllRequestInPolicy, + + [Parameter()] + [System.Boolean] + $AllRequestOutOfPolicy, + + [Parameter()] + [ValidateSet("None", "AutoUpdate", "AutoAccept")] + [System.String] + $AutomateProcessing, + + [Parameter()] + [ValidateSet("Standard", "Reserved")] + [System.String] + $BookingType, + + [Parameter()] + [ValidateRange(0,1080)] + [System.UInt32] + $BookingWindowInDays = 180, + + [Parameter()] + [System.String[]] + $BookInPolicy, + + [Parameter()] + [System.UInt32] + $ConflictPercentageAllowed, + + [Parameter()] + [System.Boolean] + $DeleteAttachments, + + [Parameter()] + [System.Boolean] + $DeleteComments, + + [Parameter()] + [System.Boolean] + $DeleteNonCalendarItems, + + [Parameter()] + [System.Boolean] + $DeleteSubject, + + [Parameter()] + [System.Boolean] + $EnableAutoRelease, + + [Parameter()] + [System.Boolean] + $EnableResponseDetails, + + [Parameter()] + [System.Boolean] + $EnforceCapacity, + + [Parameter()] + [System.Boolean] + $EnforceSchedulingHorizon, + + [Parameter()] + [System.Boolean] + $ForwardRequestsToDelegates, + + [Parameter()] + [System.UInt32] + $MaximumConflictInstances, + + [Parameter()] + [System.UInt32] + $MaximumDurationInMinutes, + + [Parameter()] + [System.UInt32] + $MinimumDurationInMinutes, + + [Parameter()] + [System.Boolean] + $OrganizerInfo, + + [Parameter()] + [System.UInt32] + $PostReservationMaxClaimTimeInMinutes, + + [Parameter()] + [System.Boolean] + $ProcessExternalMeetingMessages, + + [Parameter()] + [System.Boolean] + $RemoveCanceledMeetings, + + [Parameter()] + [System.Boolean] + $RemoveForwardedMeetingNotifications, + + [Parameter()] + [System.Boolean] + $RemoveOldMeetingMessages, + + [Parameter()] + [System.Boolean] + $RemovePrivateProperty, + + [Parameter()] + [System.String[]] + $RequestInPolicy, + + [Parameter()] + [System.String[]] + $RequestOutOfPolicy, + + [Parameter()] + [System.String[]] + $ResourceDelegates, + + [Parameter()] + [System.Boolean] + $ScheduleOnlyDuringWorkHours, + + [Parameter()] + [System.Boolean] + $TentativePendingApproval, + + [Parameter()] + [ValidateSet('Present', 'Absent')] + [System.String] + $Ensure = 'Present', + + [Parameter()] + [System.Management.Automation.PSCredential] + $Credential, + + [Parameter()] + [System.String] + $ApplicationId, + + [Parameter()] + [System.String] + $TenantId, + + [Parameter()] + [System.String] + $CertificateThumbprint, + + [Parameter()] + [System.String] + $CertificatePath, + + [Parameter()] + [System.Management.Automation.PSCredential] + $CertificatePassword, + + [Parameter()] + [Switch] + $ManagedIdentity + ) + + if ($Global:CurrentModeIsExport) + { + $ConnectionMode = New-M365DSCConnection -Workload 'ExchangeOnline' ` + -InboundParameters $PSBoundParameters ` + -SkipModuleReload $true + } + else + { + $ConnectionMode = New-M365DSCConnection -Workload 'ExchangeOnline' ` + -InboundParameters $PSBoundParameters + } + + #Ensure the proper dependencies are installed in the current environment. + Confirm-M365DSCDependencies + + #region Telemetry + $ResourceName = $MyInvocation.MyCommand.ModuleName -replace 'MSFT_', '' + $CommandName = $MyInvocation.MyCommand + $data = Format-M365DSCTelemetryParameters -ResourceName $ResourceName ` + -CommandName $CommandName ` + -Parameters $PSBoundParameters + Add-M365DSCTelemetryEvent -Data $data + #endregion + Write-Verbose -Message "Getting configuration of Calendar Processing settings for $Identity" + + $nullReturn = $PSBoundParameters + $nullReturn.Ensure = 'Absent' + + try + { + $calendarProc = Get-CalendarProcessing -Identity $Identity -ErrorAction SilentlyContinue + + if ($null -eq $calendarProc) + { + Write-Verbose -Message "Calendar processing settings for $($Identity) does not exist." + return $nullReturn + } + + $RequestInPolicyValue = @() + if ($null -ne $calendarProc.RequestInPolicy) + { + foreach ($user in $calendarProc.RequestInPolicy) + { + $userInfo = Get-User -Identity $user + $RequestInPolicyValue += $userInfo.UserPrincipalName + } + } + + $RequestOutPolicyValue = @() + if ($null -ne $calendarProc.RequestOutPolicy) + { + foreach ($user in $calendarProc.RequestOutPolicy) + { + $userInfo = Get-User -Identity $user + $RequestOutPolicyValue += $userInfo.UserPrincipalName + } + } + + $ResourceDelegatesValue = @() + if ($null -ne $calendarProc.ResourceDelegates) + { + foreach ($user in $calendarProc.ResourceDelegates) + { + $userInfo = Get-User -Identity $user + $ResourceDelegatesValue += $userInfo.UserPrincipalName + } + } + + $result = @{ + Identity = $calendarProc.Identity + AddAdditionalResponse = $calendarProc.AddAdditionalResponse + AdditionalResponse = $calendarProc.AdditionalResponse + AddNewRequestsTentatively = $calendarProc.AddNewRequestsTentatively + AddOrganizerToSubject = $calendarProc.AddOrganizerToSubject + AllBookInPolicy = $calendarProc.AllBookInPolicy + AllowConflicts = $calendarProc.AllowConflicts + AllowRecurringMeetings = $calendarProc.AllowRecurringMeetings + AllRequestInPolicy = $calendarProc.AllRequestInPolicy + AllRequestOutOfPolicy = $calendarProc.AllRequestOutOfPolicy + AutomateProcessing = $calendarProc.AutomateProcessing + BookingType = $calendarProc.BookingType + BookingWindowInDays = $calendarProc.BookingWindowInDays + BookInPolicy = [Array]$calendarProc.BookInPolicy + ConflictPercentageAllowed = $calendarProc.ConflictPercentageAllowed + DeleteAttachments = $calendarProc.DeleteAttachments + DeleteComments = $calendarProc.DeleteComments + DeleteNonCalendarItems = $calendarProc.DeleteNonCalendarItems + DeleteSubject = $calendarProc.DeleteSubject + EnableAutoRelease = $calendarProc.EnableAutoRelease + EnableResponseDetails = $calendarProc.EnableResponseDetails + EnforceCapacity = $calendarProc.EnforceCapacity + EnforceSchedulingHorizon = $calendarProc.EnforceSchedulingHorizon + ForwardRequestsToDelegates = $calendarProc.ForwardRequestsToDelegates + MaximumConflictInstances = $calendarProc.MaximumConflictInstances + MaximumDurationInMinutes = $calendarProc.MaximumDurationInMinutes + MinimumDurationInMinutes = $calendarProc.MinimumDurationInMinutes + OrganizerInfo = $calendarProc.OrganizerInfo + PostReservationMaxClaimTimeInMinutes = $calendarProc.PostReservationMaxClaimTimeInMinutes + ProcessExternalMeetingMessages = $calendarProc.ProcessExternalMeetingMessages + RemoveCanceledMeetings = $calendarProc.RemoveCanceledMeetings + RemoveForwardedMeetingNotifications = $calendarProc.RemoveForwardedMeetingNotifications + RemoveOldMeetingMessages = $calendarProc.RemoveOldMeetingMessages + RemovePrivateProperty = $calendarProc.RemovePrivateProperty + RequestInPolicy = $RequestInPolicyValue + RequestOutOfPolicy = $RequestOutOfPolicyValue + ResourceDelegates = $ResourceDelegatesValue + ScheduleOnlyDuringWorkHours = $calendarProc.ScheduleOnlyDuringWorkHours + TentativePendingApproval = $calendarProc.TentativePendingApproval + Ensure = 'Present' + Credential = $Credential + ApplicationId = $ApplicationId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + Managedidentity = $ManagedIdentity.IsPresent + TenantId = $TenantId + } + + Write-Verbose -Message "Found Availability Config for $($OrgWideAccount)" + return $result + } + catch + { + New-M365DSCLogEntry -Message 'Error retrieving data:' ` + -Exception $_ ` + -Source $($MyInvocation.MyCommand.Source) ` + -TenantId $TenantId ` + -Credential $Credential + + return $nullReturn + } +} + +function Set-TargetResource +{ + [CmdletBinding()] + param + ( + [Parameter(Mandatory = $true)] + [System.String] + $Identity, + + [Parameter()] + [System.Boolean] + $AddAdditionalResponse, + + [Parameter()] + [System.String] + $AdditionalResponse, + + [Parameter()] + [System.Boolean] + $AddNewRequestsTentatively, + + [Parameter()] + [System.Boolean] + $AddOrganizerToSubject, + + [Parameter()] + [System.Boolean] + $AllBookInPolicy, + + [Parameter()] + [System.Boolean] + $AllowConflicts, + + [Parameter()] + [System.Boolean] + $AllowRecurringMeetings, + + [Parameter()] + [System.Boolean] + $AllRequestInPolicy, + + [Parameter()] + [System.Boolean] + $AllRequestOutOfPolicy, + + [Parameter()] + [ValidateSet("None", "AutoUpdate", "AutoAccept")] + [System.String] + $AutomateProcessing, + + [Parameter()] + [ValidateSet("Standard", "Reserved")] + [System.String] + $BookingType, + + [Parameter()] + [ValidateRange(0,1080)] + [System.UInt32] + $BookingWindowInDays = 180, + + [Parameter()] + [System.String[]] + $BookInPolicy, + + [Parameter()] + [System.UInt32] + $ConflictPercentageAllowed, + + [Parameter()] + [System.Boolean] + $DeleteAttachments, + + [Parameter()] + [System.Boolean] + $DeleteComments, + + [Parameter()] + [System.Boolean] + $DeleteNonCalendarItems, + + [Parameter()] + [System.Boolean] + $DeleteSubject, + + [Parameter()] + [System.Boolean] + $EnableAutoRelease, + + [Parameter()] + [System.Boolean] + $EnableResponseDetails, + + [Parameter()] + [System.Boolean] + $EnforceCapacity, + + [Parameter()] + [System.Boolean] + $EnforceSchedulingHorizon, + + [Parameter()] + [System.Boolean] + $ForwardRequestsToDelegates, + + [Parameter()] + [System.UInt32] + $MaximumConflictInstances, + + [Parameter()] + [System.UInt32] + $MaximumDurationInMinutes, + + [Parameter()] + [System.UInt32] + $MinimumDurationInMinutes, + + [Parameter()] + [System.Boolean] + $OrganizerInfo, + + [Parameter()] + [System.UInt32] + $PostReservationMaxClaimTimeInMinutes, + + [Parameter()] + [System.Boolean] + $ProcessExternalMeetingMessages, + + [Parameter()] + [System.Boolean] + $RemoveCanceledMeetings, + + [Parameter()] + [System.Boolean] + $RemoveForwardedMeetingNotifications, + + [Parameter()] + [System.Boolean] + $RemoveOldMeetingMessages, + + [Parameter()] + [System.Boolean] + $RemovePrivateProperty, + + [Parameter()] + [System.String[]] + $RequestInPolicy, + + [Parameter()] + [System.String[]] + $RequestOutOfPolicy, + + [Parameter()] + [System.String[]] + $ResourceDelegates, + + [Parameter()] + [System.Boolean] + $ScheduleOnlyDuringWorkHours, + + [Parameter()] + [System.Boolean] + $TentativePendingApproval, + + [Parameter()] + [ValidateSet('Present', 'Absent')] + [System.String] + $Ensure = 'Present', + + [Parameter()] + [System.Management.Automation.PSCredential] + $Credential, + + [Parameter()] + [System.String] + $ApplicationId, + + [Parameter()] + [System.String] + $TenantId, + + [Parameter()] + [System.String] + $CertificateThumbprint, + + [Parameter()] + [System.String] + $CertificatePath, + + [Parameter()] + [System.Management.Automation.PSCredential] + $CertificatePassword, + + [Parameter()] + [Switch] + $ManagedIdentity + ) + + #Ensure the proper dependencies are installed in the current environment. + Confirm-M365DSCDependencies + + #region Telemetry + $ResourceName = $MyInvocation.MyCommand.ModuleName -replace 'MSFT_', '' + $CommandName = $MyInvocation.MyCommand + $data = Format-M365DSCTelemetryParameters -ResourceName $ResourceName ` + -CommandName $CommandName ` + -Parameters $PSBoundParameters + Add-M365DSCTelemetryEvent -Data $data + #endregion + + $currentValues = Get-TargetResource @PSBoundParameters + + if ($null -ne $currentValues) + { + Write-Verbose -Message "Setting configuration of Calendar Processing for $Identity" + } + else + { + return + } + + $ConnectionMode = New-M365DSCConnection -Workload 'ExchangeOnline' ` + -InboundParameters $PSBoundParameters + + $UpdateParameters = ([Hashtable]$PSBoundParameters).Clone() + $UpdateParameters.Remove("Ensure") | Out-Null + $UpdateParameters.Remove("Credential") | Out-Null + $UpdateParameters.Remove("ApplicationId") | Out-Null + $UpdateParameters.Remove("TenantId") | Out-Null + $UpdateParameters.Remove("CertificateThumbprint") | Out-Null + $UpdateParameters.Remove("ApplicationSecret") | Out-Null + $UpdateParameters.Remove("CertificatePath") | Out-Null + $UpdateParameters.Remove("CertificatePassword") | Out-Null + $UpdateParameters.Remove("ManagedIdentity") | Out-Null + + # Some parameters can only be applied to Resource Mailboxes + if ($UpdateParameters.ContainsKey('AddNewRequestsTentatively')) + { + $mailbox = Get-Mailbox $UpdateParameters.Identity + if ($mailbox.RecipientTypeDetails -ne 'EquipmentMailbox' -and $mailbox.RecipientTypeDetails -ne 'RoomMailbox') + { + Write-Verbose -Message "Removing the AddNewRequestsTentatively parameter because the mailbox is not a resource one." + $UpdateParameters.Remove("AddNewRequestsTentatively") | Out-Null + + Write-Verbose -Message "Removing the BookingType parameter because the mailbox is not a resource one." + $UpdateParameters.Remove("BookingType") | Out-Null + + Write-Verbose -Message "Removing the ProcessExternalMeetingMessages parameter because the mailbox is not a resource one." + $UpdateParameters.Remove("ProcessExternalMeetingMessages") | Out-Null + } + } + + Set-CalendarProcessing @UpdateParameters +} + +function Test-TargetResource +{ + [CmdletBinding()] + [OutputType([System.Boolean])] + param + ( + [Parameter(Mandatory = $true)] + [System.String] + $Identity, + + [Parameter()] + [System.Boolean] + $AddAdditionalResponse, + + [Parameter()] + [System.String] + $AdditionalResponse, + + [Parameter()] + [System.Boolean] + $AddNewRequestsTentatively, + + [Parameter()] + [System.Boolean] + $AddOrganizerToSubject, + + [Parameter()] + [System.Boolean] + $AllBookInPolicy, + + [Parameter()] + [System.Boolean] + $AllowConflicts, + + [Parameter()] + [System.Boolean] + $AllowRecurringMeetings, + + [Parameter()] + [System.Boolean] + $AllRequestInPolicy, + + [Parameter()] + [System.Boolean] + $AllRequestOutOfPolicy, + + [Parameter()] + [ValidateSet("None", "AutoUpdate", "AutoAccept")] + [System.String] + $AutomateProcessing, + + [Parameter()] + [ValidateSet("Standard", "Reserved")] + [System.String] + $BookingType, + + [Parameter()] + [ValidateRange(0,1080)] + [System.UInt32] + $BookingWindowInDays = 180, + + [Parameter()] + [System.String[]] + $BookInPolicy, + + [Parameter()] + [System.UInt32] + $ConflictPercentageAllowed, + + [Parameter()] + [System.Boolean] + $DeleteAttachments, + + [Parameter()] + [System.Boolean] + $DeleteComments, + + [Parameter()] + [System.Boolean] + $DeleteNonCalendarItems, + + [Parameter()] + [System.Boolean] + $DeleteSubject, + + [Parameter()] + [System.Boolean] + $EnableAutoRelease, + + [Parameter()] + [System.Boolean] + $EnableResponseDetails, + + [Parameter()] + [System.Boolean] + $EnforceCapacity, + + [Parameter()] + [System.Boolean] + $EnforceSchedulingHorizon, + + [Parameter()] + [System.Boolean] + $ForwardRequestsToDelegates, + + [Parameter()] + [System.UInt32] + $MaximumConflictInstances, + + [Parameter()] + [System.UInt32] + $MaximumDurationInMinutes, + + [Parameter()] + [System.UInt32] + $MinimumDurationInMinutes, + + [Parameter()] + [System.Boolean] + $OrganizerInfo, + + [Parameter()] + [System.UInt32] + $PostReservationMaxClaimTimeInMinutes, + + [Parameter()] + [System.Boolean] + $ProcessExternalMeetingMessages, + + [Parameter()] + [System.Boolean] + $RemoveCanceledMeetings, + + [Parameter()] + [System.Boolean] + $RemoveForwardedMeetingNotifications, + + [Parameter()] + [System.Boolean] + $RemoveOldMeetingMessages, + + [Parameter()] + [System.Boolean] + $RemovePrivateProperty, + + [Parameter()] + [System.String[]] + $RequestInPolicy, + + [Parameter()] + [System.String[]] + $RequestOutOfPolicy, + + [Parameter()] + [System.String[]] + $ResourceDelegates, + + [Parameter()] + [System.Boolean] + $ScheduleOnlyDuringWorkHours, + + [Parameter()] + [System.Boolean] + $TentativePendingApproval, + + [Parameter()] + [ValidateSet('Present', 'Absent')] + [System.String] + $Ensure = 'Present', + + [Parameter()] + [System.Management.Automation.PSCredential] + $Credential, + + [Parameter()] + [System.String] + $ApplicationId, + + [Parameter()] + [System.String] + $TenantId, + + [Parameter()] + [System.String] + $CertificateThumbprint, + + [Parameter()] + [System.String] + $CertificatePath, + + [Parameter()] + [System.Management.Automation.PSCredential] + $CertificatePassword, + + [Parameter()] + [Switch] + $ManagedIdentity + ) + #Ensure the proper dependencies are installed in the current environment. + Confirm-M365DSCDependencies + + #region Telemetry + $ResourceName = $MyInvocation.MyCommand.ModuleName -replace 'MSFT_', '' + $CommandName = $MyInvocation.MyCommand + $data = Format-M365DSCTelemetryParameters -ResourceName $ResourceName ` + -CommandName $CommandName ` + -Parameters $PSBoundParameters + Add-M365DSCTelemetryEvent -Data $data + #endregion + + Write-Verbose -Message "Testing configuration of Calendar Processing for account $Identity" + + $CurrentValues = Get-TargetResource @PSBoundParameters + + Write-Verbose -Message "Current Values: $(Convert-M365DscHashtableToString -Hashtable $CurrentValues)" + Write-Verbose -Message "Target Values: $(Convert-M365DscHashtableToString -Hashtable $PSBoundParameters)" + + $ValuesToCheck = $PSBoundParameters + + $DesiredValues = $PSBoundParameters + + $TestResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` + -Source $($MyInvocation.MyCommand.Source) ` + -DesiredValues $DesiredValues ` + -ValuesToCheck $ValuesToCheck.Keys + + Write-Verbose -Message "Test-TargetResource returned $TestResult" + + return $TestResult +} + +function Export-TargetResource +{ + [CmdletBinding()] + [OutputType([System.String])] + param + ( + [Parameter()] + [System.Management.Automation.PSCredential] + $Credential, + + [Parameter()] + [System.String] + $ApplicationId, + + [Parameter()] + [System.String] + $TenantId, + + [Parameter()] + [System.String] + $CertificateThumbprint, + + [Parameter()] + [System.String] + $CertificatePath, + + [Parameter()] + [System.Management.Automation.PSCredential] + $CertificatePassword, + + [Parameter()] + [Switch] + $ManagedIdentity + ) + $ConnectionMode = New-M365DSCConnection -Workload 'ExchangeOnline' ` + -InboundParameters $PSBoundParameters ` + -SkipModuleReload $true + + #Ensure the proper dependencies are installed in the current environment. + Confirm-M365DSCDependencies + + #region Telemetry + $ResourceName = $MyInvocation.MyCommand.ModuleName -replace 'MSFT_', '' + $CommandName = $MyInvocation.MyCommand + $data = Format-M365DSCTelemetryParameters -ResourceName $ResourceName ` + -CommandName $CommandName ` + -Parameters $PSBoundParameters + Add-M365DSCTelemetryEvent -Data $data + #endregion + + try + { + $mailboxes = Get-Mailbox -ErrorAction Stop + + if ($null -eq $mailboxes) + { + Write-Host $Global:M365DSCEmojiGreenCheckMark + return '' + } + else + { + Write-Host "`r`n" -NoNewline + } + + $i = 1 + foreach ($mailbox in $mailboxes) + { + Write-Host " |---[$i/$($mailboxes.Count)] $($mailbox.Identity.Split('-')[0])" -NoNewline + $Params = @{ + Identity = $mailbox.UserPrincipalName + Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePassword = $CertificatePassword + Managedidentity = $ManagedIdentity.IsPresent + CertificatePath = $CertificatePath + } + $Results = Get-TargetResource @Params + $Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode ` + -Results $Results + $currentDSCBlock = Get-M365DSCExportContentForResource -ResourceName $ResourceName ` + -ConnectionMode $ConnectionMode ` + -ModulePath $PSScriptRoot ` + -Results $Results ` + -Credential $Credential + $dscContent += $currentDSCBlock + + Save-M365DSCPartialExport -Content $currentDSCBlock ` + -FileName $Global:PartialExportFileName + Write-Host $Global:M365DSCEmojiGreenCheckMark + $i++ + } + + + return $dscContent + } + catch + { + Write-Host $Global:M365DSCEmojiRedX + + New-M365DSCLogEntry -Message 'Error during Export:' ` + -Exception $_ ` + -Source $($MyInvocation.MyCommand.Source) ` + -TenantId $TenantId ` + -Credential $Credential + + return '' + } +} + +Export-ModuleMember -Function *-TargetResource diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCalendarProcessing/MSFT_EXOCalendarProcessing.schema.mof b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCalendarProcessing/MSFT_EXOCalendarProcessing.schema.mof new file mode 100644 index 0000000000..e6a16198d6 --- /dev/null +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCalendarProcessing/MSFT_EXOCalendarProcessing.schema.mof @@ -0,0 +1,50 @@ +[ClassVersion("1.0.0.0"), FriendlyName("EXOCalendarProcessing")] +class MSFT_EXOCalendarProcessing : OMI_BaseResource +{ + [Key, Description("The Identity parameter specifies the resource mailbox that you want to view. You can use any value that uniquely identifies the mailbox.")] String Identity; + [Write, Description("The AddAdditionalResponse parameter specifies whether additional information (the value of the AdditionalResponse parameter) is added to meeting request responses")] Boolean AddAdditionalResponse; + [Write, Description("The AdditionalResponse parameter specifies the additional information to be included in responses to meeting requests when the value of the AddAdditionalResponse parameter is $true. If the value contains spaces, enclose the value in quotation marks.")] String AdditionalResponse; + [Write, Description("The AddNewRequestsTentatively parameter specifies whether new meeting requests are added to the calendar as tentative")] Boolean AddNewRequestsTentatively; + [Write, Description("The AddOrganizerToSubject parameter specifies whether the meeting organizer's name is used as the subject of the meeting request.")] Boolean AddOrganizerToSubject; + [Write, Description("The AllBookInPolicy parameter specifies whether to automatically approve in-policy requests from all users to the resource mailbox.")] Boolean AllBookInPolicy; + [Write, Description("The AllowConflicts parameter specifies whether to allow conflicting meeting requests.")] Boolean AllowConflicts; + [Write, Description("The AllowRecurringMeetings parameter specifies whether to allow recurring meetings in meeting requests.")] Boolean AllowRecurringMeetings; + [Write, Description("The AllRequestInPolicy parameter specifies whether to allow all users to submit in-policy requests to the resource mailbox.")] Boolean AllRequestInPolicy; + [Write, Description("The AllRequestOutOfPolicy parameter specifies whether to allow all users to submit out-of-policy requests to the resource mailbox.")] Boolean AllRequestOutOfPolicy; + [Write, Description("The AutomateProcessing parameter enables or disables calendar processing on the mailbox."), ValueMap{"None","AutoUpdate","AutoAccept"}, Values{"None","AutoUpdate","AutoAccept"}] String AutomateProcessing; + [Write, Description("The BookingType parameter specifies how reservations work on the resource mailbox."), ValueMap{"Standard","Reserved"}, Values{"Standard","Reserved"}] String BookingType; + [Write, Description("The BookingWindowInDays parameter specifies the maximum number of days in advance that the resource can be reserved. A valid value is an integer from 0 through 1080. The default value is 180 days. The value 0 means today.")] UInt32 BookingWindowInDays; + [Write, Description("The BookInPolicy parameter specifies users or groups who are allowed to submit in-policy meeting requests to the resource mailbox that are automatically approved. You can use any value that uniquely identifies the user or group.")] String BookInPolicy[]; + [Write, Description("The ConflictPercentageAllowed parameter specifies the maximum percentage of meeting conflicts for new recurring meeting requests. A valid value is an integer from 0 through 100. The default value is 0.")] UInt32 ConflictPercentageAllowed; + [Write, Description("The DeleteAttachments parameter specifies whether to remove attachments from all incoming messages.")] Boolean DeleteAttachments; + [Write, Description("The DeleteComments parameter specifies whether to remove or keep any text in the message body of incoming meeting requests.")] Boolean DeleteComments; + [Write, Description("The DeleteNonCalendarItems parameter specifies whether to remove or keep all non-calendar-related messages that are received by the resource mailbox.")] Boolean DeleteNonCalendarItems; + [Write, Description("The DeleteSubject parameter specifies whether to remove or keep the subject of incoming meeting requests. ")] Boolean DeleteSubject; + [Write, Description("N/A")] Boolean EnableAutoRelease; + [Write, Description("The EnableResponseDetails parameter specifies whether to include the reasons for accepting or declining a meeting in the response email message.")] Boolean EnableResponseDetails; + [Write, Description("The EnforceCapacity parameter specifies whether to restrict the number of attendees to the capacity of the workspace. For example, if capacity is set to 10, then only 10 people can book the workspace.")] Boolean EnforceCapacity; + [Write, Description("The EnforceSchedulingHorizon parameter controls the behavior of recurring meetings that extend beyond the date specified by the BookingWindowInDays parameter.")] Boolean EnforceSchedulingHorizon; + [Write, Description("The ForwardRequestsToDelegates parameter specifies whether to forward incoming meeting requests to the delegates that are configured for the resource mailbox.")] Boolean ForwardRequestsToDelegates; + [Write, Description("The MaximumConflictInstances parameter specifies the maximum number of conflicts for new recurring meeting requests when the AllowRecurringMeetings parameter is set to $true. A valid value is an integer from 0 through INT32 (2147483647). The default value is 0.")] UInt32 MaximumConflictInstances; + [Write, Description("The MaximumDurationInMinutes parameter specifies the maximum duration in minutes for meeting requests. A valid value is an integer from 0 through INT32 (2147483647). The default value is 1440 (24 hours).")] UInt32 MaximumDurationInMinutes; + [Write, Description("The MinimumDurationInMinutes parameter specifies the minimum duration in minutes for meeting requests in workspace mailboxes. A valid value is an integer from 0 through INT32 (2147483647). The default value is 0, which means there is no minimum duration.")] UInt32 MinimumDurationInMinutes; + [Write, Description("The OrganizerInfo parameter specifies whether the resource mailbox sends organizer information when a meeting request is declined because of conflicts.")] Boolean OrganizerInfo; + [Write, Description("N/A")] UInt32 PostReservationMaxClaimTimeInMinutes; + [Write, Description("The ProcessExternalMeetingMessages parameter specifies whether to process meeting requests that originate outside the Exchange organization.")] Boolean ProcessExternalMeetingMessages; + [Write, Description("The RemoveCanceledMeetings parameter specifies whether to automatically delete meetings that were cancelled by the organizer from the resource mailbox's calendar. ")] Boolean RemoveCanceledMeetings; + [Write, Description("The RemoveForwardedMeetingNotifications parameter specifies whether forwarded meeting notifications are moved to the Deleted Items folder after they're processed by the Calendar Attendant. ")] Boolean RemoveForwardedMeetingNotifications; + [Write, Description("The RemoveOldMeetingMessages parameter specifies whether the Calendar Attendant removes old and redundant updates and responses.")] Boolean RemoveOldMeetingMessages; + [Write, Description("The RemovePrivateProperty parameter specifies whether to clear the private flag for incoming meetings that were sent by the organizer in the original requests. ")] Boolean RemovePrivateProperty; + [Write, Description("The RemovePrivateProperty parameter specifies whether to clear the private flag for incoming meetings that were sent by the organizer in the original requests. ")] String RequestInPolicy[]; + [Write, Description("The RequestOutOfPolicy parameter specifies users who are allowed to submit out-of-policy requests that require approval by a resource mailbox delegate. You can use any value that uniquely identifies the user. ")] String RequestOutOfPolicy[]; + [Write, Description("The ResourceDelegates parameter specifies users can approve or reject requests that are sent to the resource mailbox. You can use any value that uniquely identifies the user. ")] String ResourceDelegates[]; + [Write, Description("The ScheduleOnlyDuringWorkHours parameter specifies whether to allow meetings to be scheduled outside of the working hours that are defined for the resource mailbox.")] Boolean ScheduleOnlyDuringWorkHours; + [Write, Description("The TentativePendingApproval parameter specifies whether to mark pending requests as tentative on the calendar.")] Boolean TentativePendingApproval;[Write, Description("Credentials of the Exchange Global Admin"), EmbeddedInstance("MSFT_Credential")] string Credential; + [Write, Description("Determines wether or not the instance exist."), ValueMap{"Present"}, Values{"Present"}] String Ensure; + [Write, Description("Id of the Azure Active Directory application to authenticate with.")] String ApplicationId; + [Write, Description("Id of the Azure Active Directory tenant used for authentication.")] String TenantId; + [Write, Description("Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.")] String CertificateThumbprint; + [Write, Description("Username can be made up to anything but password will be used for CertificatePassword"), EmbeddedInstance("MSFT_Credential")] String CertificatePassword; + [Write, Description("Path to certificate used in service principal usually a PFX file.")] String CertificatePath; + [Write, Description("Managed ID being used for authentication.")] Boolean ManagedIdentity; +}; diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCalendarProcessing/readme.md b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCalendarProcessing/readme.md new file mode 100644 index 0000000000..ff85c4d1ca --- /dev/null +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCalendarProcessing/readme.md @@ -0,0 +1,5 @@ +# EXOCalendarProcessing + +## Description + +This resource configures the Calendar Processing settings Exchange Online. diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCalendarProcessing/settings.json b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCalendarProcessing/settings.json new file mode 100644 index 0000000000..7fc3b9d5d9 --- /dev/null +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOCalendarProcessing/settings.json @@ -0,0 +1,34 @@ +{ + "resourceName": "EXOCalendarProcessing", + "description": "", + "roles": { + "read": [ + "Global Reader" + ], + "update": [ + "Exchange Administrator" + ] + }, + "permissions": { + "graph": { + "delegated": { + "read": [], + "update": [] + }, + "application": { + "read": [], + "update": [] + } + }, + "exchange": { + "requiredroles": [ + "Organization Management", + "Recipient Management" + ], + "requiredrolegroups": [ + "Organization Management", + "Help Desk" + ] + } + } +} diff --git a/Modules/Microsoft365DSC/Examples/Resources/EXOCalendarProcessing/1-ConfigureCalendarProcessing.ps1 b/Modules/Microsoft365DSC/Examples/Resources/EXOCalendarProcessing/1-ConfigureCalendarProcessing.ps1 new file mode 100644 index 0000000000..8dd79a6a6e --- /dev/null +++ b/Modules/Microsoft365DSC/Examples/Resources/EXOCalendarProcessing/1-ConfigureCalendarProcessing.ps1 @@ -0,0 +1,61 @@ +<# +This example is used to test new resources and showcase the usage of new resources being worked on. +It is not meant to use as a production baseline. +#> + +Configuration Example +{ + param + ( + [Parameter(Mandatory = $true)] + [PSCredential] + $credsCredential + ) + Import-DscResource -ModuleName Microsoft365DSC + + node localhost + { + EXOCalendarProcessing "CalendarProcessing" + { + AddAdditionalResponse = $False; + AddNewRequestsTentatively = $True; + AddOrganizerToSubject = $True; + AllBookInPolicy = $True; + AllowConflicts = $False; + AllowRecurringMeetings = $True; + AllRequestInPolicy = $False; + AllRequestOutOfPolicy = $False; + AutomateProcessing = "AutoUpdate"; + BookingType = "Standard"; + BookingWindowInDays = 180; + BookInPolicy = @(); + ConflictPercentageAllowed = 0; + Credential = $credsCredential; + DeleteAttachments = $True; + DeleteComments = $True; + DeleteNonCalendarItems = $True; + DeleteSubject = $True; + EnableAutoRelease = $False; + EnableResponseDetails = $True; + EnforceCapacity = $False; + EnforceSchedulingHorizon = $True; + Ensure = "Present"; + ForwardRequestsToDelegates = $True; + Identity = "John.Smith"; + MaximumConflictInstances = 0; + MaximumDurationInMinutes = 1440; + MinimumDurationInMinutes = 0; + OrganizerInfo = $True; + PostReservationMaxClaimTimeInMinutes = 10; + ProcessExternalMeetingMessages = $False; + RemoveCanceledMeetings = $False; + RemoveForwardedMeetingNotifications = $False; + RemoveOldMeetingMessages = $False; + RemovePrivateProperty = $True; + RequestInPolicy = @("Bob.Houle@$OrganizationName"); + ResourceDelegates = @(); + ScheduleOnlyDuringWorkHours = $False; + TentativePendingApproval = $True; + } + } +} diff --git a/Modules/Microsoft365DSC/Modules/M365DSCReverse.psm1 b/Modules/Microsoft365DSC/Modules/M365DSCReverse.psm1 index 02b41c4c13..7c3d9e9d6d 100644 --- a/Modules/Microsoft365DSC/Modules/M365DSCReverse.psm1 +++ b/Modules/Microsoft365DSC/Modules/M365DSCReverse.psm1 @@ -711,6 +711,10 @@ function Start-M365DSCConfigurationExtract Write-Host "]: $($issue.InstanceName)" } } + else + { + Write-Host "No conflicts detected" -NoNewLine + } } $shouldOpenOutputDirectory = $false diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOCalendarProcessing.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOCalendarProcessing.Tests.ps1 new file mode 100644 index 0000000000..1e462b4268 --- /dev/null +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOCalendarProcessing.Tests.ps1 @@ -0,0 +1,380 @@ +[CmdletBinding()] +param( +) +$M365DSCTestFolder = Join-Path -Path $PSScriptRoot ` + -ChildPath '..\..\Unit' ` + -Resolve +$CmdletModule = (Join-Path -Path $M365DSCTestFolder ` + -ChildPath '\Stubs\Microsoft365.psm1' ` + -Resolve) +$GenericStubPath = (Join-Path -Path $M365DSCTestFolder ` + -ChildPath '\Stubs\Generic.psm1' ` + -Resolve) +Import-Module -Name (Join-Path -Path $M365DSCTestFolder ` + -ChildPath '\UnitTestHelper.psm1' ` + -Resolve) + +$Global:DscHelper = New-M365DscUnitTestHelper -StubModule $CmdletModule ` + -DscResource 'EXOCalendarProcessing' -GenericStubModule $GenericStubPath +Describe -Name $Global:DscHelper.DescribeHeader -Fixture { + InModuleScope -ModuleName $Global:DscHelper.ModuleName -ScriptBlock { + Invoke-Command -ScriptBlock $Global:DscHelper.InitializeScript -NoNewScope + + BeforeAll { + $secpasswd = ConvertTo-SecureString 'test@password1' -AsPlainText -Force + $Credential = New-Object System.Management.Automation.PSCredential ('tenantadmin@mydomain.com', $secpasswd) + + Mock -CommandName Confirm-M365DSCDependencies -MockWith { + } + + Mock -CommandName New-M365DSCConnection -MockWith { + return 'Credentials' + } + + Mock -CommandName Get-PSSession -MockWith { + } + + Mock -CommandName Remove-PSSession -MockWith { + } + + # Mock Write-Host to hide output during the tests + Mock -CommandName Write-Host -MockWith { + } + + Mock -CommandName Set-CalendarProcessing -MockWith { + return $null + } + + Mock -CommandName Get-User -MockWith { + return @{ + Id = '12345-12345-12345-12345-12345' + UserPrincipalName = "Bob.Houle@contoso.com" + } + } + } + + # Test contexts + Context -Name 'Settings are not in the desired state' -Fixture { + BeforeAll { + $testParams = @{ + AddAdditionalResponse = $False; + AddNewRequestsTentatively = $True; + AddOrganizerToSubject = $True; + AllBookInPolicy = $True; + AllowConflicts = $False; + AllowRecurringMeetings = $True; + AllRequestInPolicy = $False; + AllRequestOutOfPolicy = $False; + AutomateProcessing = "AutoUpdate"; + BookingType = "Standard"; + BookingWindowInDays = 180; + BookInPolicy = @(); + ConflictPercentageAllowed = 0; + Credential = $Credential; + DeleteAttachments = $True; + DeleteComments = $True; + DeleteNonCalendarItems = $True; + DeleteSubject = $True; + EnableAutoRelease = $False; + EnableResponseDetails = $True; + EnforceCapacity = $False; + EnforceSchedulingHorizon = $True; + Ensure = "Present"; + ForwardRequestsToDelegates = $True; + Identity = "John.Smith"; + MaximumConflictInstances = 0; + MaximumDurationInMinutes = 1440; + MinimumDurationInMinutes = 0; + OrganizerInfo = $True; + PostReservationMaxClaimTimeInMinutes = 10; + ProcessExternalMeetingMessages = $False; + RemoveCanceledMeetings = $False; + RemoveForwardedMeetingNotifications = $False; + RemoveOldMeetingMessages = $False; + RemovePrivateProperty = $True; + RequestInPolicy = @("Bob.Houle@contoso.com"); + ResourceDelegates = @(); + ScheduleOnlyDuringWorkHours = $False; + TentativePendingApproval = $True; + } + + Mock -CommandName Get-CalendarProcessing -MockWith { + return @{ + AddAdditionalResponse = $False; + AddNewRequestsTentatively = $True; + AddOrganizerToSubject = $True; + AllBookInPolicy = $True; + AllowConflicts = $False; + AllowRecurringMeetings = $True; + AllRequestInPolicy = $False; + AllRequestOutOfPolicy = $True; # Drift + AutomateProcessing = "AutoUpdate"; + BookingType = "Standard"; + BookingWindowInDays = 180; + BookInPolicy = @(); + ConflictPercentageAllowed = 0; + DeleteAttachments = $True; + DeleteComments = $True; + DeleteNonCalendarItems = $True; + DeleteSubject = $True; + EnableAutoRelease = $False; + EnableResponseDetails = $True; + EnforceCapacity = $False; + EnforceSchedulingHorizon = $True; + ForwardRequestsToDelegates = $True; + Identity = "John.Smith"; + MaximumConflictInstances = 0; + MaximumDurationInMinutes = 1440; + MinimumDurationInMinutes = 0; + OrganizerInfo = $True; + PostReservationMaxClaimTimeInMinutes = 10; + ProcessExternalMeetingMessages = $False; + RemoveCanceledMeetings = $False; + RemoveForwardedMeetingNotifications = $False; + RemoveOldMeetingMessages = $False; + RemovePrivateProperty = $True; + RequestInPolicy = @('12345-12345-12345-12345-12345'); + ResourceDelegates = @(); + ScheduleOnlyDuringWorkHours = $False; + TentativePendingApproval = $True; + } + } + } + + It 'Should return false from the Test method' { + Test-TargetResource @testParams | Should -Be $false + } + + It 'Should call the Set method' { + Set-TargetResource @testParams + Should -Invoke -CommandName Set-CalendarProcessing -Exactly 1 + } + + It 'Should return Present from the Get method' { + (Get-TargetResource @testParams).Ensure | Should -Be 'Present' + } + } + + Context -Name 'Settings are already in the desired state' -Fixture { + BeforeAll { + $testParams = @{ + AddAdditionalResponse = $False; + AddNewRequestsTentatively = $True; + AddOrganizerToSubject = $True; + AllBookInPolicy = $True; + AllowConflicts = $False; + AllowRecurringMeetings = $True; + AllRequestInPolicy = $False; + AllRequestOutOfPolicy = $False; + AutomateProcessing = "AutoUpdate"; + BookingType = "Standard"; + BookingWindowInDays = 180; + BookInPolicy = @(); + ConflictPercentageAllowed = 0; + Credential = $Credential; + DeleteAttachments = $True; + DeleteComments = $True; + DeleteNonCalendarItems = $True; + DeleteSubject = $True; + EnableAutoRelease = $False; + EnableResponseDetails = $True; + EnforceCapacity = $False; + EnforceSchedulingHorizon = $True; + Ensure = "Present"; + ForwardRequestsToDelegates = $True; + Identity = "John.Smith"; + MaximumConflictInstances = 0; + MaximumDurationInMinutes = 1440; + MinimumDurationInMinutes = 0; + OrganizerInfo = $True; + PostReservationMaxClaimTimeInMinutes = 10; + ProcessExternalMeetingMessages = $False; + RemoveCanceledMeetings = $False; + RemoveForwardedMeetingNotifications = $False; + RemoveOldMeetingMessages = $False; + RemovePrivateProperty = $True; + RequestInPolicy = @("Bob.Houle@contoso.com"); + ResourceDelegates = @(); + ScheduleOnlyDuringWorkHours = $False; + TentativePendingApproval = $True; + } + + Mock -CommandName Get-CalendarProcessing -MockWith { + return @{ + AddAdditionalResponse = $False; + AddNewRequestsTentatively = $True; + AddOrganizerToSubject = $True; + AllBookInPolicy = $True; + AllowConflicts = $False; + AllowRecurringMeetings = $True; + AllRequestInPolicy = $False; + AllRequestOutOfPolicy = $False; + AutomateProcessing = "AutoUpdate"; + BookingType = "Standard"; + BookingWindowInDays = 180; + BookInPolicy = @(); + ConflictPercentageAllowed = 0; + DeleteAttachments = $True; + DeleteComments = $True; + DeleteNonCalendarItems = $True; + DeleteSubject = $True; + EnableAutoRelease = $False; + EnableResponseDetails = $True; + EnforceCapacity = $False; + EnforceSchedulingHorizon = $True; + ForwardRequestsToDelegates = $True; + Identity = "John.Smith"; + MaximumConflictInstances = 0; + MaximumDurationInMinutes = 1440; + MinimumDurationInMinutes = 0; + OrganizerInfo = $True; + PostReservationMaxClaimTimeInMinutes = 10; + ProcessExternalMeetingMessages = $False; + RemoveCanceledMeetings = $False; + RemoveForwardedMeetingNotifications = $False; + RemoveOldMeetingMessages = $False; + RemovePrivateProperty = $True; + RequestInPolicy = @('12345-12345-12345-12345-12345'); + ResourceDelegates = @(); + ScheduleOnlyDuringWorkHours = $False; + TentativePendingApproval = $True; + } + } + } + + It 'Should return false from the Test method' { + Test-TargetResource @testParams | Should -Be $true + } + + It 'Should return Present from the Get method' { + (Get-TargetResource @testParams).Ensure | Should -Be 'Present' + } + } + + Context -Name "User doesn't exist" -Fixture { + BeforeAll { + $testParams = @{ + AddAdditionalResponse = $False; + AddNewRequestsTentatively = $True; + AddOrganizerToSubject = $True; + AllBookInPolicy = $True; + AllowConflicts = $False; + AllowRecurringMeetings = $True; + AllRequestInPolicy = $False; + AllRequestOutOfPolicy = $False; + AutomateProcessing = "AutoUpdate"; + BookingType = "Standard"; + BookingWindowInDays = 180; + BookInPolicy = @(); + ConflictPercentageAllowed = 0; + Credential = $Credential; + DeleteAttachments = $True; + DeleteComments = $True; + DeleteNonCalendarItems = $True; + DeleteSubject = $True; + EnableAutoRelease = $False; + EnableResponseDetails = $True; + EnforceCapacity = $False; + EnforceSchedulingHorizon = $True; + Ensure = "Present"; + ForwardRequestsToDelegates = $True; + Identity = "John.Smith"; + MaximumConflictInstances = 0; + MaximumDurationInMinutes = 1440; + MinimumDurationInMinutes = 0; + OrganizerInfo = $True; + PostReservationMaxClaimTimeInMinutes = 10; + ProcessExternalMeetingMessages = $False; + RemoveCanceledMeetings = $False; + RemoveForwardedMeetingNotifications = $False; + RemoveOldMeetingMessages = $False; + RemovePrivateProperty = $True; + RequestInPolicy = @("Bob.Houle@contoso.com"); + ResourceDelegates = @(); + ScheduleOnlyDuringWorkHours = $False; + TentativePendingApproval = $True; + } + + Mock -CommandName Get-CalendarProcessing -MockWith { + return $null + } + } + + It 'Should return false from the Test method' { + Test-TargetResource @testParams | Should -Be $false + } + + It 'Should return Absent from the Get method' { + (Get-TargetResource @testParams).Ensure | Should -Be 'Absent' + } + } + + Context -Name 'ReverseDSC Tests' -Fixture { + BeforeAll { + $Global:CurrentModeIsExport = $true + $Global:PartialExportFileName = "$(New-Guid).partial.ps1" + $testParams = @{ + Credential = $Credential + } + Mock -CommandName Get-CalendarProcessing -MockWith { + return @{ + AddAdditionalResponse = $False; + AddNewRequestsTentatively = $True; + AddOrganizerToSubject = $True; + AllBookInPolicy = $True; + AllowConflicts = $False; + AllowRecurringMeetings = $True; + AllRequestInPolicy = $False; + AllRequestOutOfPolicy = $False; + AutomateProcessing = "AutoUpdate"; + BookingType = "Standard"; + BookingWindowInDays = 180; + BookInPolicy = @(); + ConflictPercentageAllowed = 0; + DeleteAttachments = $True; + DeleteComments = $True; + DeleteNonCalendarItems = $True; + DeleteSubject = $True; + EnableAutoRelease = $False; + EnableResponseDetails = $True; + EnforceCapacity = $False; + EnforceSchedulingHorizon = $True; + ForwardRequestsToDelegates = $True; + Identity = "John.Smith"; + MaximumConflictInstances = 0; + MaximumDurationInMinutes = 1440; + MinimumDurationInMinutes = 0; + OrganizerInfo = $True; + PostReservationMaxClaimTimeInMinutes = 10; + ProcessExternalMeetingMessages = $False; + RemoveCanceledMeetings = $False; + RemoveForwardedMeetingNotifications = $False; + RemoveOldMeetingMessages = $False; + RemovePrivateProperty = $True; + RequestInPolicy = @('12345-12345-12345-12345-12345'); + ResourceDelegates = @(); + ScheduleOnlyDuringWorkHours = $False; + TentativePendingApproval = $True; + } + } + + Mock -CommandName Get-Mailbox -MockWith { + return @( + @{ + Identity = 'Bob.Houle' + UserPrincipalName = 'Bob.Houle' + } + ) + } + } + + + It 'Should Reverse Engineer resource from the Export method' { + $result = Export-TargetResource @testParams + $result | Should -Not -BeNullOrEmpty + } + } + } +} + +Invoke-Command -ScriptBlock $Global:DscHelper.CleanupScript -NoNewScope diff --git a/Tests/Unit/Stubs/Microsoft365.psm1 b/Tests/Unit/Stubs/Microsoft365.psm1 index 5ae21ddbc4..8a04f97a59 100644 --- a/Tests/Unit/Stubs/Microsoft365.psm1 +++ b/Tests/Unit/Stubs/Microsoft365.psm1 @@ -321,6 +321,19 @@ function Get-AvailabilityConfig $Identity ) } +function Get-CalendarProcessing +{ + [CmdletBinding()] + param( + [Parameter()] + [System.Object] + $Identity, + + [Parameter()] + [System.Object] + $ResultSize + ) +} function Get-CASMailbox { [CmdletBinding()] @@ -891,6 +904,10 @@ function Get-ManagementRoleAssignment [System.Object] $Identity, + [Parameter()] + [System.Object] + $RecipientGroupScope, + [Parameter()] [System.Boolean] $Enabled, @@ -907,10 +924,6 @@ function Get-ManagementRoleAssignment [System.Object] $ConfigWriteScope, - [Parameter()] - [System.Object] - $RoleAssignee, - [Parameter()] [System.Boolean] $Delegating, @@ -923,6 +936,10 @@ function Get-ManagementRoleAssignment [System.Object[]] $AssignmentMethod, + [Parameter()] + [System.Management.Automation.SwitchParameter] + $GetEffectiveUsers, + [Parameter()] [System.Object] $Role, @@ -940,8 +957,8 @@ function Get-ManagementRoleAssignment $RecipientOrganizationalUnitScope, [Parameter()] - [System.Management.Automation.SwitchParameter] - $GetEffectiveUsers + [System.Object] + $RoleAssignee ) } function Get-MessageClassification @@ -3323,8 +3340,8 @@ function New-ManagementRoleAssignment $CustomRecipientWriteScope, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [System.Object] + $RecipientGroupScope, [Parameter()] [System.String] @@ -3336,12 +3353,16 @@ function New-ManagementRoleAssignment [Parameter()] [System.Object] - $Policy, + $RecipientAdministrativeUnitScope, [Parameter()] [System.Object] $SecurityGroup, + [Parameter()] + [System.Object] + $ExclusiveRecipientWriteScope, + [Parameter()] [System.Management.Automation.SwitchParameter] $Delegating, @@ -3351,8 +3372,8 @@ function New-ManagementRoleAssignment $User, [Parameter()] - [System.Object] - $RecipientRelativeWriteScope, + [System.Management.Automation.SwitchParameter] + $Confirm, [Parameter()] [System.Object] @@ -3368,15 +3389,15 @@ function New-ManagementRoleAssignment [Parameter()] [System.Object] - $RecipientAdministrativeUnitScope, + $Policy, [Parameter()] [System.Object] - $ExclusiveRecipientWriteScope, + $RecipientOrganizationalUnitScope, [Parameter()] [System.Object] - $RecipientOrganizationalUnitScope + $RecipientRelativeWriteScope ) } function New-MessageClassification @@ -4235,11 +4256,7 @@ function New-SafeAttachmentPolicy [Parameter()] [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [System.Boolean] - $ActionOnError + $Confirm ) } function New-SafeAttachmentRule @@ -6479,6 +6496,175 @@ function Set-AvailabilityConfig $AllowedTenantIds ) } +function Set-CalendarProcessing +{ + [CmdletBinding()] + param( + [Parameter()] + [System.Int32] + $MaximumConflictInstances, + + [Parameter()] + [System.Object] + $BookingType, + + [Parameter()] + [System.Boolean] + $ForwardRequestsToDelegates, + + [Parameter()] + [System.Boolean] + $RemoveCanceledMeetings, + + [Parameter()] + [System.Object] + $Identity, + + [Parameter()] + [System.Object[]] + $ResourceDelegates, + + [Parameter()] + [System.Boolean] + $DeleteNonCalendarItems, + + [Parameter()] + [System.Boolean] + $RemovePrivateProperty, + + [Parameter()] + [System.Boolean] + $DeleteComments, + + [Parameter()] + [System.Boolean] + $EnforceSchedulingHorizon, + + [Parameter()] + [System.Boolean] + $EnableResponseDetails, + + [Parameter()] + [System.Object[]] + $RequestInPolicy, + + [Parameter()] + [System.Boolean] + $EnforceCapacity, + + [Parameter()] + [System.Boolean] + $AllowConflicts, + + [Parameter()] + [System.Boolean] + $AllRequestInPolicy, + + [Parameter()] + [System.Boolean] + $AddOrganizerToSubject, + + [Parameter()] + [System.Object[]] + $BookInPolicy, + + [Parameter()] + [System.Int32] + $ConflictPercentageAllowed, + + [Parameter()] + [System.Object] + $AutomateProcessing, + + [Parameter()] + [System.Boolean] + $AllRequestOutOfPolicy, + + [Parameter()] + [System.Boolean] + $AddNewRequestsTentatively, + + [Parameter()] + [System.Boolean] + $EnableAutoRelease, + + [Parameter()] + [System.Int32] + $PostReservationMaxClaimTimeInMinutes, + + [Parameter()] + [System.Boolean] + $AllBookInPolicy, + + [Parameter()] + [System.Boolean] + $ProcessExternalMeetingMessages, + + [Parameter()] + [System.Boolean] + $DeleteAttachments, + + [Parameter()] + [System.Boolean] + $ScheduleOnlyDuringWorkHours, + + [Parameter()] + [System.String] + $AdditionalResponse, + + [Parameter()] + [System.Boolean] + $TentativePendingApproval, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [System.Int32] + $MaximumDurationInMinutes, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $IgnoreDefaultScope, + + [Parameter()] + [System.Object[]] + $RequestOutOfPolicy, + + [Parameter()] + [System.Boolean] + $RemoveOldMeetingMessages, + + [Parameter()] + [System.Boolean] + $OrganizerInfo, + + [Parameter()] + [System.Boolean] + $AddAdditionalResponse, + + [Parameter()] + [System.Boolean] + $RemoveForwardedMeetingNotifications, + + [Parameter()] + [System.Int32] + $MinimumDurationInMinutes, + + [Parameter()] + [System.Int32] + $BookingWindowInDays, + + [Parameter()] + [System.Boolean] + $AllowRecurringMeetings, + + [Parameter()] + [System.Boolean] + $DeleteSubject + ) +} function Set-CASMailbox { [CmdletBinding()] @@ -8836,8 +9022,8 @@ function Set-ManagementRoleAssignment [CmdletBinding()] param( [Parameter()] - [System.Management.Automation.SwitchParameter] - $Force, + [System.Object] + $RecipientGroupScope, [Parameter()] [System.Object] @@ -8859,6 +9045,10 @@ function Set-ManagementRoleAssignment [System.Object] $Identity, + [Parameter()] + [System.Object] + $RecipientOrganizationalUnitScope, + [Parameter()] [System.Boolean] $Enabled, @@ -8872,8 +9062,8 @@ function Set-ManagementRoleAssignment $RecipientRelativeWriteScope, [Parameter()] - [System.Object] - $RecipientOrganizationalUnitScope + [System.Management.Automation.SwitchParameter] + $Force ) } function Set-MessageClassification @@ -9548,7 +9738,7 @@ function Set-OrganizationConfig [Parameter()] [System.Boolean] - $OutlookMobileHelpShiftEnabled, + $AutomaticForcedReadReceiptEnabled, [Parameter()] [System.Boolean] @@ -9790,6 +9980,10 @@ function Set-OrganizationConfig [System.Boolean] $CustomerLockboxEnabled, + [Parameter()] + [System.Boolean] + $OutlookMobileHelpShiftEnabled, + [Parameter()] [System.Uri] $SiteMailboxCreationURL, @@ -10005,10 +10199,6 @@ function Set-OwaMailboxPolicy [System.Management.Automation.SwitchParameter] $Confirm, - [Parameter()] - [System.String] - $SetPhotoURL, - [Parameter()] [System.Int32] $DefaultClientLanguage, @@ -10023,7 +10213,7 @@ function Set-OwaMailboxPolicy [Parameter()] [System.Boolean] - $UseISO885915, + $MessagePreviewsDisabled, [Parameter()] [System.Boolean] @@ -10039,7 +10229,7 @@ function Set-OwaMailboxPolicy [Parameter()] [System.Boolean] - $OneDriveAttachmentsEnabled, + $NpsSurveysEnabled, [Parameter()] [System.Boolean] @@ -10077,13 +10267,17 @@ function Set-OwaMailboxPolicy [System.Boolean] $SMimeSuppressNameChecksEnabled, + [Parameter()] + [System.Object] + $ActionForUnknownFileAndMIMETypes, + [Parameter()] [System.String] $ExternalSPMySiteHostURL, [Parameter()] [System.Boolean] - $OnSendAddinsEnabled, + $OfflineEnabledWeb, [Parameter()] [System.Object] @@ -10171,7 +10365,7 @@ function Set-OwaMailboxPolicy [Parameter()] [System.Boolean] - $NpsSurveysEnabled, + $OfflineEnabledWin, [Parameter()] [System.Object] @@ -10187,7 +10381,7 @@ function Set-OwaMailboxPolicy [Parameter()] [System.Boolean] - $ReferenceAttachmentsEnabled, + $OnSendAddinsEnabled, [Parameter()] [System.Boolean] @@ -10257,6 +10451,10 @@ function Set-OwaMailboxPolicy [System.Boolean] $ReportJunkEmailEnabled, + [Parameter()] + [System.Boolean] + $UseISO885915, + [Parameter()] [System.Boolean] $RecoverDeletedItemsEnabled, @@ -10274,8 +10472,8 @@ function Set-OwaMailboxPolicy $WebPartsFrameOptionsType, [Parameter()] - [System.Object] - $ActionForUnknownFileAndMIMETypes, + [System.String] + $SetPhotoURL, [Parameter()] [System.Boolean] @@ -10397,6 +10595,10 @@ function Set-OwaMailboxPolicy [System.Boolean] $BizBarEnabled, + [Parameter()] + [System.Boolean] + $OneDriveAttachmentsEnabled, + [Parameter()] [System.Boolean] $PrintWithoutDownloadEnabled, @@ -10419,7 +10621,7 @@ function Set-OwaMailboxPolicy [Parameter()] [System.Boolean] - $MessagePreviewsDisabled, + $ReferenceAttachmentsEnabled, [Parameter()] [System.Management.Automation.SwitchParameter] @@ -10654,6 +10856,10 @@ function Set-RemoteDomain [System.Object] $PreferredInternetCodePageForShiftJis, + [Parameter()] + [System.Boolean] + $SmtpDaneMandatoryModeEnabled, + [Parameter()] [System.String] $NonMimeCharacterSet, @@ -10808,136 +11014,132 @@ function Set-SafeAttachmentPolicy [Parameter()] [System.String] - $QuarantineTag, + $QuarantineTag + ) +} +function Set-SafeAttachmentRule +{ + [CmdletBinding()] + param( + [Parameter()] + [System.Int32] + $Priority, + + [Parameter()] + [System.String] + $Name, + + [Parameter()] + [System.Object[]] + $SentToMemberOf, + + [Parameter()] + [System.Object[]] + $SentTo, + + [Parameter()] + [System.String] + $Comments, + + [Parameter()] + [System.Object[]] + $RecipientDomainIs, + + [Parameter()] + [System.Object] + $Identity, + + [Parameter()] + [System.Object] + $SafeAttachmentPolicy, + + [Parameter()] + [System.Object[]] + $ExceptIfRecipientDomainIs, + + [Parameter()] + [System.Object[]] + $ExceptIfSentTo, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [System.Object[]] + $ExceptIfSentToMemberOf + ) +} +function Set-SafeLinksPolicy +{ + [CmdletBinding()] + param( + [Parameter()] + [System.Boolean] + $EnableOrganizationBranding, + + [Parameter()] + [System.Object] + $Identity, + + [Parameter()] + [System.String] + $AdminDisplayName, + + [Parameter()] + [System.Boolean] + $UseTranslatedNotificationText, + + [Parameter()] + [System.Boolean] + $DisableUrlRewrite, + + [Parameter()] + [System.Object] + $DoNotRewriteUrls, + + [Parameter()] + [System.Boolean] + $EnableSafeLinksForTeams, + + [Parameter()] + [System.Boolean] + $EnableSafeLinksForOffice, + + [Parameter()] + [System.Boolean] + $TrackClicks, [Parameter()] [System.Boolean] - $ActionOnError + $AllowClickThrough, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [System.String] + $CustomNotificationText, + + [Parameter()] + [System.Boolean] + $DeliverMessageAfterScan, + + [Parameter()] + [System.Boolean] + $EnableSafeLinksForEmail, + + [Parameter()] + [System.Boolean] + $ScanUrls, + + [Parameter()] + [System.Boolean] + $EnableForInternalSenders ) } -function Set-SafeAttachmentRule -{ - [CmdletBinding()] - param( - [Parameter()] - [System.Int32] - $Priority, - - [Parameter()] - [System.String] - $Name, - - [Parameter()] - [System.Object[]] - $SentToMemberOf, - - [Parameter()] - [System.Object[]] - $SentTo, - - [Parameter()] - [System.String] - $Comments, - - [Parameter()] - [System.Object[]] - $RecipientDomainIs, - - [Parameter()] - [System.Object] - $Identity, - - [Parameter()] - [System.Object] - $SafeAttachmentPolicy, - - [Parameter()] - [System.Object[]] - $ExceptIfRecipientDomainIs, - - [Parameter()] - [System.Object[]] - $ExceptIfSentTo, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [System.Object[]] - $ExceptIfSentToMemberOf - ) -} -function Set-SafeLinksPolicy -{ - [CmdletBinding()] - param( - [Parameter()] - [System.Boolean] - $EnableOrganizationBranding, - - [Parameter()] - [System.Object] - $Identity, - - [Parameter()] - [System.String] - $AdminDisplayName, - - [Parameter()] - [System.Boolean] - $UseTranslatedNotificationText, - - [Parameter()] - [System.Boolean] - $DisableUrlRewrite, - - [Parameter()] - [System.Object] - $DoNotRewriteUrls, - - [Parameter()] - [System.Boolean] - $EnableSafeLinksForTeams, - - [Parameter()] - [System.Boolean] - $EnableSafeLinksForOffice, - - [Parameter()] - [System.Boolean] - $TrackClicks, - - [Parameter()] - [System.Boolean] - $AllowClickThrough, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [System.String] - $CustomNotificationText, - - [Parameter()] - [System.Boolean] - $DeliverMessageAfterScan, - - [Parameter()] - [System.Boolean] - $EnableSafeLinksForEmail, - - [Parameter()] - [System.Boolean] - $ScanUrls, - - [Parameter()] - [System.Boolean] - $EnableForInternalSenders - ) -} -function Set-SafeLinksRule +function Set-SafeLinksRule { [CmdletBinding()] param( @@ -59623,4306 +59825,330 @@ function Get-MgBetaDirectoryObject ) } #endregion - - -#region Microsoft.Graph.Groups -function Get-MgGroup +#region SecurityComplianceCenter +function Get-AdminAuditLogConfig { [CmdletBinding()] param( - [Parameter()] - [System.String[]] - $Property, - - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [System.Int32] - $PageSize, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.Int32] - $Skip, - - [Parameter()] - [System.Int32] - $Top, - - [Parameter()] - [System.String] - $CountVariable, - - [Parameter()] - [System.String] - $GroupId, + ) +} +function Get-AuditConfig +{ + [CmdletBinding()] + param( [Parameter()] - [System.Uri] - $Proxy, - + [System.Object] + $DomainController + ) +} +function Get-AuditConfigurationPolicy +{ + [CmdletBinding()] + param( [Parameter()] - [System.String[]] - $Sort, + [System.Object] + $Identity, [Parameter()] - [System.String] - $ConsistencyLevel, - + [System.Object] + $DomainController + ) +} +function Get-AutoSensitivityLabelPolicy +{ + [CmdletBinding()] + param( [Parameter()] [System.Management.Automation.SwitchParameter] - $All, - - [Parameter()] - [System.String] - $Filter, + $ForceValidate, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.Boolean] + $IncludeTestModeResults, [Parameter()] - [System.String] - $Search, + [System.Object] + $Identity, [Parameter()] [System.Management.Automation.SwitchParameter] - $Break, - - [Parameter()] - [System.String[]] - $ExpandProperty, + $IncludeProgressFeedback, [Parameter()] [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [PSObject] - $HttpPipelineAppend + $DistributionDetail ) } -function Get-MgGroupLifecyclePolicy +function Get-AutoSensitivityLabelRule { [CmdletBinding()] param( - [Parameter()] - [System.String[]] - $Property, - - [Parameter()] - [PSObject] - $InputObject, - [Parameter()] [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + $ForceValidate, [Parameter()] - [System.String] - $GroupLifecyclePolicyId, + [System.Management.Automation.SwitchParameter] + $Confirm, [Parameter()] - [System.Int32] - $PageSize, + [System.Object] + $Identity, [Parameter()] - [PSObject] - $HttpPipelinePrepend, + [System.Boolean] + $IncludeExecutionRuleInformation, [Parameter()] - [System.Int32] - $Skip, + [System.Object] + $Policy, [Parameter()] - [System.Int32] - $Top, - + [System.Boolean] + $IncludeExecutionRuleGuids + ) +} +function Get-CaseHoldPolicy +{ + [CmdletBinding()] + param( [Parameter()] - [System.String] - $CountVariable, + [System.Management.Automation.SwitchParameter] + $IncludeBindingsOnly, [Parameter()] [System.String] - $GroupId, + $Case, [Parameter()] - [System.Uri] - $Proxy, + [System.Management.Automation.SwitchParameter] + $IncludeBindings, [Parameter()] - [System.String[]] - $Sort, + [System.Object] + $Identity, [Parameter()] [System.Management.Automation.SwitchParameter] - $All, - + $DistributionDetail + ) +} +function Get-CaseHoldRule +{ + [CmdletBinding()] + param( [Parameter()] - [System.String] - $Filter, + [System.Object] + $Identity, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.Object] + $Policy + ) +} +function Get-ComplianceCase +{ + [CmdletBinding()] + param( + [Parameter()] + [System.Object] + $CaseType, [Parameter()] [System.String] - $Search, + $RoleGroup, [Parameter()] [System.Management.Automation.SwitchParameter] - $Break, + $RecentOnly, [Parameter()] - [System.String[]] - $ExpandProperty, + [System.Object] + $Identity, [Parameter()] - [PSObject] - $HttpPipelineAppend + [System.Object] + $DomainController ) } -function Get-MgGroupMember +function Get-ComplianceRetentionEvent { [CmdletBinding()] param( [Parameter()] - [System.String[]] - $Property, + [System.Object] + $BeginDateTime, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [System.Object] + $Identity, [Parameter()] - [System.Int32] - $PageSize, + [System.Management.Automation.SwitchParameter] + $PreviewOnly, [Parameter()] - [PSObject] - $HttpPipelinePrepend, + [System.Object] + $EndDateTime, [Parameter()] - [System.Int32] - $Skip, - + [System.Object] + $DomainController + ) +} +function Get-ComplianceRetentionEventType +{ + [CmdletBinding()] + param( [Parameter()] - [System.Int32] - $Top, + [System.Object] + $Identity, [Parameter()] - [System.String] - $CountVariable, - + [System.Management.Automation.SwitchParameter] + $LoadTag + ) +} +function Get-ComplianceSearch +{ + [CmdletBinding()] + param( [Parameter()] [System.String] - $GroupId, + $Case, [Parameter()] - [System.Uri] - $Proxy, + [System.Object] + $Identity, [Parameter()] - [System.String[]] - $Sort, - + [System.Object] + $ResultSize + ) +} +function Get-ComplianceSearchAction +{ + [CmdletBinding()] + param( [Parameter()] [System.String] - $ConsistencyLevel, + $Case, [Parameter()] [System.Management.Automation.SwitchParameter] - $All, + $Purge, [Parameter()] - [System.String] - $Filter, + [System.Object] + $Identity, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.Management.Automation.SwitchParameter] + $IncludeCredential, [Parameter()] - [System.String] - $Search, + [System.Management.Automation.SwitchParameter] + $Details, [Parameter()] [System.Management.Automation.SwitchParameter] - $Break, + $Export, [Parameter()] - [System.String[]] - $ExpandProperty, + [System.Management.Automation.SwitchParameter] + $Preview, [Parameter()] - [PSObject] - $HttpPipelineAppend + [System.Object] + $ResultSize ) } -function Get-MgGroupMemberOf +function Get-ComplianceTag { [CmdletBinding()] param( - [Parameter()] - [System.String[]] - $Property, - [Parameter()] [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.Int32] - $PageSize, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.Int32] - $Skip, - - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [System.Int32] - $Top, - - [Parameter()] - [System.String] - $CountVariable, - - [Parameter()] - [System.String] - $GroupId, + $IncludingLabelState, [Parameter()] - [System.Uri] - $Proxy, - + [System.Object] + $Identity + ) +} +function Get-DeviceConditionalAccessPolicy +{ + [CmdletBinding()] + param( [Parameter()] - [System.String[]] - $Sort, - + [System.Object] + $Identity + ) +} +function Get-DeviceConfigurationPolicy +{ + [CmdletBinding()] + param( [Parameter()] - [System.String] - $ConsistencyLevel, - + [System.Object] + $Identity + ) +} +function Get-DlpCompliancePolicy +{ + [CmdletBinding()] + param( [Parameter()] [System.Management.Automation.SwitchParameter] - $All, + $Summary, [Parameter()] - [System.String] - $Filter, + [System.Boolean] + $IncludeRulesMetadata, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.Management.Automation.SwitchParameter] + $ForceValidate, [Parameter()] - [System.String] - $Search, + [System.Boolean] + $IncludeExtendedProperties, [Parameter()] - [System.String] - $DirectoryObjectId, + [System.Object] + $Identity, [Parameter()] [System.Management.Automation.SwitchParameter] - $Break, - - [Parameter()] - [System.String[]] - $ExpandProperty, + $IRMUserRiskConfiguredAnyRule, [Parameter()] - [PSObject] - $HttpPipelineAppend + [System.Management.Automation.SwitchParameter] + $DistributionDetail ) } -function Get-MgGroupOwner +function Get-DlpComplianceRule { [CmdletBinding()] param( [Parameter()] - [System.String[]] - $Property, + [System.Object] + $Identity, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [System.Object] + $Policy, [Parameter()] - [System.Int32] - $PageSize, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.Int32] - $Skip, - - [Parameter()] - [System.Int32] - $Top, - - [Parameter()] - [System.String] - $CountVariable, - - [Parameter()] - [System.String] - $GroupId, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.String[]] - $Sort, - - [Parameter()] - [System.String] - $ConsistencyLevel, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $All, - - [Parameter()] - [System.String] - $Filter, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.String] - $Search, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, - - [Parameter()] - [System.String[]] - $ExpandProperty, - - [Parameter()] - [PSObject] - $HttpPipelineAppend - ) -} -function New-MgGroup -{ - [CmdletBinding()] - param( - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [System.String] - $Mail, - - [Parameter()] - [System.String] - $Visibility, - - [Parameter()] - [PSObject] - $PermissionGrants, - - [Parameter()] - [PSObject] - $Sites, - - [Parameter()] - [PSObject] - $AppRoleAssignments, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $SecurityEnabled, - - [Parameter()] - [System.DateTime] - $CreatedDateTime, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [PSObject] - $Calendar, - - [Parameter()] - [System.String] - $SecurityIdentifier, - - [Parameter()] - [PSObject] - $AssignedLicenses, - - [Parameter()] - [System.DateTime] - $RenewedDateTime, - - [Parameter()] - [PSObject] - $RejectedSenders, - - [Parameter()] - [PSObject] - $Extensions, - - [Parameter()] - [System.Int32] - $UnseenCount, - - [Parameter()] - [System.String] - $Classification, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $AutoSubscribeNewMembers, - - [Parameter()] - [System.String[]] - $ProxyAddresses, - - [Parameter()] - [System.String] - $OnPremisesNetBiosName, - - [Parameter()] - [System.DateTime] - $ExpirationDateTime, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [PSObject] - $OnPremisesProvisioningErrors, - - [Parameter()] - [System.String] - $OnPremisesSecurityIdentifier, - - [Parameter()] - [System.String] - $PreferredLanguage, - - [Parameter()] - [PSObject] - $TransitiveMembers, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $HideFromAddressLists, - - [Parameter()] - [PSObject] - $Planner, - - [Parameter()] - [System.String] - $Id, - - [Parameter()] - [System.DateTime] - $OnPremisesLastSyncDateTime, - - [Parameter()] - [PSObject] - $Owners, - - [Parameter()] - [PSObject] - $GroupLifecyclePolicies, - - [Parameter()] - [PSObject] - $LicenseProcessingState, - - [Parameter()] - [System.String] - $OnPremisesDomainName, - - [Parameter()] - [PSObject] - $Settings, - - [Parameter()] - [PSObject] - $AssignedLabels, - - [Parameter()] - [PSObject] - $AcceptedSenders, - - [Parameter()] - [PSObject] - $Onenote, - - [Parameter()] - [System.String] - $MembershipRuleProcessingState, - - [Parameter()] - [System.String] - $Description, - - [Parameter()] - [PSObject] - $MemberOf, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $MailEnabled, - - [Parameter()] - [PSObject] - $Drives, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $AllowExternalSenders, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.String] - $DisplayName, - - [Parameter()] - [PSObject] - $Photo, - - [Parameter()] - [System.String] - $Theme, - - [Parameter()] - [System.DateTime] - $DeletedDateTime, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $HasMembersWithLicenseErrors, - - [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, - - [Parameter()] - [PSObject] - $TransitiveMemberOf, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $OnPremisesSyncEnabled, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $IsArchived, - - [Parameter()] - [PSObject] - $Drive, - - [Parameter()] - [System.String] - $MailNickname, - - [Parameter()] - [PSObject] - $CalendarView, - - [Parameter()] - [PSObject] - $Photos, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $IsAssignableToRole, - - [Parameter()] - [PSObject] - $HttpPipelineAppend, - - [Parameter()] - [PSObject] - $CreatedOnBehalfOf, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $HideFromOutlookClients, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $IsSubscribedByMail, - - [Parameter()] - [PSObject] - $Events, - - [Parameter()] - [PSObject] - $Threads, - - [Parameter()] - [PSObject] - $Team, - - [Parameter()] - [PSObject] - $Members, - - [Parameter()] - [System.String[]] - $GroupTypes, - - [Parameter()] - [System.String] - $MembershipRule, - - [Parameter()] - [System.String] - $PreferredDataLocation, - - [Parameter()] - [System.String] - $OnPremisesSamAccountName, - - [Parameter()] - [PSObject] - $Conversations, - - [Parameter()] - [PSObject] - $MembersWithLicenseErrors, - - [Parameter()] - [PSObject] - $BodyParameter, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break - ) -} -function New-MgGroupLifecyclePolicy -{ - [CmdletBinding()] - param( - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.Int32] - $GroupLifetimeInDays, - - [Parameter()] - [System.String] - $AlternateNotificationEmails, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.String] - $ManagedGroupTypes, - - [Parameter()] - [System.String] - $GroupId, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [PSObject] - $BodyParameter, - - [Parameter()] - [System.String] - $Id, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, - - [Parameter()] - [PSObject] - $HttpPipelineAppend - ) -} -function New-MgGroupMember -{ - [CmdletBinding()] - param( - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.Collections.Hashtable] - $BodyParameter, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.String] - $GroupId, - - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [PSObject] - $HttpPipelineAppend, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.String] - $DirectoryObjectId, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break - ) -} -function New-MgGroupMemberByRef -{ - [CmdletBinding()] - param( - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [PSObject] - $BodyParameter, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, - - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [System.String] - $OdataId, - - [Parameter()] - [PSObject] - $HttpPipelineAppend, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.String] - $GroupId, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break - ) -} -function New-MgGroupOwner -{ - [CmdletBinding()] - param( - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.Collections.Hashtable] - $BodyParameter, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.String] - $GroupId, - - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [PSObject] - $HttpPipelineAppend, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.String] - $DirectoryObjectId, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break - ) -} -function New-MgGroupOwnerByRef -{ - [CmdletBinding()] - param( - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [PSObject] - $BodyParameter, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, - - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [System.String] - $OdataId, - - [Parameter()] - [PSObject] - $HttpPipelineAppend, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.String] - $GroupId, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break - ) -} -function Remove-MgGroup -{ - [CmdletBinding()] - param( - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, - - [Parameter()] - [System.String] - $IfMatch, - - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [PSObject] - $HttpPipelineAppend, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.String] - $GroupId, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break - ) -} -function Remove-MgGroupLifecyclePolicy -{ - [CmdletBinding()] - param( - [Parameter()] - [System.String] - $GroupLifecyclePolicyId, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, - - [Parameter()] - [System.String] - $IfMatch, - - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [PSObject] - $HttpPipelineAppend, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.String] - $GroupId, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break - ) -} -function Remove-MgGroupMemberByRef -{ - [CmdletBinding()] - param( - [Parameter()] - [System.String] - $Id, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, - - [Parameter()] - [System.String] - $GroupId, - - [Parameter()] - [System.String] - $IfMatch, - - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [PSObject] - $HttpPipelineAppend, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.String] - $DirectoryObjectId, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break - ) -} -function Remove-MgGroupOwnerByRef -{ - [CmdletBinding()] - param( - [Parameter()] - [System.String] - $Id, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, - - [Parameter()] - [System.String] - $GroupId, - - [Parameter()] - [System.String] - $IfMatch, - - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [PSObject] - $HttpPipelineAppend, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.String] - $DirectoryObjectId, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break - ) -} -function Set-MgGroupLicense -{ - [CmdletBinding()] - param( - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [PSObject] - $BodyParameter, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.String[]] - $RemoveLicenses, - - [Parameter()] - [PSObject] - $AddLicenses, - - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [PSObject] - $HttpPipelineAppend, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.String] - $GroupId, - - [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break - ) -} -function Update-MgGroup -{ - [CmdletBinding()] - param( - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [System.String] - $Mail, - - [Parameter()] - [System.String] - $Visibility, - - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [PSObject] - $PermissionGrants, - - [Parameter()] - [PSObject] - $Sites, - - [Parameter()] - [PSObject] - $AppRoleAssignments, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $SecurityEnabled, - - [Parameter()] - [System.DateTime] - $CreatedDateTime, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [PSObject] - $Calendar, - - [Parameter()] - [System.String] - $SecurityIdentifier, - - [Parameter()] - [PSObject] - $AssignedLicenses, - - [Parameter()] - [System.DateTime] - $RenewedDateTime, - - [Parameter()] - [PSObject] - $RejectedSenders, - - [Parameter()] - [PSObject] - $Extensions, - - [Parameter()] - [System.Int32] - $UnseenCount, - - [Parameter()] - [System.String] - $Classification, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $AutoSubscribeNewMembers, - - [Parameter()] - [System.String] - $MailNickname, - - [Parameter()] - [System.String[]] - $ProxyAddresses, - - [Parameter()] - [System.DateTime] - $ExpirationDateTime, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [PSObject] - $OnPremisesProvisioningErrors, - - [Parameter()] - [System.String] - $OnPremisesSecurityIdentifier, - - [Parameter()] - [System.String] - $PreferredLanguage, - - [Parameter()] - [PSObject] - $TransitiveMembers, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $HideFromAddressLists, - - [Parameter()] - [PSObject] - $Planner, - - [Parameter()] - [System.String] - $Id, - - [Parameter()] - [System.DateTime] - $OnPremisesLastSyncDateTime, - - [Parameter()] - [PSObject] - $Owners, - - [Parameter()] - [PSObject] - $GroupLifecyclePolicies, - - [Parameter()] - [PSObject] - $LicenseProcessingState, - - [Parameter()] - [System.String] - $OnPremisesDomainName, - - [Parameter()] - [PSObject] - $Settings, - - [Parameter()] - [PSObject] - $AssignedLabels, - - [Parameter()] - [PSObject] - $AcceptedSenders, - - [Parameter()] - [PSObject] - $Onenote, - - [Parameter()] - [System.String] - $MembershipRuleProcessingState, - - [Parameter()] - [System.String] - $Description, - - [Parameter()] - [PSObject] - $MemberOf, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $MailEnabled, - - [Parameter()] - [PSObject] - $Drives, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $AllowExternalSenders, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.String] - $DisplayName, - - [Parameter()] - [PSObject] - $Photo, - - [Parameter()] - [System.String] - $Theme, - - [Parameter()] - [System.DateTime] - $DeletedDateTime, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $HasMembersWithLicenseErrors, - - [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, - - [Parameter()] - [PSObject] - $TransitiveMemberOf, - - [Parameter()] - [System.String] - $GroupId, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $OnPremisesSyncEnabled, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $IsArchived, - - [Parameter()] - [PSObject] - $Drive, - - [Parameter()] - [System.String] - $OnPremisesNetBiosName, - - [Parameter()] - [PSObject] - $CalendarView, - - [Parameter()] - [PSObject] - $Photos, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $IsAssignableToRole, - - [Parameter()] - [PSObject] - $HttpPipelineAppend, - - [Parameter()] - [PSObject] - $CreatedOnBehalfOf, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $HideFromOutlookClients, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $IsSubscribedByMail, - - [Parameter()] - [PSObject] - $Events, - - [Parameter()] - [PSObject] - $Threads, - - [Parameter()] - [PSObject] - $Team, - - [Parameter()] - [PSObject] - $Members, - - [Parameter()] - [System.String[]] - $GroupTypes, - - [Parameter()] - [System.String] - $MembershipRule, - - [Parameter()] - [System.String] - $PreferredDataLocation, - - [Parameter()] - [System.String] - $OnPremisesSamAccountName, - - [Parameter()] - [PSObject] - $Conversations, - - [Parameter()] - [PSObject] - $MembersWithLicenseErrors, - - [Parameter()] - [PSObject] - $BodyParameter, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break - ) -} -function Update-MgGroupLifecyclePolicy -{ - [CmdletBinding()] - param( - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, - - [Parameter()] - [System.Int32] - $GroupLifetimeInDays, - - [Parameter()] - [System.String] - $AlternateNotificationEmails, - - [Parameter()] - [System.String] - $GroupLifecyclePolicyId, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.String] - $ManagedGroupTypes, - - [Parameter()] - [System.String] - $GroupId, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [PSObject] - $BodyParameter, - - [Parameter()] - [System.String] - $Id, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [PSObject] - $HttpPipelineAppend - ) -} -#endregion -#region Microsoft.Graph.Identity.DirectoryManagement -#endregion -#region Microsoft.Graph.Identity.Governance -#endregion -#region Microsoft.Graph.Planner -function Get-MgGroupPlanner -{ - [CmdletBinding()] - param( - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [PSObject] - $HttpPipelineAppend, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.String[]] - $ExpandProperty, - - [Parameter()] - [System.String[]] - $Property, - - [Parameter()] - [System.String] - $GroupId, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break - ) -} -function Get-MgGroupPlannerPlan -{ - [CmdletBinding()] - param( - [Parameter()] - [System.String[]] - $Property, - - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.Int32] - $PageSize, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.Int32] - $Skip, - - [Parameter()] - [System.Int32] - $Top, - - [Parameter()] - [System.String] - $CountVariable, - - [Parameter()] - [System.String] - $GroupId, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.String] - $PlannerPlanId, - - [Parameter()] - [System.String[]] - $Sort, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $All, - - [Parameter()] - [System.String] - $Filter, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.String] - $Search, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, - - [Parameter()] - [System.String[]] - $ExpandProperty, - - [Parameter()] - [PSObject] - $HttpPipelineAppend - ) -} -function Get-MgGroupPlannerPlanTask -{ - [CmdletBinding()] - param( - [Parameter()] - [System.String[]] - $Property, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.Int32] - $PageSize, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.Int32] - $Skip, - - [Parameter()] - [System.Int32] - $Top, - - [Parameter()] - [System.String] - $CountVariable, - - [Parameter()] - [System.String] - $GroupId, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.String] - $PlannerPlanId, - - [Parameter()] - [System.String[]] - $Sort, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $All, - - [Parameter()] - [System.String] - $Filter, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.String] - $Search, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, - - [Parameter()] - [System.String[]] - $ExpandProperty, - - [Parameter()] - [PSObject] - $HttpPipelineAppend - ) -} -function Get-MgPlanner -{ - [CmdletBinding()] - param( - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.String[]] - $ExpandProperty, - - [Parameter()] - [System.String[]] - $Property, - - [Parameter()] - [PSObject] - $HttpPipelineAppend, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break - ) -} -function Get-MgPlannerPlan -{ - [CmdletBinding()] - param( - [Parameter()] - [System.String[]] - $Property, - - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.Int32] - $PageSize, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.Int32] - $Skip, - - [Parameter()] - [System.Int32] - $Top, - - [Parameter()] - [System.String] - $CountVariable, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.String] - $PlannerPlanId, - - [Parameter()] - [System.String[]] - $Sort, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $All, - - [Parameter()] - [System.String] - $Filter, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.String] - $Search, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, - - [Parameter()] - [System.String[]] - $ExpandProperty, - - [Parameter()] - [PSObject] - $HttpPipelineAppend - ) -} -function Get-MgPlannerPlanBucket -{ - [CmdletBinding()] - param( - [Parameter()] - [System.String[]] - $Property, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.Int32] - $PageSize, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.Int32] - $Skip, - - [Parameter()] - [System.Int32] - $Top, - - [Parameter()] - [System.String] - $CountVariable, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.String] - $PlannerPlanId, - - [Parameter()] - [System.String[]] - $Sort, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $All, - - [Parameter()] - [System.String] - $Filter, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.String] - $Search, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, - - [Parameter()] - [System.String[]] - $ExpandProperty, - - [Parameter()] - [PSObject] - $HttpPipelineAppend - ) -} -function Get-MgPlannerTask -{ - [CmdletBinding()] - param( - [Parameter()] - [System.String[]] - $Property, - - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.Int32] - $PageSize, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.Int32] - $Skip, - - [Parameter()] - [System.Int32] - $Top, - - [Parameter()] - [System.String] - $CountVariable, - - [Parameter()] - [System.String] - $PlannerTaskId, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.String[]] - $Sort, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $All, - - [Parameter()] - [System.String] - $Filter, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.String] - $Search, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, - - [Parameter()] - [System.String[]] - $ExpandProperty, - - [Parameter()] - [PSObject] - $HttpPipelineAppend - ) -} -function Get-MgPlannerTaskDetail -{ - [CmdletBinding()] - param( - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.String] - $PlannerTaskId, - - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [PSObject] - $HttpPipelineAppend, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.String[]] - $ExpandProperty, - - [Parameter()] - [System.String[]] - $Property, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break - ) -} -function New-MgPlannerBucket -{ - [CmdletBinding()] - param( - [Parameter()] - [System.String] - $Id, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.String] - $Name, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.String] - $OrderHint, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [System.String] - $PlanId, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [PSObject] - $Tasks, - - [Parameter()] - [PSObject] - $BodyParameter, - - [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, - - [Parameter()] - [PSObject] - $HttpPipelineAppend - ) -} -function New-MgPlannerPlan -{ - [CmdletBinding()] - param( - [Parameter()] - [PSObject] - $Buckets, - - [Parameter()] - [System.DateTime] - $CreatedDateTime, - - [Parameter()] - [System.String] - $Owner, - - [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [PSObject] - $Tasks, - - [Parameter()] - [PSObject] - $Container, - - [Parameter()] - [PSObject] - $CreatedBy, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [PSObject] - $BodyParameter, - - [Parameter()] - [System.String] - $Title, - - [Parameter()] - [PSObject] - $Details, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [System.String] - $Id, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, - - [Parameter()] - [PSObject] - $HttpPipelineAppend - ) -} -function New-MgPlannerTask -{ - [CmdletBinding()] - param( - [Parameter()] - [System.Int32] - $ReferenceCount, - - [Parameter()] - [System.String] - $PlanId, - - [Parameter()] - [System.Collections.Hashtable] - $Assignments, - - [Parameter()] - [System.DateTime] - $CreatedDateTime, - - [Parameter()] - [PSObject] - $HttpPipelineAppend, - - [Parameter()] - [PSObject] - $ProgressTaskBoardFormat, - - [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.Int32] - $Priority, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.Collections.Hashtable] - $AppliedCategories, - - [Parameter()] - [System.String] - $BucketId, - - [Parameter()] - [PSObject] - $CreatedBy, - - [Parameter()] - [System.Int32] - $PercentComplete, - - [Parameter()] - [System.String] - $Title, - - [Parameter()] - [System.String] - $PreviewType, - - [Parameter()] - [PSObject] - $AssignedToTaskBoardFormat, - - [Parameter()] - [System.DateTime] - $CompletedDateTime, - - [Parameter()] - [System.Int32] - $ChecklistItemCount, - - [Parameter()] - [System.String] - $AssigneePriority, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [PSObject] - $BodyParameter, - - [Parameter()] - [System.String] - $Id, - - [Parameter()] - [System.DateTime] - $StartDateTime, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [PSObject] - $CompletedBy, - - [Parameter()] - [PSObject] - $Details, - - [Parameter()] - [PSObject] - $BucketTaskBoardFormat, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.String] - $OrderHint, - - [Parameter()] - [System.DateTime] - $DueDateTime, - - [Parameter()] - [System.Int32] - $ActiveChecklistItemCount, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $HasDescription, - - [Parameter()] - [System.String] - $ConversationThreadId - ) -} -function Remove-MgPlannerTask -{ - [CmdletBinding()] - param( - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, - - [Parameter()] - [System.String] - $IfMatch, - - [Parameter()] - [System.String] - $PlannerTaskId, - - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, - - [Parameter()] - [PSObject] - $HttpPipelineAppend - ) -} -function Update-MgPlanner -{ - [CmdletBinding()] - param( - [Parameter()] - [System.String] - $Id, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [PSObject] - $BodyParameter, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [PSObject] - $Buckets, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [PSObject] - $Tasks, - - [Parameter()] - [PSObject] - $Plans, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, - - [Parameter()] - [PSObject] - $HttpPipelineAppend - ) -} -function Update-MgPlannerPlan -{ - [CmdletBinding()] - param( - [Parameter()] - [System.String] - $PlannerPlanId, - - [Parameter()] - [PSObject] - $Buckets, - - [Parameter()] - [System.DateTime] - $CreatedDateTime, - - [Parameter()] - [System.String] - $Owner, - - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [PSObject] - $Tasks, - - [Parameter()] - [PSObject] - $Container, - - [Parameter()] - [PSObject] - $CreatedBy, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [PSObject] - $BodyParameter, - - [Parameter()] - [System.String] - $Title, - - [Parameter()] - [PSObject] - $Details, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [System.String] - $Id, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, - - [Parameter()] - [PSObject] - $HttpPipelineAppend - ) -} -#endregion -#region Microsoft.Graph.Users -function Get-MgUser -{ - [CmdletBinding()] - param( - [Parameter()] - [System.String] - $UserId, - - [Parameter()] - [System.String[]] - $Property, - - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.Int32] - $PageSize, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.Int32] - $Top, - - [Parameter()] - [System.String] - $CountVariable, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.String[]] - $Sort, - - [Parameter()] - [System.String] - $ConsistencyLevel, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $All, - - [Parameter()] - [System.String] - $Filter, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.String] - $Search, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, - - [Parameter()] - [System.String[]] - $ExpandProperty, - - [Parameter()] - [PSObject] - $HttpPipelineAppend - ) -} -function Get-MgUserLicenseDetail -{ - [CmdletBinding()] - param( - [Parameter()] - [System.String] - $UserId, - - [Parameter()] - [System.String[]] - $Property, - - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [System.String] - $LicenseDetailsId, - - [Parameter()] - [System.Int32] - $PageSize, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.Int32] - $Skip, - - [Parameter()] - [System.Int32] - $Top, - - [Parameter()] - [System.String] - $CountVariable, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.String[]] - $Sort, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $All, - - [Parameter()] - [System.String] - $Filter, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.String] - $Search, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, - - [Parameter()] - [System.String[]] - $ExpandProperty, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [PSObject] - $HttpPipelineAppend - ) -} -function New-MgUser -{ - [CmdletBinding()] - param( - [Parameter()] - [PSObject] - $Todo, - - [Parameter()] - [PSObject] - $Insights, - - [Parameter()] - [PSObject] - $OnlineMeetings, - - [Parameter()] - [PSObject] - $AssignedPlans, - - [Parameter()] - [System.String] - $ExternalUserState, - - [Parameter()] - [PSObject] - $BodyParameter, - - [Parameter()] - [System.DateTime] - $EmployeeHireDate, - - [Parameter()] - [System.String] - $OnPremisesImmutableId, - - [Parameter()] - [PSObject] - $RegisteredDevices, - - [Parameter()] - [PSObject] - $AppRoleAssignments, - - [Parameter()] - [System.String] - $PreferredName, - - [Parameter()] - [System.DateTime] - $ExternalUserStateChangeDateTime, - - [Parameter()] - [System.String[]] - $ImAddresses, - - [Parameter()] - [System.String] - $OnPremisesDomainName, - - [Parameter()] - [System.String] - $AboutMe, - - [Parameter()] - [System.String] - $State, - - [Parameter()] - [System.DateTime] - $SignInSessionsValidFromDateTime, - - [Parameter()] - [System.DateTime] - $Birthday, - - [Parameter()] - [System.DateTime] - $HireDate, - - [Parameter()] - [PSObject] - $Chats, - - [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, - - [Parameter()] - [PSObject] - $EmployeeOrgData, - - [Parameter()] - [System.DateTime] - $LastPasswordChangeDateTime, - - [Parameter()] - [PSObject] - $Manager, - - [Parameter()] - [PSObject] - $InferenceClassification, - - [Parameter()] - [PSObject] - $CalendarGroups, - - [Parameter()] - [PSObject] - $MailFolders, - - [Parameter()] - [PSObject] - $ScopedRoleMemberOf, - - [Parameter()] - [System.String] - $ConsentProvidedForMinor, - - [Parameter()] - [PSObject] - $AgreementAcceptances, - - [Parameter()] - [System.String] - $EmployeeType, - - [Parameter()] - [PSObject] - $OwnedObjects, - - [Parameter()] - [PSObject] - $AuthorizationInfo, - - [Parameter()] - [PSObject] - $Photos, - - [Parameter()] - [PSObject] - $Oauth2PermissionGrants, - - [Parameter()] - [System.String] - $PreferredDataLocation, - - [Parameter()] - [PSObject] - $MailboxSettings, - - [Parameter()] - [System.String] - $Country, - - [Parameter()] - [System.String] - $OnPremisesDistinguishedName, - - [Parameter()] - [System.String[]] - $Skills, - - [Parameter()] - [System.String] - $MobilePhone, - - [Parameter()] - [System.String] - $FaxNumber, - - [Parameter()] - [System.DateTime] - $DeletedDateTime, - - [Parameter()] - [PSObject] - $Settings, - - [Parameter()] - [System.Int32] - $DeviceEnrollmentLimit, - - [Parameter()] - [System.String] - $Mail, - - [Parameter()] - [System.String] - $GivenName, - - [Parameter()] - [PSObject] - $ContactFolders, - - [Parameter()] - [PSObject] - $People, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $IsResourceAccount, - - [Parameter()] - [System.String[]] - $OtherMails, - - [Parameter()] - [System.String] - $PasswordPolicies, - - [Parameter()] - [System.String] - $CreationType, - - [Parameter()] - [System.String] - $OnPremisesUserPrincipalName, - - [Parameter()] - [System.String] - $PreferredLanguage, - - [Parameter()] - [System.DateTime] - $OnPremisesLastSyncDateTime, - - [Parameter()] - [System.String] - $AgeGroup, - - [Parameter()] - [PSObject] - $Planner, - - [Parameter()] - [PSObject] - $Contacts, - - [Parameter()] - [PSObject] - $Calendars, - - [Parameter()] - [PSObject] - $Drive, - - [Parameter()] - [System.String] - $UsageLocation, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ShowInAddressList, - - [Parameter()] - [System.String] - $JobTitle, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $AccountEnabled, - - [Parameter()] - [System.String[]] - $Schools, - - [Parameter()] - [PSObject] - $SignInActivity, - - [Parameter()] - [System.String] - $City, - - [Parameter()] - [PSObject] - $Teamwork, - - [Parameter()] - [PSObject] - $ManagedAppRegistrations, - - [Parameter()] - [PSObject] - $Messages, - - [Parameter()] - [PSObject] - $Extensions, - - [Parameter()] - [PSObject] - $Identities, - - [Parameter()] - [PSObject] - $JoinedTeams, - - [Parameter()] - [System.String] - $MySite, - - [Parameter()] - [System.String[]] - $BusinessPhones, - - [Parameter()] - [System.String] - $Id, - - [Parameter()] - [System.String[]] - $ProxyAddresses, - - [Parameter()] - [System.String] - $OfficeLocation, - - [Parameter()] - [PSObject] - $Presence, - - [Parameter()] - [PSObject] - $PasswordProfile, - - [Parameter()] - [System.String] - $UserType, - - [Parameter()] - [PSObject] - $TransitiveMemberOf, - - [Parameter()] - [PSObject] - $ManagedDevices, - - [Parameter()] - [PSObject] - $CreatedObjects, - - [Parameter()] - [PSObject] - $Photo, - - [Parameter()] - [PSObject] - $LicenseDetails, - - [Parameter()] - [System.String] - $StreetAddress, - - [Parameter()] - [PSObject] - $CalendarView, - - [Parameter()] - [PSObject] - $Onenote, - - [Parameter()] - [System.String] - $SecurityIdentifier, - - [Parameter()] - [System.String] - $DisplayName, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [PSObject] - $OwnedDevices, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [PSObject] - $FollowedSites, - - [Parameter()] - [PSObject] - $Drives, - - [Parameter()] - [System.String[]] - $Interests, - - [Parameter()] - [System.String] - $LegalAgeGroupClassification, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [System.String] - $OnPremisesSecurityIdentifier, - - [Parameter()] - [PSObject] - $HttpPipelineAppend, - - [Parameter()] - [PSObject] - $Calendar, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $OnPremisesSyncEnabled, - - [Parameter()] - [System.String] - $Department, - - [Parameter()] - [System.String] - $CompanyName, - - [Parameter()] - [PSObject] - $MemberOf, - - [Parameter()] - [System.String] - $EmployeeId, - - [Parameter()] - [PSObject] - $AssignedLicenses, - - [Parameter()] - [PSObject] - $Events, - - [Parameter()] - [System.String] - $UserPrincipalName, - - [Parameter()] - [System.String[]] - $Responsibilities, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, - - [Parameter()] - [PSObject] - $ProvisionedPlans, - - [Parameter()] - [PSObject] - $OnPremisesProvisioningErrors, - - [Parameter()] - [System.String] - $MailNickname, - - [Parameter()] - [PSObject] - $OnPremisesExtensionAttributes, - - [Parameter()] - [System.String[]] - $PastProjects, - - [Parameter()] - [System.DateTime] - $CreatedDateTime, - - [Parameter()] - [PSObject] - $DirectReports, - - [Parameter()] - [PSObject] - $Authentication, - - [Parameter()] - [PSObject] - $LicenseAssignmentStates, - - [Parameter()] - [PSObject] - $Activities, - - [Parameter()] - [PSObject] - $Outlook, - - [Parameter()] - [PSObject] - $DeviceManagementTroubleshootingEvents, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.String] - $OnPremisesSamAccountName, - - [Parameter()] - [System.DateTime] - $EmployeeLeaveDateTime, - - [Parameter()] - [System.String] - $PostalCode, - - [Parameter()] - [System.String] - $Surname - ) -} -function Remove-MgUser -{ - [CmdletBinding()] - param( - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, - - [Parameter()] - [System.String] - $IfMatch, - - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.String] - $UserId, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, - - [Parameter()] - [PSObject] - $HttpPipelineAppend - ) -} -function Update-MgUser -{ - [CmdletBinding()] - param( - [Parameter()] - [PSObject] - $Todo, - - [Parameter()] - [PSObject] - $Insights, - - [Parameter()] - [PSObject] - $OnlineMeetings, - - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [PSObject] - $AssignedPlans, - - [Parameter()] - [System.String] - $ExternalUserState, - - [Parameter()] - [PSObject] - $BodyParameter, - - [Parameter()] - [System.DateTime] - $EmployeeHireDate, - - [Parameter()] - [System.String] - $OnPremisesImmutableId, - - [Parameter()] - [PSObject] - $RegisteredDevices, - - [Parameter()] - [PSObject] - $AppRoleAssignments, - - [Parameter()] - [System.DateTime] - $ExternalUserStateChangeDateTime, - - [Parameter()] - [System.String[]] - $ImAddresses, - - [Parameter()] - [System.String] - $OnPremisesDomainName, - - [Parameter()] - [System.String] - $AboutMe, - - [Parameter()] - [System.String] - $State, - - [Parameter()] - [System.DateTime] - $SignInSessionsValidFromDateTime, - - [Parameter()] - [System.DateTime] - $EmployeeLeaveDateTime, - - [Parameter()] - [System.DateTime] - $Birthday, - - [Parameter()] - [System.DateTime] - $HireDate, - - [Parameter()] - [PSObject] - $Chats, - - [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, - - [Parameter()] - [PSObject] - $EmployeeOrgData, - - [Parameter()] - [System.DateTime] - $LastPasswordChangeDateTime, - - [Parameter()] - [PSObject] - $Manager, - - [Parameter()] - [PSObject] - $InferenceClassification, - - [Parameter()] - [PSObject] - $CalendarGroups, - - [Parameter()] - [PSObject] - $MailFolders, - - [Parameter()] - [PSObject] - $ScopedRoleMemberOf, - - [Parameter()] - [System.String] - $ConsentProvidedForMinor, - - [Parameter()] - [PSObject] - $AgreementAcceptances, - - [Parameter()] - [System.String] - $EmployeeType, - - [Parameter()] - [PSObject] - $OwnedObjects, - - [Parameter()] - [PSObject] - $AuthorizationInfo, - - [Parameter()] - [PSObject] - $Photos, - - [Parameter()] - [PSObject] - $Oauth2PermissionGrants, - - [Parameter()] - [System.String] - $PreferredDataLocation, - - [Parameter()] - [PSObject] - $MailboxSettings, - - [Parameter()] - [System.String] - $Country, - - [Parameter()] - [System.String] - $OnPremisesDistinguishedName, - - [Parameter()] - [System.String[]] - $Skills, - - [Parameter()] - [System.String] - $MobilePhone, - - [Parameter()] - [System.String] - $FaxNumber, - - [Parameter()] - [System.DateTime] - $DeletedDateTime, - - [Parameter()] - [PSObject] - $Settings, - - [Parameter()] - [System.Int32] - $DeviceEnrollmentLimit, - - [Parameter()] - [System.String] - $Mail, - - [Parameter()] - [System.String] - $GivenName, - - [Parameter()] - [PSObject] - $ContactFolders, - - [Parameter()] - [PSObject] - $People, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $IsResourceAccount, - - [Parameter()] - [System.String[]] - $OtherMails, - - [Parameter()] - [System.String] - $PasswordPolicies, - - [Parameter()] - [System.String] - $CreationType, - - [Parameter()] - [System.String] - $OnPremisesUserPrincipalName, - - [Parameter()] - [System.String] - $PreferredLanguage, - - [Parameter()] - [System.DateTime] - $OnPremisesLastSyncDateTime, - - [Parameter()] - [System.String] - $AgeGroup, - - [Parameter()] - [PSObject] - $Planner, - - [Parameter()] - [PSObject] - $Contacts, - - [Parameter()] - [PSObject] - $Calendars, - - [Parameter()] - [PSObject] - $Drive, - - [Parameter()] - [System.String] - $UsageLocation, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ShowInAddressList, - - [Parameter()] - [System.String] - $JobTitle, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $AccountEnabled, - - [Parameter()] - [System.String[]] - $Schools, - - [Parameter()] - [PSObject] - $SignInActivity, - - [Parameter()] - [System.String] - $City, - - [Parameter()] - [PSObject] - $Teamwork, - - [Parameter()] - [PSObject] - $ManagedAppRegistrations, - - [Parameter()] - [PSObject] - $Messages, - - [Parameter()] - [PSObject] - $Extensions, - - [Parameter()] - [PSObject] - $Identities, - - [Parameter()] - [PSObject] - $JoinedTeams, - - [Parameter()] - [System.String] - $MySite, - - [Parameter()] - [System.String[]] - $BusinessPhones, - - [Parameter()] - [System.String] - $Id, - - [Parameter()] - [System.String[]] - $ProxyAddresses, - - [Parameter()] - [System.String] - $OfficeLocation, - - [Parameter()] - [PSObject] - $Presence, - - [Parameter()] - [PSObject] - $PasswordProfile, - - [Parameter()] - [System.String] - $UserType, - - [Parameter()] - [PSObject] - $TransitiveMemberOf, - - [Parameter()] - [PSObject] - $ManagedDevices, - - [Parameter()] - [PSObject] - $CreatedObjects, - - [Parameter()] - [PSObject] - $Photo, - - [Parameter()] - [PSObject] - $LicenseDetails, - - [Parameter()] - [System.String] - $StreetAddress, - - [Parameter()] - [PSObject] - $CalendarView, - - [Parameter()] - [PSObject] - $Onenote, - - [Parameter()] - [System.String] - $SecurityIdentifier, - - [Parameter()] - [System.String] - $DisplayName, - - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [PSObject] - $OwnedDevices, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [PSObject] - $FollowedSites, - - [Parameter()] - [PSObject] - $Drives, - - [Parameter()] - [System.String[]] - $Interests, - - [Parameter()] - [System.String] - $LegalAgeGroupClassification, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [System.String] - $OnPremisesSecurityIdentifier, - - [Parameter()] - [System.String] - $UserId, - - [Parameter()] - [PSObject] - $HttpPipelineAppend, - - [Parameter()] - [PSObject] - $Calendar, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $OnPremisesSyncEnabled, - - [Parameter()] - [System.String] - $Department, - - [Parameter()] - [System.String] - $CompanyName, - - [Parameter()] - [PSObject] - $MemberOf, - - [Parameter()] - [System.String] - $EmployeeId, - - [Parameter()] - [PSObject] - $AssignedLicenses, - - [Parameter()] - [PSObject] - $Events, - - [Parameter()] - [System.String] - $UserPrincipalName, - - [Parameter()] - [System.String[]] - $Responsibilities, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, - - [Parameter()] - [PSObject] - $ProvisionedPlans, - - [Parameter()] - [PSObject] - $OnPremisesProvisioningErrors, - - [Parameter()] - [System.String] - $MailNickname, - - [Parameter()] - [PSObject] - $OnPremisesExtensionAttributes, - - [Parameter()] - [System.String[]] - $PastProjects, - - [Parameter()] - [System.DateTime] - $CreatedDateTime, - - [Parameter()] - [PSObject] - $DirectReports, - - [Parameter()] - [PSObject] - $Authentication, - - [Parameter()] - [PSObject] - $LicenseAssignmentStates, - - [Parameter()] - [PSObject] - $Activities, - - [Parameter()] - [PSObject] - $Outlook, - - [Parameter()] - [PSObject] - $DeviceManagementTroubleshootingEvents, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.String] - $OnPremisesSamAccountName, - - [Parameter()] - [System.String] - $PreferredName, - - [Parameter()] - [System.String] - $PostalCode, - - [Parameter()] - [System.String] - $Surname - ) -} -#endregion -#region Microsoft.Graph.Users.Actions -function Set-MgUserLicense -{ - [CmdletBinding()] - param( - [Parameter()] - [PSObject] - $HttpPipelinePrepend, - - [Parameter()] - [PSObject] - $BodyParameter, - - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.String[]] - $RemoveLicenses, - - [Parameter()] - [PSObject] - $AddLicenses, - - [Parameter()] - [PSObject] - $InputObject, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [PSObject] - $HttpPipelineAppend, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.String] - $UserId, - - [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break - ) -} -#endregion -#region ExchangeOnlineManagement -function Get-AdminAuditLogConfig -{ - [CmdletBinding()] - param( - - ) -} -function Get-AuditConfig -{ - [CmdletBinding()] - param( - [Parameter()] - [System.Object] - $DomainController - ) -} -function Get-AuditConfigurationPolicy -{ - [CmdletBinding()] - param( - [Parameter()] - [System.Object] - $Identity, - - [Parameter()] - [System.Object] - $DomainController - ) -} -function Get-AutoSensitivityLabelPolicy -{ - [CmdletBinding()] - param( - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ForceValidate, - - [Parameter()] - [System.Boolean] - $IncludeTestModeResults, - - [Parameter()] - [System.Object] - $Identity, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $IncludeProgressFeedback, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $DistributionDetail - ) -} -function Get-AutoSensitivityLabelRule -{ - [CmdletBinding()] - param( - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ForceValidate, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [System.Object] - $Identity, - - [Parameter()] - [System.Boolean] - $IncludeExecutionRuleInformation, - - [Parameter()] - [System.Object] - $Policy, - - [Parameter()] - [System.Boolean] - $IncludeExecutionRuleGuids - ) -} -function Get-CaseHoldPolicy -{ - [CmdletBinding()] - param( - [Parameter()] - [System.Management.Automation.SwitchParameter] - $IncludeBindingsOnly, - - [Parameter()] - [System.String] - $Case, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $IncludeBindings, - - [Parameter()] - [System.Object] - $Identity, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $DistributionDetail - ) -} -function Get-CaseHoldRule -{ - [CmdletBinding()] - param( - [Parameter()] - [System.Object] - $Identity, - - [Parameter()] - [System.Object] - $Policy - ) -} -function Get-ComplianceCase -{ - [CmdletBinding()] - param( - [Parameter()] - [System.Object] - $CaseType, - - [Parameter()] - [System.String] - $RoleGroup, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $RecentOnly, - - [Parameter()] - [System.Object] - $Identity, - - [Parameter()] - [System.Object] - $DomainController - ) -} -function Get-ComplianceRetentionEvent -{ - [CmdletBinding()] - param( - [Parameter()] - [System.Object] - $BeginDateTime, - - [Parameter()] - [System.Object] - $Identity, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $PreviewOnly, - - [Parameter()] - [System.Object] - $EndDateTime, - - [Parameter()] - [System.Object] - $DomainController - ) -} -function Get-ComplianceRetentionEventType -{ - [CmdletBinding()] - param( - [Parameter()] - [System.Object] - $Identity, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $LoadTag - ) -} -function Get-ComplianceSearch -{ - [CmdletBinding()] - param( - [Parameter()] - [System.String] - $Case, - - [Parameter()] - [System.Object] - $Identity, - - [Parameter()] - [System.Object] - $ResultSize - ) -} -function Get-ComplianceSearchAction -{ - [CmdletBinding()] - param( - [Parameter()] - [System.String] - $Case, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Purge, - - [Parameter()] - [System.Object] - $Identity, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $IncludeCredential, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Details, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Export, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Preview, - - [Parameter()] - [System.Object] - $ResultSize - ) -} -function Get-ComplianceTag -{ - [CmdletBinding()] - param( - [Parameter()] - [System.Management.Automation.SwitchParameter] - $IncludingLabelState, - - [Parameter()] - [System.Object] - $Identity - ) -} -function Get-DeviceConditionalAccessPolicy -{ - [CmdletBinding()] - param( - [Parameter()] - [System.Object] - $Identity - ) -} -function Get-DeviceConfigurationPolicy -{ - [CmdletBinding()] - param( - [Parameter()] - [System.Object] - $Identity - ) -} -function Get-DlpCompliancePolicy -{ - [CmdletBinding()] - param( - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Summary, - - [Parameter()] - [System.Boolean] - $IncludeRulesMetadata, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ForceValidate, - - [Parameter()] - [System.Boolean] - $IncludeExtendedProperties, - - [Parameter()] - [System.Object] - $Identity, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $IRMUserRiskConfiguredAnyRule, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $DistributionDetail - ) -} -function Get-DlpComplianceRule -{ - [CmdletBinding()] - param( - [Parameter()] - [System.Object] - $Identity, - - [Parameter()] - [System.Object] - $Policy, - - [Parameter()] - [System.Boolean] - $IncludeExecutionRuleGuids - ) -} -function Get-FilePlanPropertyAuthority -{ - [CmdletBinding()] - param( + [System.Boolean] + $IncludeExecutionRuleGuids + ) +} +function Get-FilePlanPropertyAuthority +{ + [CmdletBinding()] + param( [Parameter()] [System.Object] $Identity @@ -63979,15 +60205,19 @@ function Get-Label param( [Parameter()] [System.Management.Automation.SwitchParameter] - $SkipValidations, + $IncludeDetailedLabelActions, [Parameter()] - [System.Object] - $Identity, + [System.Management.Automation.SwitchParameter] + $SkipValidations, [Parameter()] [System.Management.Automation.SwitchParameter] - $IncludeDetailedLabelActions + $ValidateContentTypeRemoval, + + [Parameter()] + [System.Object] + $Identity ) } function Get-LabelPolicy @@ -64241,19 +60471,27 @@ function New-AutoSensitivityLabelPolicy [Parameter()] [System.Object] - $PolicyTemplateInfo, + $SharePointAdaptiveScopes, [Parameter()] - [System.String] - $Name, + [System.Object] + $ExternalMailRightsManagementOwner, [Parameter()] [System.Object] - $PolicyRBACScopes, + $OneDriveAdaptiveScopesException, [Parameter()] [System.Object] - $ExchangeLocation, + $PolicyTemplateInfo, + + [Parameter()] + [System.Object] + $PolicyRBACScopes, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Force, [Parameter()] [System.Object] @@ -64271,25 +60509,49 @@ function New-AutoSensitivityLabelPolicy [System.Object[]] $ExceptIfOneDriveSharedBy, + [Parameter()] + [System.Object] + $ExchangeLocation, + [Parameter()] [System.Object] $OneDriveLocationException, + [Parameter()] + [System.String] + $Name, + [Parameter()] [System.String] $Comment, + [Parameter()] + [System.Object] + $OneDriveAdaptiveScopes, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + [Parameter()] [System.Boolean] $UnifiedAuditLogEnabled, + [Parameter()] + [System.Object] + $ExchangeAdaptiveScopesException, + + [Parameter()] + [System.Object[]] + $ExceptIfOneDriveSharedByMemberOf, + [Parameter()] [System.String] $ApplySensitivityLabel, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [System.Object[]] + $OneDriveSharedByMemberOf, [Parameter()] [System.Object[]] @@ -64303,13 +60565,17 @@ function New-AutoSensitivityLabelPolicy [System.Object[]] $ExchangeSenderMemberOf, + [Parameter()] + [System.Object] + $SharePointAdaptiveScopesException, + [Parameter()] [System.Object[]] $ExchangeSenderMemberOfException, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Force, + [System.Object] + $ExchangeAdaptiveScopes, [Parameter()] [System.Object] @@ -64321,11 +60587,7 @@ function New-AutoSensitivityLabelPolicy [Parameter()] [System.Boolean] - $OverwriteLabel, - - [Parameter()] - [System.Object] - $ExternalMailRightsManagementOwner + $OverwriteLabel ) } function New-AutoSensitivityLabelRule @@ -64816,8 +61078,12 @@ function New-ComplianceSearchAction [CmdletBinding()] param( [Parameter()] - [System.String] - $ReferenceActionName, + [System.String[]] + $SearchName, + + [Parameter()] + [System.Object] + $ArchiveFormat, [Parameter()] [System.Management.Automation.SwitchParameter] @@ -64827,6 +61093,14 @@ function New-ComplianceSearchAction [System.Boolean] $IncludeSharePointDocumentVersions, + [Parameter()] + [System.String] + $ReferenceActionName, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Preview, + [Parameter()] [System.Management.Automation.SwitchParameter] $Force, @@ -64843,10 +61117,22 @@ function New-ComplianceSearchAction [System.String] $Version, + [Parameter()] + [System.String] + $NotifyEmailCC, + + [Parameter()] + [System.Object] + $Format, + [Parameter()] [System.Int32] $JobOptions, + [Parameter()] + [System.Boolean] + $EnableDedupe, + [Parameter()] [System.Management.Automation.SwitchParameter] $RetentionReport, @@ -64855,6 +61141,10 @@ function New-ComplianceSearchAction [System.Management.Automation.SwitchParameter] $Purge, + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Export, + [Parameter()] [System.Object] $PurgeType, @@ -64872,8 +61162,12 @@ function New-ComplianceSearchAction $Confirm, [Parameter()] - [System.Boolean] - $EnableDedupe, + [System.Object] + $ExchangeArchiveFormat, + + [Parameter()] + [System.Object] + $Scenario, [Parameter()] [System.Object] @@ -64884,8 +61178,12 @@ function New-ComplianceSearchAction $SearchNames, [Parameter()] - [System.String[]] - $SearchName, + [System.String] + $NotifyEmail, + + [Parameter()] + [System.Object] + $SharePointArchiveFormat, [Parameter()] [System.String] @@ -65023,33 +61321,57 @@ function New-DlpCompliancePolicy { [CmdletBinding()] param( + [Parameter()] + [System.Object[]] + $OneDriveSharedBy, + [Parameter()] [System.Object] - $PowerBIDlpLocationException, + $SharePointAdaptiveScopes, + + [Parameter()] + [System.Object] + $TeamsAdaptiveScopes, + + [Parameter()] + [System.Object] + $PolicyTemplateInfo, + + [Parameter()] + [System.Object] + $OneDriveAdaptiveScopesException, [Parameter()] [System.Object] $Priority, + [Parameter()] + [System.Object] + $TeamsAdaptiveScopesException, + [Parameter()] [System.Management.Automation.SwitchParameter] $Confirm, [Parameter()] - [System.Object] - $PolicyTemplateInfo, + [System.String] + $Name, [Parameter()] [System.Object] $EndpointDlpLocationException, + [Parameter()] + [System.Object] + $EndpointDlpAdaptiveScopes, + [Parameter()] [System.Object] $PolicyRBACScopes, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Force, + [System.Object] + $SharePointAdaptiveScopesException, [Parameter()] [System.Object] @@ -65059,13 +61381,17 @@ function New-DlpCompliancePolicy [System.Object[]] $ExceptIfOneDriveSharedBy, + [Parameter()] + [System.Object] + $SharePointLocationException, + [Parameter()] [System.Object] $ThirdPartyAppDlpLocationException, [Parameter()] [System.Object] - $ExchangeLocation, + $ExchangeAdaptiveScopes, [Parameter()] [System.Object] @@ -65073,11 +61399,11 @@ function New-DlpCompliancePolicy [Parameter()] [System.String] - $Name, + $Comment, [Parameter()] - [System.String] - $Comment, + [System.Object] + $OneDriveAdaptiveScopes, [Parameter()] [System.Object] @@ -65085,11 +61411,11 @@ function New-DlpCompliancePolicy [Parameter()] [System.Object] - $TeamsLocationException, + $ExchangeLocation, [Parameter()] - [System.Object[]] - $OneDriveSharedBy, + [System.Object] + $TeamsLocationException, [Parameter()] [System.Object] @@ -65099,6 +61425,10 @@ function New-DlpCompliancePolicy [System.Object] $EndpointDlpLocation, + [Parameter()] + [System.Object] + $ExchangeAdaptiveScopesException, + [Parameter()] [System.Object[]] $ExceptIfOneDriveSharedByMemberOf, @@ -65111,6 +61441,10 @@ function New-DlpCompliancePolicy [System.Object[]] $OneDriveSharedByMemberOf, + [Parameter()] + [System.Object] + $PowerBIDlpLocationException, + [Parameter()] [System.Object] $ThirdPartyAppDlpLocation, @@ -65131,13 +61465,17 @@ function New-DlpCompliancePolicy [System.Object[]] $ExchangeSenderMemberOfException, + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Force, + [Parameter()] [System.Object] - $SharePointLocationException, + $Mode, [Parameter()] [System.Object] - $Mode + $EndpointDlpAdaptiveScopesException ) } function New-DlpComplianceRule @@ -65192,6 +61530,10 @@ function New-DlpComplianceRule [System.Object[]] $FromMemberOf, + [Parameter()] + [System.Boolean] + $EnforcePortalAccess, + [Parameter()] [System.Boolean] $ContentIsShared, @@ -65268,6 +61610,10 @@ function New-DlpComplianceRule [System.Object] $EncryptRMSTemplate, + [Parameter()] + [System.Boolean] + $NotifyEmailExchangeIncludeAttachment, + [Parameter()] [System.Object] $ExceptIfAccessScope, @@ -65308,6 +61654,10 @@ function New-DlpComplianceRule [System.Object] $Moderate, + [Parameter()] + [System.String] + $NotifyEmailCustomSenderDisplayName, + [Parameter()] [System.Object] $GenerateAlert, @@ -65444,6 +61794,10 @@ function New-DlpComplianceRule [System.Object] $SenderDomainIs, + [Parameter()] + [System.String] + $ApplyBrandingTemplate, + [Parameter()] [System.Object] $ExceptIfDocumentMatchesPatterns, @@ -66109,8 +62463,8 @@ function New-LabelPolicy $PolicyRBACScopes, [Parameter()] - [System.Object] - $ExchangeLocation, + [System.Management.Automation.SwitchParameter] + $Force, [Parameter()] [System.Object] @@ -66120,6 +62474,10 @@ function New-LabelPolicy [System.Object] $Setting, + [Parameter()] + [System.Object] + $ExchangeLocation, + [Parameter()] [System.Object] $OneDriveLocationException, @@ -66144,6 +62502,10 @@ function New-LabelPolicy [System.Object] $ExchangeLocationException, + [Parameter()] + [System.Object] + $ExchangeAdaptiveScopesException, + [Parameter()] [System.Management.Automation.SwitchParameter] $Confirm, @@ -66161,8 +62523,8 @@ function New-LabelPolicy $SkypeLocationException, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Force, + [System.Object] + $ExchangeAdaptiveScopes, [Parameter()] [System.Object] @@ -67118,8 +63480,8 @@ function Set-AutoSensitivityLabelPolicy $OneDriveSharedBy, [Parameter()] - [System.Management.Automation.SwitchParameter] - $SystemOperation, + [System.Object] + $SharePointAdaptiveScopes, [Parameter()] [System.Boolean] @@ -67137,10 +63499,18 @@ function Set-AutoSensitivityLabelPolicy [System.Object] $Identity, + [Parameter()] + [System.Object] + $OneDriveAdaptiveScopesException, + [Parameter()] [System.Boolean] $Enabled, + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + [Parameter()] [System.Object] $RemoveOneDriveLocationException, @@ -67158,8 +63528,12 @@ function Set-AutoSensitivityLabelPolicy $PolicyRBACScopes, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Force, + [System.Object] + $SharePointAdaptiveScopesException, + + [Parameter()] + [System.Object] + $ExchangeAdaptiveScopes, [Parameter()] [System.Object] @@ -67189,6 +63563,10 @@ function Set-AutoSensitivityLabelPolicy [System.Object[]] $ExchangeSenderException, + [Parameter()] + [System.Object] + $OneDriveAdaptiveScopes, + [Parameter()] [System.Object] $AddSharePointLocationException, @@ -67197,13 +63575,17 @@ function Set-AutoSensitivityLabelPolicy [System.Boolean] $OverwriteLabel, + [Parameter()] + [System.Object[]] + $ExceptIfOneDriveSharedByMemberOf, + [Parameter()] [System.String] $ApplySensitivityLabel, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [System.Object[]] + $OneDriveSharedByMemberOf, [Parameter()] [System.Object[]] @@ -67217,6 +63599,10 @@ function Set-AutoSensitivityLabelPolicy [System.Object] $RemoveExchangeLocation, + [Parameter()] + [System.Management.Automation.SwitchParameter] + $SystemOperation, + [Parameter()] [System.Object[]] $ExchangeSenderMemberOf, @@ -67229,6 +63615,10 @@ function Set-AutoSensitivityLabelPolicy [System.Object] $RemoveOneDriveLocation, + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Force, + [Parameter()] [System.Object] $AddOneDriveLocation, @@ -67241,6 +63631,10 @@ function Set-AutoSensitivityLabelPolicy [System.Object] $Mode, + [Parameter()] + [System.Object] + $ExchangeAdaptiveScopesException, + [Parameter()] [System.Boolean] $StartSimulation @@ -67885,24 +64279,24 @@ function Set-DlpCompliancePolicy [CmdletBinding()] param( [Parameter()] - [System.Object[]] - $OneDriveSharedBy, + [System.Object] + $RemoveExchangeLocation, [Parameter()] [System.Object] - $RemoveTeamsLocation, + $RemoveOnPremisesScannerDlpLocationException, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [System.Object] + $AddSharePointLocation, [Parameter()] [System.Object] - $RemoveThirdPartyAppDlpLocationException, + $RemoveThirdPartyAppDlpLocation, [Parameter()] - [System.Object] - $Identity, + [System.Object[]] + $ExceptIfOneDriveSharedByMemberOf, [Parameter()] [System.Object[]] @@ -67910,99 +64304,111 @@ function Set-DlpCompliancePolicy [Parameter()] [System.Object] - $RemoveEndpointDlpLocation, + $RemoveTeamsLocationException, [Parameter()] [System.Object] - $RemoveOneDriveLocationException, + $RemoveSharePointLocation, [Parameter()] [System.Object] - $AddSharePointLocation, + $Mode, [Parameter()] [System.Object] - $AddExchangeLocation, + $EndpointDlpAdaptiveScopesException, [Parameter()] [System.Object] - $AddTeamsLocation, + $AddThirdPartyAppDlpLocation, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Force, + [System.Object] + $TeamsAdaptiveScopes, [Parameter()] [System.Object] - $Priority, + $ExchangeAdaptiveScopes, [Parameter()] [System.Object] - $AddSharePointLocationException, + $OneDriveAdaptiveScopes, [Parameter()] [System.Object] - $RemoveSharePointLocation, + $PolicyRBACScopes, [Parameter()] - [System.Object[]] - $ExceptIfOneDriveSharedBy, + [System.Object] + $AddOneDriveLocation, [Parameter()] [System.Object] - $AddOneDriveLocationException, + $AddTeamsLocationException, [Parameter()] [System.Object] - $RemoveThirdPartyAppDlpLocation, + $RemoveSharePointLocationException, + + [Parameter()] + [System.Object] + $RemoveThirdPartyAppDlpLocationException, + + [Parameter()] + [System.Object[]] + $OneDriveSharedBy, [Parameter()] [System.String] $Comment, [Parameter()] - [System.Management.Automation.SwitchParameter] - $RetryDistribution, + [System.Object] + $AddEndpointDlpLocation, [Parameter()] [System.Object] - $AddEndpointDlpLocation, + $RemoveOnPremisesScannerDlpLocation, + + [Parameter()] + [System.Object[]] + $ExchangeSenderMemberOfException, [Parameter()] [System.Object] - $RemovePowerBIDlpLocation, + $AddTeamsLocation, [Parameter()] [System.Object] - $AddPowerBIDlpLocation, + $OneDriveAdaptiveScopesException, [Parameter()] [System.Object] - $AddThirdPartyAppDlpLocation, + $AddExchangeLocation, [Parameter()] [System.Object] - $PolicyRBACScopes, + $SharePointAdaptiveScopes, [Parameter()] - [System.Object[]] - $ExceptIfOneDriveSharedByMemberOf, + [System.Object] + $AddOnPremisesScannerDlpLocationException, [Parameter()] [System.Object] - $AddThirdPartyAppDlpLocationException, + $Priority, [Parameter()] [System.Object] - $AddEndpointDlpLocationException, + $RemoveOneDriveLocationException, [Parameter()] [System.Object] - $AddOnPremisesScannerDlpLocation, + $ExchangeAdaptiveScopesException, [Parameter()] [System.Object] - $AddPowerBIDlpLocationException, + $RemoveEndpointDlpLocation, [Parameter()] [System.Object] @@ -68010,59 +64416,87 @@ function Set-DlpCompliancePolicy [Parameter()] [System.Object] - $RemoveSharePointLocationException, + $RemoveEndpointDlpLocationException, [Parameter()] [System.Object] - $RemoveTeamsLocationException, + $PolicyTemplateInfo, [Parameter()] - [System.Object[]] - $ExchangeSenderMemberOf, + [System.Management.Automation.SwitchParameter] + $RetryDistribution, + + [Parameter()] + [System.Object] + $TeamsAdaptiveScopesException, [Parameter()] [System.Object[]] - $ExchangeSenderMemberOfException, + $ExceptIfOneDriveSharedBy, [Parameter()] [System.Object] - $RemoveOneDriveLocation, + $AddOnPremisesScannerDlpLocation, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, [Parameter()] [System.Object] - $RemoveOnPremisesScannerDlpLocationException, + $AddEndpointDlpLocationException, [Parameter()] [System.Object] - $AddOneDriveLocation, + $RemovePowerBIDlpLocation, [Parameter()] [System.Object] - $RemoveExchangeLocation, + $AddOneDriveLocationException, [Parameter()] [System.Object] - $RemoveOnPremisesScannerDlpLocation, + $RemoveTeamsLocation, [Parameter()] [System.Object] - $Mode, + $EndpointDlpAdaptiveScopes, [Parameter()] [System.Object] - $RemoveEndpointDlpLocationException, + $AddPowerBIDlpLocation, + + [Parameter()] + [System.Object[]] + $ExchangeSenderMemberOf, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Force, [Parameter()] [System.Object] - $PolicyTemplateInfo, + $AddSharePointLocationException, [Parameter()] [System.Object] - $AddOnPremisesScannerDlpLocationException, + $AddThirdPartyAppDlpLocationException, + + [Parameter()] + [System.Object] + $AddPowerBIDlpLocationException, [Parameter()] [System.Object] - $AddTeamsLocationException + $Identity, + + [Parameter()] + [System.Object] + $RemoveOneDriveLocation, + + [Parameter()] + [System.Object] + $SharePointAdaptiveScopesException ) } function Set-DlpComplianceRule @@ -68113,6 +64547,10 @@ function Set-DlpComplianceRule [System.Object[]] $FromMemberOf, + [Parameter()] + [System.Boolean] + $EnforcePortalAccess, + [Parameter()] [System.Boolean] $ContentIsShared, @@ -68189,6 +64627,10 @@ function Set-DlpComplianceRule [System.Object] $EncryptRMSTemplate, + [Parameter()] + [System.Boolean] + $NotifyEmailExchangeIncludeAttachment, + [Parameter()] [System.Object] $ExceptIfAccessScope, @@ -68229,6 +64671,14 @@ function Set-DlpComplianceRule [System.Object] $Moderate, + [Parameter()] + [System.Boolean] + $Disabled, + + [Parameter()] + [System.String] + $NotifyEmailCustomSenderDisplayName, + [Parameter()] [System.Object] $GenerateAlert, @@ -68285,10 +64735,6 @@ function Set-DlpComplianceRule [System.Boolean] $RestrictBrowserAccess, - [Parameter()] - [System.Object] - $ExceptIfSentTo, - [Parameter()] [System.Object] $ExceptIfDocumentCreatedBy, @@ -68321,10 +64767,6 @@ function Set-DlpComplianceRule [System.Object] $ExceptIfFromAddressContainsWords, - [Parameter()] - [System.Object] - $SubjectMatchesPatterns, - [Parameter()] [System.Boolean] $ExceptIfProcessingLimitExceeded, @@ -68350,8 +64792,8 @@ function Set-DlpComplianceRule $RedirectMessageTo, [Parameter()] - [System.String] - $AdvancedRule, + [System.Boolean] + $RemoveRMSTemplate, [Parameter()] [System.Object] @@ -68369,6 +64811,10 @@ function Set-DlpComplianceRule [System.Object] $SenderDomainIs, + [Parameter()] + [System.String] + $ApplyBrandingTemplate, + [Parameter()] [System.Object] $ExceptIfDocumentMatchesPatterns, @@ -68405,6 +64851,10 @@ function Set-DlpComplianceRule [System.Object] $SubjectOrBodyMatchesPatterns, + [Parameter()] + [System.String] + $AdvancedRule, + [Parameter()] [System.Object] $DocumentMatchesPatterns, @@ -68418,8 +64868,8 @@ function Set-DlpComplianceRule $EndpointDlpBrowserRestrictions, [Parameter()] - [System.Boolean] - $RemoveRMSTemplate, + [System.Object] + $SubjectMatchesPatterns, [Parameter()] [System.Object] @@ -68538,8 +64988,8 @@ function Set-DlpComplianceRule $ModifySubject, [Parameter()] - [System.Boolean] - $Disabled, + [System.Object] + $ExceptIfSentTo, [Parameter()] [System.Object] @@ -69040,6 +65490,10 @@ function Set-LabelPolicy [System.Object] $AddSharePointLocationException, + [Parameter()] + [System.Object] + $ExchangeAdaptiveScopesException, + [Parameter()] [System.Object] $RemoveSkypeLocationException, @@ -69068,6 +65522,10 @@ function Set-LabelPolicy [System.Object] $RemoveOneDriveLocation, + [Parameter()] + [System.Object] + $ExchangeAdaptiveScopes, + [Parameter()] [System.Object] $AddOneDriveLocation, @@ -69659,6 +66117,7 @@ function Update-RoleGroupMember ) } #endregion + #region PnP.PowerShell function Add-PnPApp {