diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOResourceConfiguration/MSFT_EXOResourceConfiguration.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOResourceConfiguration/MSFT_EXOResourceConfiguration.psm1 index a4865d4154..a085d2f47f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_EXOResourceConfiguration/MSFT_EXOResourceConfiguration.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_EXOResourceConfiguration/MSFT_EXOResourceConfiguration.psm1 @@ -81,7 +81,7 @@ function Get-TargetResource $result = @{ Identity = $ResourceConfiguration.Identity - ResourcePropertySchema = $ResourceConfiguration.ResourcePropertySchema + ResourcePropertySchema = $ResourceConfiguration.ResourcePropertySchema Credential = $Credential Ensure = 'Present' ApplicationId = $ApplicationId diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneASRRulesPolicyWindows10/MSFT_IntuneASRRulesPolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneASRRulesPolicyWindows10/MSFT_IntuneASRRulesPolicyWindows10.psm1 index b5917cec67..a0c0fada83 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneASRRulesPolicyWindows10/MSFT_IntuneASRRulesPolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneASRRulesPolicyWindows10/MSFT_IntuneASRRulesPolicyWindows10.psm1 @@ -111,7 +111,7 @@ function Get-TargetResource [Parameter(Mandatory = $True)] [System.String] [ValidateSet('Absent', 'Present')] - $Ensure = $true, + $Ensure = "Present", [Parameter()] [System.Management.Automation.PSCredential] @@ -143,12 +143,11 @@ function Get-TargetResource $context=Get-MgContext if($null -eq $context) { - New-M365DSCConnection -Workload 'MicrosoftGraph' ` - -InboundParameters $PSBoundParameters -ErrorAction Stop + $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftGraph' ` + -InboundParameters $PSBoundParameters -ProfileName 'beta' -ErrorAction Stop } Write-Verbose -Message "Select-MgProfile" - Select-MgProfile -Name 'beta' #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -177,6 +176,12 @@ function Get-TargetResource return $nullResult } + if ($null -eq $policy) + { + Write-Verbose -Message "No Endpoint Protection Attack Surface Protection rules Policy {$DisplayName} was found" + return $nullResult + } + #Retrieve policy specific settings [array]$settings = Get-MgDeviceManagementIntentSetting ` -DeviceManagementIntentId $Identity ` @@ -338,7 +343,7 @@ function Set-TargetResource [Parameter(Mandatory = $True)] [System.String] [ValidateSet('Absent', 'Present')] - $Ensure = $true, + $Ensure = "Present", [Parameter()] [System.Management.Automation.PSCredential] @@ -556,7 +561,7 @@ function Test-TargetResource [Parameter(Mandatory = $True)] [System.String] [ValidateSet('Absent', 'Present')] - $Ensure = $true, + $Ensure = "Present", [Parameter()] [System.Management.Automation.PSCredential] @@ -665,7 +670,7 @@ function Export-TargetResource try { - $policyTemplateID='0e237410-1367-4844-bd7f-15fb0f08943b' + $policyTemplateID = '0e237410-1367-4844-bd7f-15fb0f08943b' [array]$policies = Get-MgDeviceManagementIntent ` -ErrorAction Stop ` -All:$true ` diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAntivirusPolicyWindows10SettingCatalog/MSFT_IntuneAntivirusPolicyWindows10SettingCatalog.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAntivirusPolicyWindows10SettingCatalog/MSFT_IntuneAntivirusPolicyWindows10SettingCatalog.psm1 index d731d6c2a5..4482cc67f3 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAntivirusPolicyWindows10SettingCatalog/MSFT_IntuneAntivirusPolicyWindows10SettingCatalog.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAntivirusPolicyWindows10SettingCatalog/MSFT_IntuneAntivirusPolicyWindows10SettingCatalog.psm1 @@ -267,7 +267,7 @@ function Get-TargetResource try { #Retrieve policy general settings - $policy = Get-MgDeviceManagementConfigurationPolicy -Identity $Identity -ErrorAction Stop + $policy = Get-MgDeviceManagementConfigurationPolicy -DeviceManagementConfigurationPolicyId $Identity -ErrorAction Stop if ($null -eq $policy) { @@ -285,37 +285,37 @@ function Get-TargetResource $returnHashtable.Add("DisplayName",$policy.name) $returnHashtable.Add("Description",$policy.description) - foreach ($setting in $settings) + foreach ($setting in $settings.settingInstance) { - $addToParameters=$true - $settingName=$setting.settingDefinitionId.Split("_")|Select-Object -Last 1 + $addToParameters = $true + $settingName = $setting.settingDefinitionId.Split("_")|Select-Object -Last 1 - switch ($setting."@odata.type") + switch ($setting.AdditionalProperties."@odata.type") { "#microsoft.graph.deviceManagementConfigurationSimpleSettingCollectionInstance" { - $values=@() + $values = @() foreach($value in $setting.simpleSettingCollectionValue) { - $values+=Get-DeviceManagementConfigurationSettingInstanceValue -Setting $value + $values += Get-DeviceManagementConfigurationSettingInstanceValue -Setting $value } - $settingValue= $values + $settingValue = $values } "#microsoft.graph.deviceManagementConfigurationGroupSettingCollectionInstance" { - $values=@() - foreach($value in $setting.groupSettingCollectionValue.children) + $values = @() + foreach ($value in $setting.groupSettingCollectionValue.children) { - $settingName=$value.settingDefinitionId.split("_")|Select-Object -Last 1 - $settingValue= Get-DeviceManagementConfigurationSettingInstanceValue -Setting $value + $settingName = $value.settingDefinitionId.split("_")|Select-Object -Last 1 + $settingValue = Get-DeviceManagementConfigurationSettingInstanceValue -Setting $value $returnHashtable.Add($settingName,$settingValue) - $addToParameters=$false + $addToParameters = $false } } Default { - $settingValue= Get-DeviceManagementConfigurationSettingInstanceValue -Setting $setting + $settingValue = Get-DeviceManagementConfigurationSettingInstanceValue -Setting $setting.AdditionalProperties } } if ($addToParameters) @@ -324,8 +324,8 @@ function Get-TargetResource } } - $returnAssignments=@() - $returnAssignments+=Get-MgDeviceManagementConfigurationPolicyAssignments -DeviceManagementConfigurationPolicyId $Identity + $returnAssignments = @() + $returnAssignments += Get-MgDeviceManagementConfigurationPolicyAssignment -DeviceManagementConfigurationPolicyId $Identity $returnHashtable.Add('Assignments',$returnAssignments) Write-Verbose -Message "Found Endpoint Protection Policy {$($policy.name)}" @@ -982,7 +982,7 @@ function Test-TargetResource $TestResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` -DesiredValues $PSBoundParameters ` - -ValuesToCheck $ValuesToCheck.Keys -Verbose + -ValuesToCheck $ValuesToCheck.Keys } Write-Verbose -Message "Test-TargetResource returned $TestResult" @@ -1023,9 +1023,9 @@ function Export-TargetResource $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftGraph' ` -InboundParameters $PSBoundParameters ` - -SkipModuleReload:$true + -SkipModuleReload:$true ` + -ProfileName 'Beta' - Select-MgProfile -Name 'Beta' #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -1045,10 +1045,10 @@ function Export-TargetResource { $policyTemplateID='804339ad-1553-4478-a742-138fb5807418_1' [array]$policies = Get-MgDeviceManagementConfigurationPolicy ` - -All:$true ` - -Filter $Filter ` -ErrorAction Stop ` - -TemplateId $policyTemplateID + -All:$true ` + -Filter $Filter + $policies = $policies | Where-Object -FilterScript {$_.TemplateReference.TemplateId -eq $policyTemplateId} if ($policies.Length -eq 0) { @@ -1649,353 +1649,7 @@ function Format-M365DSCIntuneSettingCatalogPolicySettings return $settings } -function Get-MgDeviceManagementConfigurationPolicy -{ - [CmdletBinding()] - param ( - [Parameter( - Mandatory = 'true', - ParameterSetName = 'Identity' - )] - [System.String] - $Identity, - [Parameter( - Mandatory = 'true', - ParameterSetName = 'TemplateId' - )] - [System.String] - $TemplateId - ) - try - { - if(-Not [String]::IsNullOrEmpty($Identity)) - { - try - { - $Uri="https://graph.microsoft.com/beta/deviceManagement/ConfigurationPolicies/$Identity" - $configurationPolicy=Invoke-MgGraphRequest -Method GET -Uri $Uri -ErrorAction Stop - return $configurationPolicy - } - catch - { - return $null - } - } - if(-Not [String]::IsNullOrEmpty($TemplateId)) - { - $Uri="https://graph.microsoft.com/beta/deviceManagement/ConfigurationPolicies" - [Array]$configurationPolicies=(Invoke-MgGraphRequest -Method GET -Uri $Uri -ErrorAction Stop).value - return ($configurationPolicies|Where-Object -FilterScript {$_.templateReference.templateId -eq "$TemplateId" }) - } - } - catch - { - try - { - Write-Verbose -Message $_ - $tenantIdValue = $Credential.UserName.Split('@')[1] - - Add-M365DSCEvent -Message $_ -EntryType 'Error' ` - -EventID 1 -Source $($MyInvocation.MyCommand.Source) ` - -TenantId $tenantIdValue - } - catch - { - Write-Verbose -Message $_ - } - return $null - } -} - -function New-MgDeviceManagementConfigurationPolicy -{ - [CmdletBinding()] - param ( - - [Parameter(Mandatory = 'true')] - [System.String] - $DisplayName, - - [Parameter()] - [System.String] - $Description, - - [Parameter()] - [System.String] - $TemplateReferenceId, - - [Parameter()] - [System.String] - $Platforms, - - [Parameter()] - [System.String] - $Technologies, - - [Parameter()] - [System.Array] - $Settings - ) - - $templateReference=@{ - "templateId"=$TemplateReferenceId - } - - $Uri="https://graph.microsoft.com/beta/deviceManagement/ConfigurationPolicies" - $policy=[ordered]@{ - "name"=$DisplayName - "description"=$Description - "platforms"=$Platforms - "technologies"=$Technologies - "templateReference"=$templateReference - "settings"=$Settings - } - #write-verbose (($policy|ConvertTo-Json -Depth 20)) - Invoke-MgGraphRequest -Method POST ` - -Uri $Uri ` - -ContentType "application/json" ` - -Body ($policy|ConvertTo-Json -Depth 20) -} - -function Update-MgDeviceManagementConfigurationPolicy -{ - [CmdletBinding()] - param ( - [Parameter(Mandatory = 'true')] - [System.String] - $Identity, - - [Parameter()] - [System.String] - $DisplayName, - - [Parameter()] - [System.String] - $Description, - - [Parameter()] - [System.String] - $TemplateReferenceId, - - [Parameter()] - [System.String] - $Platforms, - - [Parameter()] - [System.String] - $Technologies, - - [Parameter()] - [System.Array] - $Settings - ) - - $templateReference=@{ - "templateId"=$TemplateReferenceId - } - - $Uri="https://graph.microsoft.com/beta/deviceManagement/ConfigurationPolicies/$Identity" - $policy=[ordered]@{ - "name"=$DisplayName - "description"=$Description - "platforms"=$Platforms - "technologies"=$Technologies - "templateReference"=$templateReference - "settings"=$Settings - } - - #write-verbose (($policy|ConvertTo-Json -Depth 20)) - - Invoke-MgGraphRequest -Method PUT ` - -Uri $Uri ` - -ContentType "application/json" ` - -Body ($policy|ConvertTo-Json -Depth 20) -} - -function Remove-MgDeviceManagementConfigurationPolicy -{ - [CmdletBinding()] - param ( - [Parameter(Mandatory = 'true')] - [System.String] - $Identity - ) - - $Uri="https://graph.microsoft.com/beta/deviceManagement/ConfigurationPolicies/$Identity" - - Invoke-MgGraphRequest -Method DELETE -Uri $Uri -} -function Get-MgDeviceManagementConfigurationPolicySetting -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param ( - [Parameter(Mandatory = 'true')] - [System.String] - $DeviceManagementConfigurationPolicyId - ) - try - { - $configurationPolicySettings=@() - - $Uri="https://graph.microsoft.com/beta/deviceManagement/configurationPolicies/$DeviceManagementConfigurationPolicyId/settings" - $results=Invoke-MgGraphRequest -Method GET -Uri $Uri -ErrorAction Stop - $configurationPolicySettings+= $results.value.settingInstance - while($results."@odata.nextLink") - { - $Uri=$results."@odata.nextLink" - $results=Invoke-MgGraphRequest -Method GET -Uri $Uri -ErrorAction Stop - $configurationPolicySettings+= $results.value.settingInstance - } - return $configurationPolicySettings - } - catch - { - try - { - Write-Verbose -Message $_ - $tenantIdValue = "" - $tenantIdValue = $Credential.UserName.Split('@')[1] - Add-M365DSCEvent -Message $_ -EntryType 'Error' ` - -EventID 1 -Source $($MyInvocation.MyCommand.Source) ` - -TenantId $tenantIdValue - } - catch - { - Write-Verbose -Message $_ - } - return $null - } - - -} -function Get-MgDeviceManagementConfigurationPolicyAssignments -{ - [CmdletBinding()] - param ( - [Parameter(Mandatory = 'true')] - [System.String] - $DeviceManagementConfigurationPolicyId - ) - try - { - $configurationPolicyAssignments=@() - - $Uri="https://graph.microsoft.com/beta/deviceManagement/configurationPolicies/$DeviceManagementConfigurationPolicyId/assignments" - $results=Invoke-MgGraphRequest -Method GET -Uri $Uri -ErrorAction Stop - foreach($result in $results.value.target) - { - $configurationPolicyAssignments+=@{ - dataType=$result."@odata.type" - groupId=$result.groupId - collectionId=$result.collectionId - deviceAndAppManagementAssignmentFilterType=$result.deviceAndAppManagementAssignmentFilterType - deviceAndAppManagementAssignmentFilterId=$result.deviceAndAppManagementAssignmentFilterId - } - } - - while($results."@odata.nextLink") - { - $Uri=$results."@odata.nextLink" - $results=Invoke-MgGraphRequest -Method GET -Uri $Uri -ErrorAction Stop - foreach($result in $results.value.target) - { - $configurationPolicyAssignments+=@{ - dataType=$result."@odata.type" - groupId=$result.groupId - collectionId=$result.collectionId - deviceAndAppManagementAssignmentFilterType=$result.deviceAndAppManagementAssignmentFilterType - deviceAndAppManagementAssignmentFilterId=$result.deviceAndAppManagementAssignmentFilterId - } - } - } - return $configurationPolicyAssignments - } - catch - { - try - { - Write-Verbose -Message $_ - $tenantIdValue = "" - $tenantIdValue = $Credential.UserName.Split('@')[1] - Add-M365DSCEvent -Message $_ -EntryType 'Error' ` - -EventID 1 -Source $($MyInvocation.MyCommand.Source) ` - -TenantId $tenantIdValue - } - catch - { - Write-Verbose -Message $_ - } - return $null - } - - -} -function Update-MgDeviceManagementConfigurationPolicyAssignments -{ - [CmdletBinding()] - [OutputType([System.Collections.Hashtable])] - param ( - [Parameter(Mandatory = 'true')] - [System.String] - $DeviceManagementConfigurationPolicyId, - - [Parameter()] - [Array] - $Targets - ) - try - { - $configurationPolicyAssignments=@() - - $Uri="https://graph.microsoft.com/beta/deviceManagement/configurationPolicies/$DeviceManagementConfigurationPolicyId/assign" - foreach($target in $targets) - { - $formattedTarget=@{"@odata.type"=$target.dataType} - if($target.groupId) - { - $formattedTarget.Add('groupId',$target.groupId) - } - if($target.collectionId) - { - $formattedTarget.Add('collectionId',$target.collectionId) - } - if($target.deviceAndAppManagementAssignmentFilterType) - { - $formattedTarget.Add('deviceAndAppManagementAssignmentFilterType',$target.deviceAndAppManagementAssignmentFilterType) - } - if($target.deviceAndAppManagementAssignmentFilterId) - { - $formattedTarget.Add('deviceAndAppManagementAssignmentFilterId',$target.deviceAndAppManagementAssignmentFilterId) - } - $configurationPolicyAssignments+=@{'target'= $formattedTarget} - } - $body=@{'assignments'=$configurationPolicyAssignments}|ConvertTo-Json -Depth 20 - #write-verbose -Message $body - Invoke-MgGraphRequest -Method POST -Uri $Uri -Body $body -ErrorAction Stop - - } - catch - { - try - { - Write-Verbose -Message $_ - $tenantIdValue = "" - $tenantIdValue = $Credential.UserName.Split('@')[1] - Add-M365DSCEvent -Message $_ -EntryType 'Error' ` - -EventID 1 -Source $($MyInvocation.MyCommand.Source) ` - -TenantId $tenantIdValue - } - catch - { - Write-Verbose -Message $_ - } - return $null - } - - -} function Get-MgDeviceManagementConfigurationSettingDefinition { diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneApplicationControlPolicyWindows10/MSFT_IntuneApplicationControlPolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneApplicationControlPolicyWindows10/MSFT_IntuneApplicationControlPolicyWindows10.psm1 index e531f5a6c8..0a91efe68c 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneApplicationControlPolicyWindows10/MSFT_IntuneApplicationControlPolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneApplicationControlPolicyWindows10/MSFT_IntuneApplicationControlPolicyWindows10.psm1 @@ -57,11 +57,9 @@ function Get-TargetResource $context=Get-MgContext if($null -eq $context) { - New-M365DSCConnection -Workload 'MicrosoftGraph' -InboundParameters $PSBoundParameters -ErrorAction Stop + $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftGraph' -InboundParameters $PSBoundParameters -ErrorAction Stop -ProfileName 'beta' } - Write-Verbose -Message "Select-MgProfile" - Select-MgProfile -Name 'beta' #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -185,7 +183,6 @@ function Set-TargetResource -InboundParameters $PSBoundParameters ` -ProfileName 'beta' - Select-MgProfile -Name 'beta' #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies @@ -372,8 +369,8 @@ function Export-TargetResource $CertificateThumbprint ) - $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftGraph' -InboundParameters $PSBoundParameters -SkipModuleReload:$true - Select-MgProfile -Name 'Beta' + $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftGraph' -InboundParameters $PSBoundParameters -SkipModuleReload:$true -ProfileName 'beta' + #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAttackSurfaceReductionRulesPolicyWindows10ConfigManager/MSFT_IntuneAttackSurfaceReductionRulesPolicyWindows10ConfigManager.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAttackSurfaceReductionRulesPolicyWindows10ConfigManager/MSFT_IntuneAttackSurfaceReductionRulesPolicyWindows10ConfigManager.psm1 index 5406e639a2..f5ad36c001 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAttackSurfaceReductionRulesPolicyWindows10ConfigManager/MSFT_IntuneAttackSurfaceReductionRulesPolicyWindows10ConfigManager.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAttackSurfaceReductionRulesPolicyWindows10ConfigManager/MSFT_IntuneAttackSurfaceReductionRulesPolicyWindows10ConfigManager.psm1 @@ -723,7 +723,7 @@ function Test-TargetResource $TestResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` -DesiredValues $PSBoundParameters ` - -ValuesToCheck $ValuesToCheck.Keys -Verbose + -ValuesToCheck $ValuesToCheck.Keys } Write-Verbose -Message "Test-TargetResource returned $TestResult" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyWindows10/MSFT_IntuneDeviceCompliancePolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyWindows10/MSFT_IntuneDeviceCompliancePolicyWindows10.psm1 index e54cf9a0f8..ac01be93d2 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyWindows10/MSFT_IntuneDeviceCompliancePolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyWindows10/MSFT_IntuneDeviceCompliancePolicyWindows10.psm1 @@ -743,8 +743,8 @@ function Test-TargetResource $CurrentValues = Get-TargetResource @PSBoundParameters - #Write-Verbose -Message "Current Values: $(Convert-M365DscHashtableToString -Hashtable $CurrentValues)" - #Write-Verbose -Message "Target Values: $(Convert-M365DscHashtableToString -Hashtable $PSBoundParameters)" + Write-Verbose -Message "Current Values: $(Convert-M365DscHashtableToString -Hashtable $CurrentValues)" + Write-Verbose -Message "Target Values: $(Convert-M365DscHashtableToString -Hashtable $PSBoundParameters)" $ValuesToCheck = $PSBoundParameters $ValuesToCheck.Remove('Credential') | Out-Null @@ -832,8 +832,7 @@ function Test-TargetResource $TestResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` -DesiredValues $PSBoundParameters ` - -ValuesToCheck $ValuesToCheck.Keys ` - -Verbose + -ValuesToCheck $ValuesToCheck.Keys } Write-Verbose -Message "Test-TargetResource returned $TestResult" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyiOs/MSFT_IntuneDeviceCompliancePolicyiOs.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyiOs/MSFT_IntuneDeviceCompliancePolicyiOs.psm1 index 3604b4ccba..d21245a2a3 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyiOs/MSFT_IntuneDeviceCompliancePolicyiOs.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceCompliancePolicyiOs/MSFT_IntuneDeviceCompliancePolicyiOs.psm1 @@ -144,7 +144,7 @@ function Get-TargetResource DeviceThreatProtectionRequiredSecurityLevel = $devicePolicy.AdditionalProperties.deviceThreatProtectionRequiredSecurityLevel ManagedEmailProfileRequired = $devicePolicy.AdditionalProperties.managedEmailProfileRequired Ensure = 'Present' - Credential = $Credential + Credential = $Credential ApplicationId = $ApplicationId TenantId = $TenantId ApplicationSecret = $ApplicationSecret diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyAndroidDeviceAdministrator/MSFT_IntuneDeviceConfigurationPolicyAndroidDeviceAdministrator.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyAndroidDeviceAdministrator/MSFT_IntuneDeviceConfigurationPolicyAndroidDeviceAdministrator.psm1 index ea9c8c2575..d1e29499a1 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyAndroidDeviceAdministrator/MSFT_IntuneDeviceConfigurationPolicyAndroidDeviceAdministrator.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyAndroidDeviceAdministrator/MSFT_IntuneDeviceConfigurationPolicyAndroidDeviceAdministrator.psm1 @@ -1171,8 +1171,8 @@ function Test-TargetResource $ValuesToCheck.Remove('TenantId') | Out-Null $ValuesToCheck.Remove('ApplicationSecret') | Out-Null - #Write-Verbose -Message "Current Values: $(Convert-M365DscHashtableToString -Hashtable $CurrentValues)" - #Write-Verbose -Message "Target Values: $(Convert-M365DscHashtableToString -Hashtable $ValuesToCheck)" + Write-Verbose -Message "Current Values: $(Convert-M365DscHashtableToString -Hashtable $CurrentValues)" + Write-Verbose -Message "Target Values: $(Convert-M365DscHashtableToString -Hashtable $ValuesToCheck)" #Convert any DateTime to String foreach ($key in $ValuesToCheck.Keys) @@ -1189,7 +1189,7 @@ function Test-TargetResource $testResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` -DesiredValues $PSBoundParameters ` - -ValuesToCheck $ValuesToCheck.Keys -verbose + -ValuesToCheck $ValuesToCheck.Keys } Write-Verbose -Message "Test-TargetResource returned $testResult" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyAndroidOpenSourceProject/MSFT_IntuneDeviceConfigurationPolicyAndroidOpenSourceProject.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyAndroidOpenSourceProject/MSFT_IntuneDeviceConfigurationPolicyAndroidOpenSourceProject.psm1 index 82e029bd9f..272a67d618 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyAndroidOpenSourceProject/MSFT_IntuneDeviceConfigurationPolicyAndroidOpenSourceProject.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyAndroidOpenSourceProject/MSFT_IntuneDeviceConfigurationPolicyAndroidOpenSourceProject.psm1 @@ -697,7 +697,7 @@ function Test-TargetResource $testResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` -DesiredValues $PSBoundParameters ` - -ValuesToCheck $ValuesToCheck.Keys -verbose + -ValuesToCheck $ValuesToCheck.Keys } Write-Verbose -Message "Test-TargetResource returned $testResult" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyMacOS/MSFT_IntuneDeviceConfigurationPolicyMacOS.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyMacOS/MSFT_IntuneDeviceConfigurationPolicyMacOS.psm1 index 13f0892358..ac5c5c84cf 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyMacOS/MSFT_IntuneDeviceConfigurationPolicyMacOS.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyMacOS/MSFT_IntuneDeviceConfigurationPolicyMacOS.psm1 @@ -1294,7 +1294,7 @@ function Test-TargetResource $testResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` -DesiredValues $PSBoundParameters ` - -ValuesToCheck $ValuesToCheck.Keys -verbose + -ValuesToCheck $ValuesToCheck.Keys } Write-Verbose -Message "Test-TargetResource returned $testResult" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneExploitProtectionPolicyWindows10SettingCatalog/MSFT_IntuneExploitProtectionPolicyWindows10SettingCatalog.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneExploitProtectionPolicyWindows10SettingCatalog/MSFT_IntuneExploitProtectionPolicyWindows10SettingCatalog.psm1 index 15c5b47c44..0dfa01735f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneExploitProtectionPolicyWindows10SettingCatalog/MSFT_IntuneExploitProtectionPolicyWindows10SettingCatalog.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneExploitProtectionPolicyWindows10SettingCatalog/MSFT_IntuneExploitProtectionPolicyWindows10SettingCatalog.psm1 @@ -440,7 +440,7 @@ function Test-TargetResource $TestResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` -DesiredValues $PSBoundParameters ` - -ValuesToCheck $ValuesToCheck.Keys -Verbose + -ValuesToCheck $ValuesToCheck.Keys } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWiFiConfigurationPolicyAndroidDeviceAdministrator/MSFT_IntuneWiFiConfigurationPolicyAndroidDeviceAdministrator.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWiFiConfigurationPolicyAndroidDeviceAdministrator/MSFT_IntuneWiFiConfigurationPolicyAndroidDeviceAdministrator.psm1 index 1595b1dc2c..f02c2f0b85 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWiFiConfigurationPolicyAndroidDeviceAdministrator/MSFT_IntuneWiFiConfigurationPolicyAndroidDeviceAdministrator.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWiFiConfigurationPolicyAndroidDeviceAdministrator/MSFT_IntuneWiFiConfigurationPolicyAndroidDeviceAdministrator.psm1 @@ -580,7 +580,7 @@ function Test-TargetResource $testResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` -DesiredValues $PSBoundParameters ` - -ValuesToCheck $ValuesToCheck.Keys -verbose + -ValuesToCheck $ValuesToCheck.Keys } Write-Verbose -Message "Test-TargetResource returned $testResult" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidEntrepriseDeviceOwner/MSFT_IntuneWifiConfigurationPolicyAndroidEntrepriseDeviceOwner.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidEntrepriseDeviceOwner/MSFT_IntuneWifiConfigurationPolicyAndroidEntrepriseDeviceOwner.psm1 index be7e2e6033..8553ff23bb 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidEntrepriseDeviceOwner/MSFT_IntuneWifiConfigurationPolicyAndroidEntrepriseDeviceOwner.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidEntrepriseDeviceOwner/MSFT_IntuneWifiConfigurationPolicyAndroidEntrepriseDeviceOwner.psm1 @@ -674,7 +674,7 @@ function Test-TargetResource $testResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` -DesiredValues $PSBoundParameters ` - -ValuesToCheck $ValuesToCheck.Keys -verbose + -ValuesToCheck $ValuesToCheck.Keys } Write-Verbose -Message "Test-TargetResource returned $testResult" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidEntrepriseWorkProfile/MSFT_IntuneWifiConfigurationPolicyAndroidEntrepriseWorkProfile.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidEntrepriseWorkProfile/MSFT_IntuneWifiConfigurationPolicyAndroidEntrepriseWorkProfile.psm1 index 6d57683b48..daf8aac18b 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidEntrepriseWorkProfile/MSFT_IntuneWifiConfigurationPolicyAndroidEntrepriseWorkProfile.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidEntrepriseWorkProfile/MSFT_IntuneWifiConfigurationPolicyAndroidEntrepriseWorkProfile.psm1 @@ -580,7 +580,7 @@ function Test-TargetResource $testResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` -DesiredValues $PSBoundParameters ` - -ValuesToCheck $ValuesToCheck.Keys -verbose + -ValuesToCheck $ValuesToCheck.Keys } Write-Verbose -Message "Test-TargetResource returned $testResult" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidForWork/MSFT_IntuneWifiConfigurationPolicyAndroidForWork.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidForWork/MSFT_IntuneWifiConfigurationPolicyAndroidForWork.psm1 index a9a74ffe85..b15cece370 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidForWork/MSFT_IntuneWifiConfigurationPolicyAndroidForWork.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidForWork/MSFT_IntuneWifiConfigurationPolicyAndroidForWork.psm1 @@ -580,7 +580,7 @@ function Test-TargetResource $testResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` -DesiredValues $PSBoundParameters ` - -ValuesToCheck $ValuesToCheck.Keys -verbose + -ValuesToCheck $ValuesToCheck.Keys } Write-Verbose -Message "Test-TargetResource returned $testResult" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidOpenSourceProject/MSFT_IntuneWifiConfigurationPolicyAndroidOpenSourceProject.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidOpenSourceProject/MSFT_IntuneWifiConfigurationPolicyAndroidOpenSourceProject.psm1 index a156dc0b5e..1f7f19e2a0 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidOpenSourceProject/MSFT_IntuneWifiConfigurationPolicyAndroidOpenSourceProject.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyAndroidOpenSourceProject/MSFT_IntuneWifiConfigurationPolicyAndroidOpenSourceProject.psm1 @@ -606,7 +606,7 @@ function Test-TargetResource $testResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` -DesiredValues $PSBoundParameters ` - -ValuesToCheck $ValuesToCheck.Keys -verbose + -ValuesToCheck $ValuesToCheck.Keys } Write-Verbose -Message "Test-TargetResource returned $testResult" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyIOS/MSFT_IntuneWifiConfigurationPolicyIOS.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyIOS/MSFT_IntuneWifiConfigurationPolicyIOS.psm1 index dedd1c77c0..4656e5685c 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyIOS/MSFT_IntuneWifiConfigurationPolicyIOS.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyIOS/MSFT_IntuneWifiConfigurationPolicyIOS.psm1 @@ -661,7 +661,7 @@ function Test-TargetResource $testResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` -DesiredValues $PSBoundParameters ` - -ValuesToCheck $ValuesToCheck.Keys -verbose + -ValuesToCheck $ValuesToCheck.Keys } Write-Verbose -Message "Test-TargetResource returned $testResult" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyMacOS/MSFT_IntuneWifiConfigurationPolicyMacOS.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyMacOS/MSFT_IntuneWifiConfigurationPolicyMacOS.psm1 index 39918bec3a..6626eb9116 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyMacOS/MSFT_IntuneWifiConfigurationPolicyMacOS.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyMacOS/MSFT_IntuneWifiConfigurationPolicyMacOS.psm1 @@ -648,7 +648,7 @@ function Test-TargetResource $testResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` -DesiredValues $PSBoundParameters ` - -ValuesToCheck $ValuesToCheck.Keys -verbose + -ValuesToCheck $ValuesToCheck.Keys } Write-Verbose -Message "Test-TargetResource returned $testResult" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyWindows10/MSFT_IntuneWifiConfigurationPolicyWindows10.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyWindows10/MSFT_IntuneWifiConfigurationPolicyWindows10.psm1 index f6c6661d04..68ef796f07 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyWindows10/MSFT_IntuneWifiConfigurationPolicyWindows10.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneWifiConfigurationPolicyWindows10/MSFT_IntuneWifiConfigurationPolicyWindows10.psm1 @@ -690,7 +690,7 @@ function Test-TargetResource $testResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` -DesiredValues $PSBoundParameters ` - -ValuesToCheck $ValuesToCheck.Keys -verbose + -ValuesToCheck $ValuesToCheck.Keys } Write-Verbose -Message "Test-TargetResource returned $testResult" diff --git a/Modules/Microsoft365DSC/Modules/M365DSCStubsUtility.psm1 b/Modules/Microsoft365DSC/Modules/M365DSCStubsUtility.psm1 index 13cc12636e..3c2e1a40cc 100644 --- a/Modules/Microsoft365DSC/Modules/M365DSCStubsUtility.psm1 +++ b/Modules/Microsoft365DSC/Modules/M365DSCStubsUtility.psm1 @@ -87,14 +87,16 @@ function New-M365DSCStubFiles $cmdlets = Get-Command -CommandType 'Cmdlet' | Where-Object -FilterScript { $_.Source -eq $CurrentModuleName } if ($null -eq $cmdlets -or $Module.ModuleName -eq 'MicrosoftTeams') { - $cmdlets += Get-Command -CommandType 'Function' | Where-Object -FilterScript { $_.Source -eq $CurrentModuleName } + $cmdlets += Get-Command -CommandType 'Function' -Module $CurrentModuleName } - if ($CurrentModuleName -eq 'MicrosoftGraph') + if ($Module.Name -eq 'MicrosoftGraph') { + Write-Host "Loading Beta Graph APIs" $MaximumFunctionCount = 32000 Select-MgProfile -Name beta | Out-Null - $betaCmdlets = Get-Command -CommandType 'Cmdlet' | Where-Object -FilterScript { $_.Source -eq $CurrentModuleName } + $betaCmdlets = Get-Command -CommandType 'Cmdlet' -Module $CurrentModuleName + $betaCmdlets += Get-Command -CommandType 'Function' -Module $CurrentModuleName foreach ($cmdlet in $betaCmdlets) { if ($cmdlets.Name -notcontains $cmdlet.Name) @@ -206,8 +208,8 @@ function New-M365DSCStubFiles } } $StubContent += "`r`n )`r`n}`n" - $i ++ } + $i ++ } Write-Progress -Activity "Generating Stubs" -Completed @@ -224,6 +226,7 @@ function New-M365DSCStubFiles $Content += $StubContent $Content += "#endregion`r`n" $i++ + Remove-Module $CurrentModuleName } $Content | Out-File $DestinationFilePath -Encoding utf8 } diff --git a/ResourceGenerator/Module.Template.psm1 b/ResourceGenerator/Module.Template.psm1 index 6f242316d7..8a51b409a2 100644 --- a/ResourceGenerator/Module.Template.psm1 +++ b/ResourceGenerator/Module.Template.psm1 @@ -440,7 +440,7 @@ function Test-TargetResource $testResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` -DesiredValues $PSBoundParameters ` - -ValuesToCheck $ValuesToCheck.Keys -verbose + -ValuesToCheck $ValuesToCheck.Keys } Write-Verbose -Message "Test-TargetResource returned $testResult" diff --git a/Tests/Dependencies/SharePointOnlineManagementShell_19515-12000_x64_en-us.msi b/Tests/Dependencies/SharePointOnlineManagementShell_19515-12000_x64_en-us.msi deleted file mode 100644 index 1c5adc87e8..0000000000 Binary files a/Tests/Dependencies/SharePointOnlineManagementShell_19515-12000_x64_en-us.msi and /dev/null differ diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOPerimeterConfiguration.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOPerimeterConfiguration.Tests.ps1 new file mode 100644 index 0000000000..49e7e887d0 --- /dev/null +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOPerimeterConfiguration.Tests.ps1 @@ -0,0 +1,133 @@ +[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 "EXOPerimeterConfiguration" -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", $secpasswd) + + Mock -CommandName Update-M365DSCExportAuthenticationResults -MockWith { + return @{} + } + + Mock -CommandName Get-M365DSCExportContentForResource -MockWith { + + } + + Mock -CommandName Confirm-M365DSCDependencies -MockWith { + + } + + Mock -CommandName New-M365DSCConnection -MockWith { + return "Credentials" + } + + Mock -CommandName Get-PSSession -MockWith { + + } + + Mock -CommandName Remove-PSSession -MockWith { + + } + + Mock -CommandName Set-PerimeterConfig -MockWith { + + } + } + + # Test contexts + Context -Name "Config is not in the desired state" -Fixture { + BeforeAll { + $testParams = @{ + Credential = $Credential; + Ensure = "Present"; + GatewayIPAddresses = @("127.0.0.1"); + Identity = "Tenant Perimeter Settings"; + } + + Mock -CommandName Get-PerimeterConfig -MockWith { + return @{ + Credential = $Credential; + Ensure = "Present"; + GatewayIPAddresses = @("127.0.0.2"); #Drift + Identity = "Tenant Perimeter Settings"; + } + } + } + + 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-PerimeterConfig -Exactly 1 + } + } + + Context -Name "Config is already in the desired state" -Fixture { + BeforeAll { + $testParams = @{ + Credential = $Credential; + Ensure = "Present"; + GatewayIPAddresses = @("127.0.0.1"); + Identity = "Tenant Perimeter Settings"; + } + + Mock -CommandName Get-PerimeterConfig -MockWith { + return @{ + Credential = $Credential; + Ensure = "Present"; + GatewayIPAddresses = @("127.0.0.1"); + Identity = "Tenant Perimeter Settings"; + } + } + } + + It 'Should return false from the Test method' { + Test-TargetResource @testParams | Should -Be $true + } + } + + Context -Name "ReverseDSC Tests" -Fixture { + BeforeAll { + $Global:CurrentModeIsExport = $true + $testParams = @{ + Credential = $Credential + } + + Mock -CommandName Get-PerimeterConfig -MockWith { + return @{ + Credential = $Credential; + Ensure = "Present"; + GatewayIPAddresses = @("127.0.0.1"); + Identity = "Tenant Perimeter Settings"; + } + } + } + + It "Should Reverse Engineer resource from the Export" { + Export-TargetResource @testParams + } + } + } +} + +Invoke-Command -ScriptBlock $Global:DscHelper.CleanupScript -NoNewScope diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOResourceConfiguration.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOResourceConfiguration.Tests.ps1 new file mode 100644 index 0000000000..32d6bfb0b8 --- /dev/null +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOResourceConfiguration.Tests.ps1 @@ -0,0 +1,128 @@ +[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 "EXOResourceConfiguration" -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", $secpasswd) + + Mock -CommandName Update-M365DSCExportAuthenticationResults -MockWith { + return @{} + } + + Mock -CommandName Get-M365DSCExportContentForResource -MockWith { + + } + + Mock -CommandName Confirm-M365DSCDependencies -MockWith { + + } + + Mock -CommandName New-M365DSCConnection -MockWith { + return "Credentials" + } + + Mock -CommandName Get-PSSession -MockWith { + + } + + Mock -CommandName Remove-PSSession -MockWith { + + } + + Mock -CommandName Set-ResourceConfig -MockWith { + + } + } + + # Test contexts + Context -Name "Config is not in the desired state" -Fixture { + BeforeAll { + $testParams = @{ + Credential = $Credential; + Ensure = "Present"; + Identity = "Resource Schema"; + ResourcePropertySchema = @("Room/TV", "Equipment/Laptop"); + } + + Mock -CommandName Get-ResourceConfig -MockWith { + return @{ + Identity = "Resource Schema"; + ResourcePropertySchema = @("Room/Phones", "Equipment/Laptop"); #drift + } + } + } + + 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-ResourceConfig -Exactly 1 + } + } + + + Context -Name "Config is already in the desired state" -Fixture { + BeforeAll { + $testParams = @{ + Credential = $Credential; + Ensure = "Present"; + Identity = "Resource Schema"; + ResourcePropertySchema = @("Room/TV", "Equipment/Laptop"); + } + + Mock -CommandName Get-ResourceConfig -MockWith { + return @{ + Identity = "Resource Schema"; + ResourcePropertySchema = @("Room/TV", "Equipment/Laptop"); + } + } + } + + It 'Should return false from the Test method' { + Test-TargetResource @testParams | Should -Be $true + } + } + + Context -Name "ReverseDSC Tests" -Fixture { + BeforeAll { + $Global:CurrentModeIsExport = $true + $testParams = @{ + Credential = $Credential + } + + Mock -CommandName Get-ResourceConfig -MockWith { + return @{ + Identity = "Resource Schema"; + ResourcePropertySchema = @("Room/TV", "Equipment/Laptop"); + } + } + } + + It "Should Reverse Engineer resource from the Export" { + Export-TargetResource @testParams + } + } + } +} + +Invoke-Command -ScriptBlock $Global:DscHelper.CleanupScript -NoNewScope diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneASRRulesPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneASRRulesPolicyWindows10.Tests.ps1 new file mode 100644 index 0000000000..14b1d8bab0 --- /dev/null +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneASRRulesPolicyWindows10.Tests.ps1 @@ -0,0 +1,462 @@ +[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 "IntuneASRRulesPolicyWindows10" -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 "Pass@word1" -AsPlainText -Force + $Credential = New-Object System.Management.Automation.PSCredential ("tenantadmin", $secpasswd) + + Mock -CommandName Update-M365DSCExportAuthenticationResults -MockWith { + return @{} + } + + Mock -CommandName Get-M365DSCExportContentForResource -MockWith { + + } + + Mock -CommandName Confirm-M365DSCDependencies -MockWith { + + } + + Mock -CommandName New-M365DSCConnection -MockWith { + return "Credentials" + } + + Mock -CommandName New-MgDeviceManagementIntent -MockWith { + } + Mock -CommandName Update-MgDeviceManagementIntent -MockWith { + } + Mock -CommandName Remove-MgDeviceManagementIntent -MockWith { + } + Mock -CommandName Invoke-MgGraphRequest -MockWith { + } + } + + # Test contexts + Context -Name "When the instance doesn't already exist" -Fixture { + BeforeAll { + $testParams = @{ + Identity = "12345-12345-12345-12345-12345" + DisplayName = "Test" + Description = "This is a test" + ProcessCreationType = "block" + AdvancedRansomewareProtectionType = "enable" + BlockPersistenceThroughWmiType = "block" + ScriptObfuscatedMacroCodeType = "block" + OfficeMacroCodeAllowWin32ImportsType = "block" + OfficeAppsLaunchChildProcessType = "warn" + GuardMyFoldersType = "auditMode" + UntrustedUSBProcessType = "block" + AttackSurfaceReductionExcludedPaths = @("room/telephone") + UntrustedExecutableType = "block" + OfficeCommunicationAppsLaunchChildProcess = "warn" + EmailContentExecutionType = "disable" + ScriptDownloadedPayloadExecutionType = "block" + AdditionalGuardedFolders = @("main") + AdobeReaderLaunchChildProcess = "notConfigured" + OfficeAppsExecutableContentCreationOrLaunchType = "block" + PreventCredentialStealingType = "enable" + OfficeAppsOtherProcessInjectionType = "warn" + GuardedFoldersAllowedAppPaths = @("main", "root") + Ensure = "Present" + Credential = $Credential + } + + Mock -CommandName Get-MgDeviceManagementIntent -MockWith { + return $null + } + Mock -CommandName Get-MgDeviceManagementIntentSetting -MockWith { + return $null + } + } + + It "Should return absent from the Get method" { + (Get-TargetResource @testParams).Ensure | Should -Be 'Absent' + } + + It "Should return false from the Test method" { + Test-TargetResource @testParams | Should -Be $false + } + + It "Should create the instance from the Set method" { + Set-TargetResource @testParams + Should -Invoke -CommandName "New-MgDeviceManagementIntent" -Exactly 1 + } + } + + Context -Name "When the instance already exists and is NOT in the Desired State" -Fixture { + BeforeAll { + $testParams = @{ + Identity = "12345-12345-12345-12345-12345" + DisplayName = "Test" + Description = "This is a test" + ProcessCreationType = "block" + AdvancedRansomewareProtectionType = "enable" + BlockPersistenceThroughWmiType = "block" + ScriptObfuscatedMacroCodeType = "block" + OfficeMacroCodeAllowWin32ImportsType = "block" + OfficeAppsLaunchChildProcessType = "warn" + GuardMyFoldersType = "auditMode" + UntrustedUSBProcessType = "block" + AttackSurfaceReductionExcludedPaths = @("room/telephone") + UntrustedExecutableType = "block" + OfficeCommunicationAppsLaunchChildProcess = "warn" + EmailContentExecutionType = "disable" + ScriptDownloadedPayloadExecutionType = "block" + AdditionalGuardedFolders = @("main") + AdobeReaderLaunchChildProcess = "notConfigured" + OfficeAppsExecutableContentCreationOrLaunchType = "block" + PreventCredentialStealingType = "enable" + OfficeAppsOtherProcessInjectionType = "warn" + GuardedFoldersAllowedAppPaths = @("main", "root") + Ensure = "Present" + Credential = $Credential + } + + Mock -CommandName Get-MgDeviceManagementIntent -MockWith { + return @{ + Id = "12345-12345-12345-12345-12345" + Description = "This is a test" + DisplayName = "Test" + TemplateId = "0e237410-1367-4844-bd7f-15fb0f08943b" + } + } + + Mock -CommandName Get-MgDeviceManagementIntentSetting -MockWith { + return @( + @{ + Id = "12345-12345-12345-12345-12345" + DefinitionId = "deviceConfiguration--windows10EndpointProtectionConfiguration_defenderOfficeAppsOtherProcessInjectionType" + ValueJson = '"warn"' + AdditionalProperties = @{ + "@odata.type" = '#microsoft.graph.deviceManagementStringSettingInstance' + value = "warn" + } + }, + @{ + Id = "12345-12345-12345-12345-12345" + DefinitionId = "deviceConfiguration--windows10EndpointProtectionConfiguration_defenderAdobeReaderLaunchChildProcess" + ValueJson = '"notConfigured"' + AdditionalProperties = @{ + "@odata.type" = '#microsoft.graph.deviceManagementStringSettingInstance' + value = "block" #drift + } + }, + @{ + Id = "12345-12345-12345-12345-12345" + DefinitionId = "deviceConfiguration--windows10EndpointProtectionConfiguration_defenderScriptObfuscatedMacroCodeType" + ValueJson = '"block"' + AdditionalProperties = @{ + "@odata.type" = '#microsoft.graph.deviceManagementStringSettingInstance' + value = "block" + } + }, + @{ + Id = "12345-12345-12345-12345-12345" + DefinitionId = "deviceConfiguration--windows10EndpointProtectionConfiguration_defenderBlockPersistenceThroughWmiType" + ValueJson = '"block"' + AdditionalProperties = @{ + "@odata.type" = '#microsoft.graph.deviceManagementStringSettingInstance' + value = "block" + } + }, + @{ + Id = "12345-12345-12345-12345-12345" + DefinitionId = "deviceConfiguration--windows10EndpointProtectionConfiguration_defenderAdditionalGuardedFolders" + ValueJson = '["main","root"]' + AdditionalProperties = @{ + "@odata.type" = '#microsoft.graph.deviceManagementCollectionSettingInstance' + } + } + ) + } + } + + It "Should return Present from the Get method" { + (Get-TargetResource @testParams).Ensure | Should -Be 'Present' + } + + It "Should return false from the Test method" { + Test-TargetResource @testParams | Should -Be $false + } + + It "Should update the instance from the Set method" { + Set-TargetResource @testParams + Should -Invoke -CommandName Update-MgDeviceManagementIntent -Exactly 1 + } + } + + Context -Name "When the instance already exists and IS in the Desired State" -Fixture { + BeforeAll { + $testParams = @{ + Identity = "12345-12345-12345-12345-12345" + DisplayName = "Test" + Description = "This is a test" + Ensure = "Present" + Credential = $Credential + OfficeAppsOtherProcessInjectionType = "warn" + AdobeReaderLaunchChildProcess = "notConfigured" + ScriptObfuscatedMacroCodeType = "block" + AdditionalGuardedFolders = @("main", "root") + BlockPersistenceThroughWmiType = "block" + } + + Mock -CommandName Get-MgDeviceManagementIntent -MockWith { + return @{ + Id = "12345-12345-12345-12345-12345" + Description = "This is a test" + DisplayName = "Test" + TemplateId = "0e237410-1367-4844-bd7f-15fb0f08943b" + } + } + + Mock -CommandName Get-MgDeviceManagementIntentSetting -MockWith { + return @( + @{ + Id = "12345-12345-12345-12345-12345" + DefinitionId = "deviceConfiguration--windows10EndpointProtectionConfiguration_defenderOfficeAppsOtherProcessInjectionType" + ValueJson = '"warn"' + AdditionalProperties = @{ + "@odata.type" = '#microsoft.graph.deviceManagementStringSettingInstance' + value = "warn" + } + }, + @{ + Id = "12345-12345-12345-12345-12345" + DefinitionId = "deviceConfiguration--windows10EndpointProtectionConfiguration_defenderAdobeReaderLaunchChildProcess" + ValueJson = '"notConfigured"' + AdditionalProperties = @{ + "@odata.type" = '#microsoft.graph.deviceManagementStringSettingInstance' + value = "notConfigured" + } + }, + @{ + Id = "12345-12345-12345-12345-12345" + DefinitionId = "deviceConfiguration--windows10EndpointProtectionConfiguration_defenderScriptObfuscatedMacroCodeType" + ValueJson = '"block"' + AdditionalProperties = @{ + "@odata.type" = '#microsoft.graph.deviceManagementStringSettingInstance' + value = "block" + } + }, + @{ + Id = "12345-12345-12345-12345-12345" + DefinitionId = "deviceConfiguration--windows10EndpointProtectionConfiguration_defenderBlockPersistenceThroughWmiType" + ValueJson = '"block"' + AdditionalProperties = @{ + "@odata.type" = '#microsoft.graph.deviceManagementStringSettingInstance' + value = "block" + } + }, + @{ + Id = "12345-12345-12345-12345-12345" + DefinitionId = "deviceConfiguration--windows10EndpointProtectionConfiguration_defenderAdditionalGuardedFolders" + ValueJson = '["main","root"]' + AdditionalProperties = @{ + "@odata.type" = '#microsoft.graph.deviceManagementCollectionSettingInstance' + } + } + ) + } + } + + It "Should return true from the Test method" { + Test-TargetResource @testParams | Should -Be $true + } + } + + Context -Name "When the instance exists and it SHOULD NOT" -Fixture { + BeforeAll { + $testParams = @{ + Identity = "12345-12345-12345-12345-12345" + DisplayName = "Test" + Description = "This is a test" + ProcessCreationType = "block" + AdvancedRansomewareProtectionType = "enable" + BlockPersistenceThroughWmiType = "block" + ScriptObfuscatedMacroCodeType = "block" + OfficeMacroCodeAllowWin32ImportsType = "block" + OfficeAppsLaunchChildProcessType = "warn" + GuardMyFoldersType = "auditMode" + UntrustedUSBProcessType = "block" + AttackSurfaceReductionExcludedPaths = @("room/telephone") + UntrustedExecutableType = "block" + OfficeCommunicationAppsLaunchChildProcess = "warn" + EmailContentExecutionType = "disable" + ScriptDownloadedPayloadExecutionType = "block" + AdditionalGuardedFolders = @("main") + AdobeReaderLaunchChildProcess = "notConfigured" + OfficeAppsExecutableContentCreationOrLaunchType = "block" + PreventCredentialStealingType = "enable" + OfficeAppsOtherProcessInjectionType = "warn" + GuardedFoldersAllowedAppPaths = @("main", "root") + Ensure = "Absent" + Credential = $Credential + } + + Mock -CommandName Get-MgDeviceManagementIntent -MockWith { + return @{ + Id = "12345-12345-12345-12345-12345" + Description = "This is a test" + DisplayName = "Test" + TemplateId = "0e237410-1367-4844-bd7f-15fb0f08943b" + } + } + + Mock -CommandName Get-MgDeviceManagementIntentSetting -MockWith { + return @( + @{ + Id = "12345-12345-12345-12345-12345" + DefinitionId = "deviceConfiguration--windows10EndpointProtectionConfiguration_defenderOfficeAppsOtherProcessInjectionType" + ValueJson = '"warn"' + AdditionalProperties = @{ + "@odata.type" = '#microsoft.graph.deviceManagementStringSettingInstance' + value = "warn" + } + }, + @{ + Id = "12345-12345-12345-12345-12345" + DefinitionId = "deviceConfiguration--windows10EndpointProtectionConfiguration_defenderAdobeReaderLaunchChildProcess" + ValueJson = '"notConfigured"' + AdditionalProperties = @{ + "@odata.type" = '#microsoft.graph.deviceManagementStringSettingInstance' + value = "notConfigured" + } + }, + @{ + Id = "12345-12345-12345-12345-12345" + DefinitionId = "deviceConfiguration--windows10EndpointProtectionConfiguration_defenderScriptObfuscatedMacroCodeType" + ValueJson = '"block"' + AdditionalProperties = @{ + "@odata.type" = '#microsoft.graph.deviceManagementStringSettingInstance' + value = "block" + } + }, + @{ + Id = "12345-12345-12345-12345-12345" + DefinitionId = "deviceConfiguration--windows10EndpointProtectionConfiguration_defenderBlockPersistenceThroughWmiType" + ValueJson = '"block"' + AdditionalProperties = @{ + "@odata.type" = '#microsoft.graph.deviceManagementStringSettingInstance' + value = "block" + } + }, + @{ + Id = "12345-12345-12345-12345-12345" + DefinitionId = "deviceConfiguration--windows10EndpointProtectionConfiguration_defenderAdditionalGuardedFolders" + ValueJson = '["main","root"]' + AdditionalProperties = @{ + "@odata.type" = '#microsoft.graph.deviceManagementCollectionSettingInstance' + } + } + ) + } + } + + It "Should return Present from the Get method" { + (Get-TargetResource @testParams).Ensure | Should -Be 'Present' + } + + It "Should return true from the Test method" { + Test-TargetResource @testParams | Should -Be $false + } + + It "Should remove the instance from the Set method" { + Set-TargetResource @testParams + Should -Invoke -CommandName Remove-MgDeviceManagementIntent -Exactly 1 + } + } + + Context -Name "ReverseDSC Tests" -Fixture { + BeforeAll { + $Global:CurrentModeIsExport = $true + $testParams = @{ + Credential = $Credential; + } + + Mock -CommandName Get-MgDeviceManagementIntent -MockWith { + return @{ + Id = "12345-12345-12345-12345-12345" + Description = "This is a test" + DisplayName = "Test" + TemplateId = "0e237410-1367-4844-bd7f-15fb0f08943b" + } + } + + Mock -CommandName Get-MgDeviceManagementIntentSetting -MockWith { + return @( + @{ + Id = "12345-12345-12345-12345-12345" + DefinitionId = "deviceConfiguration--windows10EndpointProtectionConfiguration_defenderOfficeAppsOtherProcessInjectionType" + ValueJson = '"warn"' + AdditionalProperties = @{ + "@odata.type" = '#microsoft.graph.deviceManagementStringSettingInstance' + value = "warn" + } + }, + @{ + Id = "12345-12345-12345-12345-12345" + DefinitionId = "deviceConfiguration--windows10EndpointProtectionConfiguration_defenderAdobeReaderLaunchChildProcess" + ValueJson = '"notConfigured"' + AdditionalProperties = @{ + "@odata.type" = '#microsoft.graph.deviceManagementStringSettingInstance' + value = "notConfigured" + } + }, + @{ + Id = "12345-12345-12345-12345-12345" + DefinitionId = "deviceConfiguration--windows10EndpointProtectionConfiguration_defenderScriptObfuscatedMacroCodeType" + ValueJson = '"block"' + AdditionalProperties = @{ + "@odata.type" = '#microsoft.graph.deviceManagementStringSettingInstance' + value = "block" + } + }, + @{ + Id = "12345-12345-12345-12345-12345" + DefinitionId = "deviceConfiguration--windows10EndpointProtectionConfiguration_defenderBlockPersistenceThroughWmiType" + ValueJson = '"block"' + AdditionalProperties = @{ + "@odata.type" = '#microsoft.graph.deviceManagementStringSettingInstance' + value = "block" + } + }, + @{ + Id = "12345-12345-12345-12345-12345" + DefinitionId = "deviceConfiguration--windows10EndpointProtectionConfiguration_defenderAdditionalGuardedFolders" + ValueJson = '["main","root"]' + AdditionalProperties = @{ + "@odata.type" = '#microsoft.graph.deviceManagementCollectionSettingInstance' + } + } + ) + } + } + + It "Should Reverse Engineer resource from the Export method" { + Export-TargetResource @testParams + } + } + } +} + +Invoke-Command -ScriptBlock $Global:DscHelper.CleanupScript -NoNewScope diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneApplicationControlPolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneApplicationControlPolicyWindows10.Tests.ps1 new file mode 100644 index 0000000000..f7cfe686ef --- /dev/null +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneApplicationControlPolicyWindows10.Tests.ps1 @@ -0,0 +1,237 @@ +[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 "IntuneApplicationControlPolicyWindows10" -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 "Pass@word1" -AsPlainText -Force + $Credential = New-Object System.Management.Automation.PSCredential ("tenantadmin", $secpasswd) + + Mock -CommandName Update-M365DSCExportAuthenticationResults -MockWith { + return @{} + } + + Mock -CommandName Get-M365DSCExportContentForResource -MockWith { + + } + + Mock -CommandName Confirm-M365DSCDependencies -MockWith { + + } + + Mock -CommandName New-M365DSCConnection -MockWith { + return "Credentials" + } + + Mock -CommandName Remove-MgDeviceManagementIntent -MockWith { + } + Mock -CommandName New-MgDeviceManagementIntent -MockWith { + + } + Mock -CommandName Update-MgDeviceManagementIntent -MockWith { + + } + } + + # Test contexts + Context -Name "When the App Configuration Policy doesn't already exist" -Fixture { + BeforeAll { + $testParams = @{ + DisplayName = 'Test App Configuration Policy' + Description = 'Test Definition' + Ensure = 'Present' + Credential = $Credential; + } + + Mock -CommandName Get-MgDeviceManagementIntentSetting -MockWith { + return $null + } + } + + It "Should return absent from the Get method" { + (Get-TargetResource @testParams).Ensure | Should -Be 'Absent' + } + + It "Should return false from the Test method" { + Test-TargetResource @testParams | Should -Be $false + } + + It "Should create the App Configuration Policy from the Set method" { + Set-TargetResource @testParams + Should -Invoke -CommandName "New-MgDeviceManagementIntent" -Exactly 1 + } + } + + Context -Name "When the policy already exists and is NOT in the Desired State" -Fixture { + BeforeAll { + $testParams = @{ + DisplayName = 'Test App Configuration Policy' + Description = 'Test Definition' + Ensure = 'Present' + Credential = $Credential; + } + + Mock -CommandName Get-MgDeviceManagementIntent -MockWith { + return @{ + Id = 'A_19dbaff5-9aff-48b0-a60d-d0471ddaf141' + TemplateId = '63be6324-e3c9-4c97-948a-e7f4b96f0f20' + DisplayName = 'Test App Configuration Policy' + Description = 'Different Value' + } + } + Mock -CommandName Get-MgDeviceManagementIntentSetting -MockWith { + return @{ + DisplayName = 'Test App Configuration Policy' + Description = 'Different Value' + Id = 'A_19dbaff5-9aff-48b0-a60d-d0471ddaf141' + DefinitionId = "appLockerApplicationControl" + ValueJSON = "'true'" + } + } + } + + It "Should return Present from the Get method" { + (Get-TargetResource @testParams).Ensure | Should -Be 'Present' + } + + It "Should return false from the Test method" { + Test-TargetResource @testParams | Should -Be $false + } + + It "Should update the App Configuration Policy from the Set method" { + Set-TargetResource @testParams + Should -Invoke -CommandName Update-MgDeviceManagementIntent -Exactly 1 + } + } + + Context -Name "When the policy already exists and IS in the Desired State" -Fixture { + BeforeAll { + $testParams = @{ + DisplayName = 'Test App Configuration Policy' + Description = 'Test Definition' + Ensure = 'Present' + Credential = $Credential; + } + + Mock -CommandName Get-MgDeviceManagementIntent -MockWith { + return @{ + DisplayName = 'Test App Configuration Policy' + Description = 'Test Definition' + Id = 'A_19dbaff5-9aff-48b0-a60d-d0471ddaf141' + TemplateId = '63be6324-e3c9-4c97-948a-e7f4b96f0f20' + } + } + + Mock -CommandName Get-MgDeviceManagementIntentSetting -MockWith { + return @{ + DisplayName = 'Test App Configuration Policy' + Description = 'Test Definition' + Id = 'A_19dbaff5-9aff-48b0-a60d-d0471ddaf141' + DefinitionId = "appLockerApplicationControl" + ValueJSON = "'true'" + } + } + } + + It "Should return true from the Test method" { + Test-TargetResource @testParams | Should -Be $true + } + } + + Context -Name "When the policy exists and it SHOULD NOT" -Fixture { + BeforeAll { + $testParams = @{ + DisplayName = 'Test App Configuration Policy' + Description = 'Test Definition' + Ensure = 'Absent' + Credential = $Credential; + } + + Mock -CommandName Get-MgDeviceManagementIntent -MockWith { + return @{ + DisplayName = 'Test App Configuration Policy' + Description = 'Test Definition' + Id = 'A_19dbaff5-9aff-48b0-a60d-d0471ddaf141' + TemplateId = '63be6324-e3c9-4c97-948a-e7f4b96f0f20' + } + } + + Mock -CommandName Get-MgDeviceManagementIntentSetting -MockWith { + return @{ + DisplayName = 'Test App Configuration Policy' + Description = 'Test Definition' + Id = 'A_19dbaff5-9aff-48b0-a60d-d0471ddaf141' + DefinitionId = "appLockerApplicationControl" + ValueJSON = "'true'" + } + } + } + + It "Should return Present from the Get method" { + (Get-TargetResource @testParams).Ensure | Should -Be 'Present' + } + + It "Should return true from the Test method" { + Test-TargetResource @testParams | Should -Be $false + } + + It "Should remove the App Configuration Policy from the Set method" { + Set-TargetResource @testParams + Should -Invoke -CommandName Remove-MgDeviceManagementIntent -Exactly 1 + } + } + + Context -Name "ReverseDSC Tests" -Fixture { + BeforeAll { + $Global:CurrentModeIsExport = $true + $testParams = @{ + Credential = $Credential; + } + + Mock -CommandName Get-MgDeviceManagementIntent -MockWith { + return @{ + DisplayName = 'Test App Configuration Policy' + Description = 'Test Definition' + Id = 'A_19dbaff5-9aff-48b0-a60d-d0471ddaf141' + TemplateId = '63be6324-e3c9-4c97-948a-e7f4b96f0f20' + } + } + + Mock -CommandName Get-MgDeviceManagementIntentSetting -MockWith { + return @{ + DisplayName = 'Test App Configuration Policy' + Description = 'Test Definition' + Id = 'A_19dbaff5-9aff-48b0-a60d-d0471ddaf141' + DefinitionId = "appLockerApplicationControl" + ValueJSON = "'true'" + } + } + } + + It "Should Reverse Engineer resource from the Export method" { + Export-TargetResource @testParams + } + } + } +} + +Invoke-Command -ScriptBlock $Global:DscHelper.CleanupScript -NoNewScope diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyMacOS.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyMacOS.Tests.ps1 index 8146b5b682..a3a54fe793 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyMacOS.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyMacOS.Tests.ps1 @@ -15,7 +15,7 @@ Import-Module -Name (Join-Path -Path $M365DSCTestFolder ` -Resolve) $Global:DscHelper = New-M365DscUnitTestHelper -StubModule $CmdletModule ` - -DscResource "IntuneDeviceCompliancePolicyiOs" -GenericStubModule $GenericStubPath + -DscResource "IntuneDeviceCompliancePolicyMacOs" -GenericStubModule $GenericStubPath Describe -Name $Global:DscHelper.DescribeHeader -Fixture { InModuleScope -ModuleName $Global:DscHelper.ModuleName -ScriptBlock { @@ -47,7 +47,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { } Mock -CommandName Remove-MgDeviceManagementDeviceCompliancePolicy -MockWith { } - + } # Test contexts Context -Name "When the iOS Device Compliance Policy doesn't already exist" -Fixture { BeforeAll { @@ -71,9 +71,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { FirewallEnabled = $False FirewallBlockAllIncoming = $False FirewallEnableStealthMode = $False - RoleScopeTagIds = "0" Ensure = 'Present' - Credential = $Credential + Credential = $Credential } Mock -CommandName Get-MgDeviceManagementDeviceCompliancePolicy -MockWith { @@ -117,7 +116,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { FirewallEnabled = $False FirewallBlockAllIncoming = $False FirewallEnableStealthMode = $False - RoleScopeTagIds = "0" Ensure = 'Present' Credential = $Credential } @@ -127,24 +125,27 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = "MacOS DSC Policy" Description = "Test policy with different value" Id = "d95e706d-c92c-410d-a132-09e0b1032dbd" - PasswordRequired = $False - PasswordBlockSimple = $False - PasswordExpirationDays = 365 - PasswordMinimumLength = 6 - PasswordMinutesOfInactivityBeforeLock = 5 - PasswordPreviousPasswordBlockCount = 13 - PasswordMinimumCharacterSetCount = 1 - PasswordRequiredType = "DeviceDefault" - OsMinimumVersion = 10 - OsMaximumVersion = 13 - SystemIntegrityProtectionEnabled = $False - DeviceThreatProtectionEnabled = $False - DeviceThreatProtectionRequiredSecurityLevel = "Unavailable" - StorageRequireEncryption = $False - FirewallEnabled = $False - FirewallBlockAllIncoming = $False - FirewallEnableStealthMode = $False - RoleScopeTagIds = "0" + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.macOSCompliancePolicy' + PasswordRequired = $False + PasswordBlockSimple = $False + PasswordExpirationDays = 365 + PasswordMinimumLength = 6 + PasswordMinutesOfInactivityBeforeLock = 5 + PasswordPreviousPasswordBlockCount = 13 + PasswordMinimumCharacterSetCount = 1 + PasswordRequiredType = "DeviceDefault" + OsMinimumVersion = 10 + OsMaximumVersion = 13 + SystemIntegrityProtectionEnabled = $False + DeviceThreatProtectionEnabled = $False + DeviceThreatProtectionRequiredSecurityLevel = "Unavailable" + StorageRequireEncryption = $False + FirewallEnabled = $False + FirewallBlockAllIncoming = $False + FirewallEnableStealthMode = $False + RoleScopeTagIds = "0" + } } } } @@ -185,9 +186,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { FirewallEnabled = $False FirewallBlockAllIncoming = $False FirewallEnableStealthMode = $False - RoleScopeTagIds = "0" Ensure = 'Present' - Credential = $Credential + Credential = $Credential } Mock -CommandName Get-MgDeviceManagementDeviceCompliancePolicy -MockWith { @@ -195,24 +195,27 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = "MacOS DSC Policy" Description = "Test policy" Id = "d95e706d-c92c-410d-a132-09e0b1032dbd" - PasswordRequired = $False - PasswordBlockSimple = $False - PasswordExpirationDays = 365 - PasswordMinimumLength = 6 - PasswordMinutesOfInactivityBeforeLock = 5 - PasswordPreviousPasswordBlockCount = 13 - PasswordMinimumCharacterSetCount = 1 - PasswordRequiredType = "DeviceDefault" - OsMinimumVersion = 10 - OsMaximumVersion = 13 - SystemIntegrityProtectionEnabled = $False - DeviceThreatProtectionEnabled = $False - DeviceThreatProtectionRequiredSecurityLevel = "Unavailable" - StorageRequireEncryption = $False - FirewallEnabled = $False - FirewallBlockAllIncoming = $False - FirewallEnableStealthMode = $False - RoleScopeTagIds = "0" + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.macOSCompliancePolicy' + PasswordRequired = $False + PasswordBlockSimple = $False + PasswordExpirationDays = 365 + PasswordMinimumLength = 6 + PasswordMinutesOfInactivityBeforeLock = 5 + PasswordPreviousPasswordBlockCount = 13 + PasswordMinimumCharacterSetCount = 1 + PasswordRequiredType = "DeviceDefault" + OsMinimumVersion = 10 + OsMaximumVersion = 13 + SystemIntegrityProtectionEnabled = $False + DeviceThreatProtectionEnabled = $False + DeviceThreatProtectionRequiredSecurityLevel = "Unavailable" + StorageRequireEncryption = $False + FirewallEnabled = $False + FirewallBlockAllIncoming = $False + FirewallEnableStealthMode = $False + RoleScopeTagIds = "0" + } } } } @@ -244,9 +247,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { FirewallEnabled = $False FirewallBlockAllIncoming = $False FirewallEnableStealthMode = $False - RoleScopeTagIds = "0" - Ensure = 'Present' - Credential = $Credential + Ensure = 'Absent' + Credential = $Credential } Mock -CommandName Get-MgDeviceManagementDeviceCompliancePolicy -MockWith { @@ -254,24 +256,27 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = "MacOS DSC Policy" Description = "Test policy" Id = "d95e706d-c92c-410d-a132-09e0b1032dbd" - PasswordRequired = $False - PasswordBlockSimple = $False - PasswordExpirationDays = 365 - PasswordMinimumLength = 6 - PasswordMinutesOfInactivityBeforeLock = 5 - PasswordPreviousPasswordBlockCount = 13 - PasswordMinimumCharacterSetCount = 1 - PasswordRequiredType = "DeviceDefault" - OsMinimumVersion = 10 - OsMaximumVersion = 13 - SystemIntegrityProtectionEnabled = $False - DeviceThreatProtectionEnabled = $False - DeviceThreatProtectionRequiredSecurityLevel = "Unavailable" - StorageRequireEncryption = $False - FirewallEnabled = $False - FirewallBlockAllIncoming = $False - FirewallEnableStealthMode = $False - RoleScopeTagIds = "0" + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.macOSCompliancePolicy' + PasswordRequired = $False + PasswordBlockSimple = $False + PasswordExpirationDays = 365 + PasswordMinimumLength = 6 + PasswordMinutesOfInactivityBeforeLock = 5 + PasswordPreviousPasswordBlockCount = 13 + PasswordMinimumCharacterSetCount = 1 + PasswordRequiredType = "DeviceDefault" + OsMinimumVersion = 10 + OsMaximumVersion = 13 + SystemIntegrityProtectionEnabled = $False + DeviceThreatProtectionEnabled = $False + DeviceThreatProtectionRequiredSecurityLevel = "Unavailable" + StorageRequireEncryption = $False + FirewallEnabled = $False + FirewallBlockAllIncoming = $False + FirewallEnableStealthMode = $False + RoleScopeTagIds = "0" + } } } } @@ -302,24 +307,27 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = "MacOS DSC Policy" Description = "Test policy" Id = "d95e706d-c92c-410d-a132-09e0b1032dbd" - PasswordRequired = $False - PasswordBlockSimple = $False - PasswordExpirationDays = 365 - PasswordMinimumLength = 6 - PasswordMinutesOfInactivityBeforeLock = 5 - PasswordPreviousPasswordBlockCount = 13 - PasswordMinimumCharacterSetCount = 1 - PasswordRequiredType = "DeviceDefault" - OsMinimumVersion = 10 - OsMaximumVersion = 13 - SystemIntegrityProtectionEnabled = $False - DeviceThreatProtectionEnabled = $False - DeviceThreatProtectionRequiredSecurityLevel = "Unavailable" - StorageRequireEncryption = $False - FirewallEnabled = $False - FirewallBlockAllIncoming = $False - FirewallEnableStealthMode = $False - RoleScopeTagIds = "0" + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.macOSCompliancePolicy' + PasswordRequired = $False + PasswordBlockSimple = $False + PasswordExpirationDays = 365 + PasswordMinimumLength = 6 + PasswordMinutesOfInactivityBeforeLock = 5 + PasswordPreviousPasswordBlockCount = 13 + PasswordMinimumCharacterSetCount = 1 + PasswordRequiredType = "DeviceDefault" + OsMinimumVersion = 10 + OsMaximumVersion = 13 + SystemIntegrityProtectionEnabled = $False + DeviceThreatProtectionEnabled = $False + DeviceThreatProtectionRequiredSecurityLevel = "Unavailable" + StorageRequireEncryption = $False + FirewallEnabled = $False + FirewallBlockAllIncoming = $False + FirewallEnableStealthMode = $False + RoleScopeTagIds = "0" + } } } } @@ -328,7 +336,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Export-TargetResource @testParams } } - } + } } diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyWindows10.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyWindows10.Tests.ps1 index 7a5500e306..5e23384038 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyWindows10.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyWindows10.Tests.ps1 @@ -41,13 +41,19 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { return "Credentials" } + Mock -CommandName Invoke-MgGraphRequest -MockWith { + } + Mock -CommandName Update-MgDeviceManagementDeviceCompliancePolicy -MockWith { } Mock -CommandName New-MgDeviceManagementDeviceCompliancePolicy -MockWith { + return @{ + Id = "12345-12345-12345-12345-12345" + } } Mock -CommandName Remove-MgDeviceManagementDeviceCompliancePolicy -MockWith { } - + } # Test contexts Context -Name "When the Windows 10 Device Compliance Policy doesn't already exist" -Fixture { BeforeAll { @@ -86,9 +92,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { TPMRequired = $False; DeviceCompliancePolicyScript = $null; ValidOperatingSystemBuildRanges = @(); - RoleScopeTagIds = "0" Ensure = 'Present'; - Credential = $Credential; + Credential = $Credential; } Mock -CommandName Get-MgDeviceManagementDeviceCompliancePolicy -MockWith { @@ -147,9 +152,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { TPMRequired = $False; DeviceCompliancePolicyScript = $null; ValidOperatingSystemBuildRanges = @(); - RoleScopeTagIds = "0" Ensure = 'Present'; - Credential = $Credential; + Credential = $Credential; } Mock -CommandName Get-MgDeviceManagementDeviceCompliancePolicy -MockWith { @@ -157,39 +161,42 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = "Windows 10 DSC Policy"; Description = "Test policy"; Id = "f38b283d-d893-4c33-b6d2-d3bcb5f2dcc2"; - PasswordRequired = $False; - PasswordBlockSimple = $False; - PasswordRequiredToUnlockFromIdle = $True; - PasswordMinutesOfInactivityBeforeLock = 15; - PasswordExpirationDays = 365; - PasswordMinimumLength = 6; - PasswordPreviousPasswordBlockCount = 13; - PasswordMinimumCharacterSetCount = 1; - PasswordRequiredType = "Devicedefault"; - RequireHealthyDeviceReport = $True; - OsMinimumVersion = 10; - OsMaximumVersion = 10.19; - MobileOsMinimumVersion = 10; - MobileOsMaximumVersion = 10.19; - EarlyLaunchAntiMalwareDriverEnabled = $False; - BitLockerEnabled = $False; - SecureBootEnabled = $True; - CodeIntegrityEnabled = $True; - StorageRequireEncryption = $True; - ActiveFirewallRequired = $True; - DefenderEnabled = $True; - DefenderVersion = ""; - SignatureOutOfDate = $True; - RtpEnabled = $True; - AntivirusRequired = $True; - AntiSpywareRequired = $True; - DeviceThreatProtectionEnabled = $True; - DeviceThreatProtectionRequiredSecurityLevel = "Medium"; - ConfigurationManagerComplianceRequired = $False; - TPMRequired = $False; - DeviceCompliancePolicyScript = $null; - ValidOperatingSystemBuildRanges = @(); - RoleScopeTagIds = "0" + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.windows10CompliancePolicy' + PasswordRequired = $False; + PasswordBlockSimple = $True; #Drift + PasswordRequiredToUnlockFromIdle = $True; + PasswordMinutesOfInactivityBeforeLock = 15; + PasswordExpirationDays = 365; + PasswordMinimumLength = 6; + PasswordPreviousPasswordBlockCount = 13; + PasswordMinimumCharacterSetCount = 1; + PasswordRequiredType = "Devicedefault"; + RequireHealthyDeviceReport = $True; + OsMinimumVersion = 10; + OsMaximumVersion = 10.19; + MobileOsMinimumVersion = 10; + MobileOsMaximumVersion = 10.19; + EarlyLaunchAntiMalwareDriverEnabled = $False; + BitLockerEnabled = $False; + SecureBootEnabled = $True; + CodeIntegrityEnabled = $True; + StorageRequireEncryption = $True; + ActiveFirewallRequired = $True; + DefenderEnabled = $True; + DefenderVersion = ""; + SignatureOutOfDate = $True; + RtpEnabled = $True; + AntivirusRequired = $True; + AntiSpywareRequired = $True; + DeviceThreatProtectionEnabled = $True; + DeviceThreatProtectionRequiredSecurityLevel = "Medium"; + ConfigurationManagerComplianceRequired = $False; + TPMRequired = $False; + DeviceCompliancePolicyScript = $null; + ValidOperatingSystemBuildRanges = @(); + RoleScopeTagIds = "0" + } } } } @@ -245,9 +252,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { TPMRequired = $False; DeviceCompliancePolicyScript = $null; ValidOperatingSystemBuildRanges = @(); - RoleScopeTagIds = "0" Ensure = 'Present'; - Credential = $Credential; + Credential = $Credential; } Mock -CommandName Get-MgDeviceManagementDeviceCompliancePolicy -MockWith { @@ -255,39 +261,42 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = "Windows 10 DSC Policy"; Description = "Test policy"; Id = "f38b283d-d893-4c33-b6d2-d3bcb5f2dcc2"; - PasswordRequired = $False; - PasswordBlockSimple = $False; - PasswordRequiredToUnlockFromIdle = $True; - PasswordMinutesOfInactivityBeforeLock = 15; - PasswordExpirationDays = 365; - PasswordMinimumLength = 6; - PasswordPreviousPasswordBlockCount = 13; - PasswordMinimumCharacterSetCount = 1; - PasswordRequiredType = "Devicedefault"; - RequireHealthyDeviceReport = $True; - OsMinimumVersion = 10; - OsMaximumVersion = 10.19; - MobileOsMinimumVersion = 10; - MobileOsMaximumVersion = 10.19; - EarlyLaunchAntiMalwareDriverEnabled = $False; - BitLockerEnabled = $False; - SecureBootEnabled = $True; - CodeIntegrityEnabled = $True; - StorageRequireEncryption = $True; - ActiveFirewallRequired = $True; - DefenderEnabled = $True; - DefenderVersion = ""; - SignatureOutOfDate = $True; - RtpEnabled = $True; - AntivirusRequired = $True; - AntiSpywareRequired = $True; - DeviceThreatProtectionEnabled = $True; - DeviceThreatProtectionRequiredSecurityLevel = "Medium"; - ConfigurationManagerComplianceRequired = $False; - TPMRequired = $False; - DeviceCompliancePolicyScript = $null; - ValidOperatingSystemBuildRanges = @(); - RoleScopeTagIds = "0" + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.windows10CompliancePolicy' + PasswordRequired = $False; + PasswordBlockSimple = $False; + PasswordRequiredToUnlockFromIdle = $True; + PasswordMinutesOfInactivityBeforeLock = 15; + PasswordExpirationDays = 365; + PasswordMinimumLength = 6; + PasswordPreviousPasswordBlockCount = 13; + PasswordMinimumCharacterSetCount = 1; + PasswordRequiredType = "Devicedefault"; + RequireHealthyDeviceReport = $True; + OsMinimumVersion = 10; + OsMaximumVersion = 10.19; + MobileOsMinimumVersion = 10; + MobileOsMaximumVersion = 10.19; + EarlyLaunchAntiMalwareDriverEnabled = $False; + BitLockerEnabled = $False; + SecureBootEnabled = $True; + CodeIntegrityEnabled = $True; + StorageRequireEncryption = $True; + ActiveFirewallRequired = $True; + DefenderEnabled = $True; + DefenderVersion = ""; + SignatureOutOfDate = $True; + RtpEnabled = $True; + AntivirusRequired = $True; + AntiSpywareRequired = $True; + DeviceThreatProtectionEnabled = $True; + DeviceThreatProtectionRequiredSecurityLevel = "Medium"; + ConfigurationManagerComplianceRequired = $False; + TPMRequired = $False; + DeviceCompliancePolicyScript = $null; + ValidOperatingSystemBuildRanges = @(); + RoleScopeTagIds = "0" + } } } } @@ -334,9 +343,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { TPMRequired = $False; DeviceCompliancePolicyScript = $null; ValidOperatingSystemBuildRanges = @(); - RoleScopeTagIds = "0" - Ensure = 'Present'; - Credential = $Credential; + Ensure = 'Absent'; + Credential = $Credential; } Mock -CommandName Get-MgDeviceManagementDeviceCompliancePolicy -MockWith { @@ -344,39 +352,42 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = "Windows 10 DSC Policy"; Description = "Test policy"; Id = "f38b283d-d893-4c33-b6d2-d3bcb5f2dcc2"; - PasswordRequired = $False; - PasswordBlockSimple = $False; - PasswordRequiredToUnlockFromIdle = $True; - PasswordMinutesOfInactivityBeforeLock = 15; - PasswordExpirationDays = 365; - PasswordMinimumLength = 6; - PasswordPreviousPasswordBlockCount = 13; - PasswordMinimumCharacterSetCount = 1; - PasswordRequiredType = "Devicedefault"; - RequireHealthyDeviceReport = $True; - OsMinimumVersion = 10; - OsMaximumVersion = 10.19; - MobileOsMinimumVersion = 10; - MobileOsMaximumVersion = 10.19; - EarlyLaunchAntiMalwareDriverEnabled = $False; - BitLockerEnabled = $False; - SecureBootEnabled = $True; - CodeIntegrityEnabled = $True; - StorageRequireEncryption = $True; - ActiveFirewallRequired = $True; - DefenderEnabled = $True; - DefenderVersion = ""; - SignatureOutOfDate = $True; - RtpEnabled = $True; - AntivirusRequired = $True; - AntiSpywareRequired = $True; - DeviceThreatProtectionEnabled = $True; - DeviceThreatProtectionRequiredSecurityLevel = "Medium"; - ConfigurationManagerComplianceRequired = $False; - TPMRequired = $False; - DeviceCompliancePolicyScript = $null; - ValidOperatingSystemBuildRanges = @(); - RoleScopeTagIds = "0" + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.windows10CompliancePolicy' + PasswordRequired = $False; + PasswordBlockSimple = $False; + PasswordRequiredToUnlockFromIdle = $True; + PasswordMinutesOfInactivityBeforeLock = 15; + PasswordExpirationDays = 365; + PasswordMinimumLength = 6; + PasswordPreviousPasswordBlockCount = 13; + PasswordMinimumCharacterSetCount = 1; + PasswordRequiredType = "Devicedefault"; + RequireHealthyDeviceReport = $True; + OsMinimumVersion = 10; + OsMaximumVersion = 10.19; + MobileOsMinimumVersion = 10; + MobileOsMaximumVersion = 10.19; + EarlyLaunchAntiMalwareDriverEnabled = $False; + BitLockerEnabled = $False; + SecureBootEnabled = $True; + CodeIntegrityEnabled = $True; + StorageRequireEncryption = $True; + ActiveFirewallRequired = $True; + DefenderEnabled = $True; + DefenderVersion = ""; + SignatureOutOfDate = $True; + RtpEnabled = $True; + AntivirusRequired = $True; + AntiSpywareRequired = $True; + DeviceThreatProtectionEnabled = $True; + DeviceThreatProtectionRequiredSecurityLevel = "Medium"; + ConfigurationManagerComplianceRequired = $False; + TPMRequired = $False; + DeviceCompliancePolicyScript = $null; + ValidOperatingSystemBuildRanges = @(); + RoleScopeTagIds = "0" + } } } } @@ -407,39 +418,42 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = "Windows 10 DSC Policy"; Description = "Test policy"; Id = "f38b283d-d893-4c33-b6d2-d3bcb5f2dcc2"; - PasswordRequired = $False; - PasswordBlockSimple = $False; - PasswordRequiredToUnlockFromIdle = $True; - PasswordMinutesOfInactivityBeforeLock = 15; - PasswordExpirationDays = 365; - PasswordMinimumLength = 6; - PasswordPreviousPasswordBlockCount = 13; - PasswordMinimumCharacterSetCount = 1; - PasswordRequiredType = "Devicedefault"; - RequireHealthyDeviceReport = $True; - OsMinimumVersion = 10; - OsMaximumVersion = 10.19; - MobileOsMinimumVersion = 10; - MobileOsMaximumVersion = 10.19; - EarlyLaunchAntiMalwareDriverEnabled = $False; - BitLockerEnabled = $False; - SecureBootEnabled = $True; - CodeIntegrityEnabled = $True; - StorageRequireEncryption = $True; - ActiveFirewallRequired = $True; - DefenderEnabled = $True; - DefenderVersion = ""; - SignatureOutOfDate = $True; - RtpEnabled = $True; - AntivirusRequired = $True; - AntiSpywareRequired = $True; - DeviceThreatProtectionEnabled = $True; - DeviceThreatProtectionRequiredSecurityLevel = "Medium"; - ConfigurationManagerComplianceRequired = $False; - TPMRequired = $False; - DeviceCompliancePolicyScript = $null; - ValidOperatingSystemBuildRanges = @(); - RoleScopeTagIds = "0" + AdditionalProperties = @{ + '@odata.type' = '#microsoft.graph.windows10CompliancePolicy' + PasswordRequired = $False; + PasswordBlockSimple = $False; + PasswordRequiredToUnlockFromIdle = $True; + PasswordMinutesOfInactivityBeforeLock = 15; + PasswordExpirationDays = 365; + PasswordMinimumLength = 6; + PasswordPreviousPasswordBlockCount = 13; + PasswordMinimumCharacterSetCount = 1; + PasswordRequiredType = "Devicedefault"; + RequireHealthyDeviceReport = $True; + OsMinimumVersion = 10; + OsMaximumVersion = 10.19; + MobileOsMinimumVersion = 10; + MobileOsMaximumVersion = 10.19; + EarlyLaunchAntiMalwareDriverEnabled = $False; + BitLockerEnabled = $False; + SecureBootEnabled = $True; + CodeIntegrityEnabled = $True; + StorageRequireEncryption = $True; + ActiveFirewallRequired = $True; + DefenderEnabled = $True; + DefenderVersion = ""; + SignatureOutOfDate = $True; + RtpEnabled = $True; + AntivirusRequired = $True; + AntiSpywareRequired = $True; + DeviceThreatProtectionEnabled = $True; + DeviceThreatProtectionRequiredSecurityLevel = "Medium"; + ConfigurationManagerComplianceRequired = $False; + TPMRequired = $False; + DeviceCompliancePolicyScript = $null; + ValidOperatingSystemBuildRanges = @(); + RoleScopeTagIds = "0" + } } } } @@ -448,7 +462,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Export-TargetResource @testParams } } - } } } diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyiOs.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyiOs.Tests.ps1 index ba1ab4eab1..cfe4e9e619 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyiOs.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceCompliancePolicyiOs.Tests.ps1 @@ -16,11 +16,9 @@ Import-Module -Name (Join-Path -Path $M365DSCTestFolder ` $Global:DscHelper = New-M365DscUnitTestHelper -StubModule $CmdletModule ` -DscResource "IntuneDeviceCompliancePolicyiOs" -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 "Pass@word1" -AsPlainText -Force $Credential = New-Object System.Management.Automation.PSCredential ("tenantadmin", $secpasswd) @@ -47,9 +45,9 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { } Mock -CommandName Remove-MgDeviceManagementDeviceCompliancePolicy -MockWith { } - - # Test contexts - Context -Name "When the iOS Device Compliance Policy doesn't already exist" -Fixture { + } + # Test contexts + Context -Name "When the iOS Device Compliance Policy doesn't already exist" -Fixture { BeforeAll { $testParams = @{ DisplayName = 'Test iOS Device Compliance Policy' @@ -68,9 +66,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DeviceThreatProtectionEnabled = $True DeviceThreatProtectionRequiredSecurityLevel = 'medium' ManagedEmailProfileRequired = $True - RoleScopeTagIds = "0" Ensure = 'Present' - Credential = $Credential + Credential = $Credential } Mock -CommandName Get-MgDeviceManagementDeviceCompliancePolicy -MockWith { @@ -111,7 +108,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DeviceThreatProtectionEnabled = $True DeviceThreatProtectionRequiredSecurityLevel = 'medium' ManagedEmailProfileRequired = $True - RoleScopeTagIds = "0" Ensure = 'Present' Credential = $Credential } @@ -121,21 +117,24 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = 'Test iOS Device Compliance Policy' Description = 'Different Value' Id = '9c4e2ed7-706e-4874-a826-0c2778352d45' - PasscodeBlockSimple = $True - PasscodeExpirationDays = 365 - PasscodeMinimumLength = 6 - PasscodeMinutesOfInactivityBeforeLock = 5 - PasscodePreviousPasscodeBlockCount = 3 - PasscodeMinimumCharacterSetCount = 2 - PasscodeRequiredType = 'numeric' - PasscodeRequired = $True - OsMinimumVersion = 10 - OsMaximumVersion = 12 - SecurityBlockJailbrokenDevices = $True - DeviceThreatProtectionEnabled = $True - DeviceThreatProtectionRequiredSecurityLevel = 'medium' - ManagedEmailProfileRequired = $True - RoleScopeTagIds = "0" + AdditionalProperties = @{ + PasscodeBlockSimple = $True + PasscodeExpirationDays = 365 + PasscodeMinimumLength = 6 + PasscodeMinutesOfInactivityBeforeLock = 5 + PasscodePreviousPasscodeBlockCount = 3 + PasscodeMinimumCharacterSetCount = 2 + PasscodeRequiredType = 'numeric' + PasscodeRequired = $True + OsMinimumVersion = 10 + OsMaximumVersion = 12 + SecurityBlockJailbrokenDevices = $True + DeviceThreatProtectionEnabled = $True + DeviceThreatProtectionRequiredSecurityLevel = 'medium' + ManagedEmailProfileRequired = $True + RoleScopeTagIds = "0" + '@odata.type' = '#microsoft.graph.iosCompliancePolicy' + } } } } @@ -173,9 +172,8 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DeviceThreatProtectionEnabled = $True DeviceThreatProtectionRequiredSecurityLevel = 'medium' ManagedEmailProfileRequired = $True - RoleScopeTagIds = "0" Ensure = 'Present' - Credential = $Credential + Credential = $Credential } Mock -CommandName Get-MgDeviceManagementDeviceCompliancePolicy -MockWith { @@ -183,21 +181,24 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = 'Test iOS Device Compliance Policy' Description = 'Test iOS Device Compliance Policy Description' Id = '9c4e2ed7-706e-4874-a826-0c2778352d45' - PasscodeBlockSimple = $True - PasscodeExpirationDays = 365 - PasscodeMinimumLength = 6 - PasscodeMinutesOfInactivityBeforeLock = 5 - PasscodePreviousPasscodeBlockCount = 3 - PasscodeMinimumCharacterSetCount = 2 - PasscodeRequiredType = 'numeric' - PasscodeRequired = $True - OsMinimumVersion = 10 - OsMaximumVersion = 12 - SecurityBlockJailbrokenDevices = $True - DeviceThreatProtectionEnabled = $True - DeviceThreatProtectionRequiredSecurityLevel = 'medium' - ManagedEmailProfileRequired = $True - RoleScopeTagIds = "0" + AdditionalProperties = @{ + PasscodeBlockSimple = $True + PasscodeExpirationDays = 365 + PasscodeMinimumLength = 6 + PasscodeMinutesOfInactivityBeforeLock = 5 + PasscodePreviousPasscodeBlockCount = 3 + PasscodeMinimumCharacterSetCount = 2 + PasscodeRequiredType = 'numeric' + PasscodeRequired = $True + OsMinimumVersion = 10 + OsMaximumVersion = 12 + SecurityBlockJailbrokenDevices = $True + DeviceThreatProtectionEnabled = $True + DeviceThreatProtectionRequiredSecurityLevel = 'medium' + ManagedEmailProfileRequired = $True + RoleScopeTagIds = "0" + '@odata.type' = '#microsoft.graph.iosCompliancePolicy' + } } } } @@ -226,8 +227,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DeviceThreatProtectionEnabled = $True DeviceThreatProtectionRequiredSecurityLevel = 'medium' ManagedEmailProfileRequired = $True - RoleScopeTagIds = "0" - Ensure = 'Present' + Ensure = 'Absent' Credential = $Credential } @@ -236,21 +236,24 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = 'Test iOS Device Compliance Policy' Description = 'Test iOS Device Compliance Policy Description' Id = '9c4e2ed7-706e-4874-a826-0c2778352d45' - PasscodeBlockSimple = $True - PasscodeExpirationDays = 365 - PasscodeMinimumLength = 6 - PasscodeMinutesOfInactivityBeforeLock = 5 - PasscodePreviousPasscodeBlockCount = 3 - PasscodeMinimumCharacterSetCount = 2 - PasscodeRequiredType = 'numeric' - PasscodeRequired = $True - OsMinimumVersion = 10 - OsMaximumVersion = 12 - SecurityBlockJailbrokenDevices = $True - DeviceThreatProtectionEnabled = $True - DeviceThreatProtectionRequiredSecurityLevel = 'medium' - ManagedEmailProfileRequired = $True - RoleScopeTagIds = "0" + AdditionalProperties = @{ + PasscodeBlockSimple = $True + PasscodeExpirationDays = 365 + PasscodeMinimumLength = 6 + PasscodeMinutesOfInactivityBeforeLock = 5 + PasscodePreviousPasscodeBlockCount = 3 + PasscodeMinimumCharacterSetCount = 2 + PasscodeRequiredType = 'numeric' + PasscodeRequired = $True + OsMinimumVersion = 10 + OsMaximumVersion = 12 + SecurityBlockJailbrokenDevices = $True + DeviceThreatProtectionEnabled = $True + DeviceThreatProtectionRequiredSecurityLevel = 'medium' + ManagedEmailProfileRequired = $True + RoleScopeTagIds = "0" + '@odata.type' = '#microsoft.graph.iosCompliancePolicy' + } } } } @@ -281,21 +284,24 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { DisplayName = 'Test iOS Device Compliance Policy' Description = 'Test iOS Device Compliance Policy Description' Id = '9c4e2ed7-706e-4874-a826-0c2778352d45' - PasscodeBlockSimple = $True - PasscodeExpirationDays = 365 - PasscodeMinimumLength = 6 - PasscodeMinutesOfInactivityBeforeLock = 5 - PasscodePreviousPasscodeBlockCount = 3 - PasscodeMinimumCharacterSetCount = 2 - PasscodeRequiredType = 'numeric' - PasscodeRequired = $True - OsMinimumVersion = 10 - OsMaximumVersion = 12 - SecurityBlockJailbrokenDevices = $True - DeviceThreatProtectionEnabled = $True - DeviceThreatProtectionRequiredSecurityLevel = 'medium' - ManagedEmailProfileRequired = $True - RoleScopeTagIds = "0" + AdditionalProperties = @{ + PasscodeBlockSimple = $True + PasscodeExpirationDays = 365 + PasscodeMinimumLength = 6 + PasscodeMinutesOfInactivityBeforeLock = 5 + PasscodePreviousPasscodeBlockCount = 3 + PasscodeMinimumCharacterSetCount = 2 + PasscodeRequiredType = 'numeric' + PasscodeRequired = $True + OsMinimumVersion = 10 + OsMaximumVersion = 12 + SecurityBlockJailbrokenDevices = $True + DeviceThreatProtectionEnabled = $True + DeviceThreatProtectionRequiredSecurityLevel = 'medium' + ManagedEmailProfileRequired = $True + RoleScopeTagIds = "0" + '@odata.type' = '#microsoft.graph.iosCompliancePolicy' + } } } } @@ -304,7 +310,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { Export-TargetResource @testParams } } - } } } diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyAndroidWorkProfile.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyAndroidWorkProfile.Tests.ps1 index 4bb49ff411..700efc6668 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyAndroidWorkProfile.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.IntuneDeviceConfigurationPolicyAndroidWorkProfile.Tests.ps1 @@ -111,7 +111,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { } It "Should create the policy from the Set method" { - Set-TargetResource @TestParams -verbose + Set-TargetResource @TestParams Should -Invoke -CommandName "New-MgDeviceManagementDeviceConfiguration" -Exactly 1 } } diff --git a/Tests/Unit/Stubs/Microsoft365.psm1 b/Tests/Unit/Stubs/Microsoft365.psm1 index d9474b1adb..aeb216c749 100644 --- a/Tests/Unit/Stubs/Microsoft365.psm1 +++ b/Tests/Unit/Stubs/Microsoft365.psm1 @@ -9386,6 +9386,10 @@ function Set-OwaMailboxPolicy [System.Object] $DirectFileAccessOnPrivateComputersEnabled, + [Parameter()] + [System.Object] + $AllowedOrganizationAccountDomains, + [Parameter()] [System.Object] $ChangePasswordEnabled, @@ -11159,7 +11163,7 @@ function Set-User param( [Parameter()] [System.Object] - $Company, + $MailboxRegion, [Parameter()] [System.Object] @@ -11211,7 +11215,7 @@ function Set-User [Parameter()] [System.Object] - $LastName, + $Company, [Parameter()] [System.Object] @@ -11261,6 +11265,10 @@ function Set-User [System.Object] $StateOrProvince, + [Parameter()] + [System.Object] + $Manager, + [Parameter()] [System.Object] $Initials, @@ -11274,8 +11282,8 @@ function Set-User $WebPage, [Parameter()] - [System.Management.Automation.SwitchParameter] - $PublicFolder, + [System.Object] + $LastName, [Parameter()] [System.Management.Automation.SwitchParameter] @@ -11283,7 +11291,7 @@ function Set-User [Parameter()] [System.Object] - $Manager, + $MailboxRegionSuffix, [Parameter()] [System.Object] @@ -11313,6 +11321,10 @@ function Set-User [System.Object] $PostOfficeBox, + [Parameter()] + [System.Management.Automation.SwitchParameter] + $PublicFolder, + [Parameter()] [System.Object] $WindowsEmailAddress, @@ -11673,208 +11685,240 @@ function New-MgApplication [CmdletBinding()] param( [Parameter()] - [System.Management.Automation.SwitchParameter] - $Oauth2RequirePostResponse, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOptionalClaims] + $OptionalClaims, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAddIn[]] - $AddIns, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphHomeRealmDiscoveryPolicy[]] + $HomeRealmDiscoveryPolicies, [Parameter()] - [System.String] - $SignInAudience, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSpaApplication] + $Spa, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSynchronization] + $Synchronization, [Parameter()] [System.String] - $Description, + $DefaultRedirectUri, [Parameter()] - [System.Management.Automation.SwitchParameter] - $IsFallbackPublicClient, + [System.DateTime] + $CreatedDateTime, [Parameter()] [System.String] $ApplicationTemplateId, [Parameter()] - [System.DateTime] - $CreatedDateTime, + [System.String] + $SignInAudience, [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphVerifiedPublisher] $VerifiedPublisher, [Parameter()] - [System.String] - $DisplayName, + [System.String[]] + $IdentifierUris, [Parameter()] [System.Management.Automation.SwitchParameter] - $Confirm, + $IsDeviceOnlyAuthSupported, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + [System.String] + $TokenEncryptionKeyId, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphRequiredResourceAccess[]] - $RequiredResourceAccess, + [System.String] + $UniqueName, [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, + [System.String] + $Description, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTokenIssuancePolicy[]] + $TokenIssuancePolicies, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWebApplication] - $Web, + [System.Uri] + $Proxy, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphParentalControlSettings] - $ParentalControlSettings, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphApiApplication] + $Api, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOptionalClaims] - $OptionalClaims, + [System.String] + $PublisherDomain, [Parameter()] [System.String] - $DisabledByMicrosoftStatus, + $GroupMembershipClaims, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTokenLifetimePolicy[]] - $TokenLifetimePolicies, + [System.String] + $Id, + + [Parameter()] + [System.String[]] + $Tags, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + $HttpPipelineAppend, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphKeyCredential[]] - $KeyCredentials, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $Owners, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphHomeRealmDiscoveryPolicy[]] - $HomeRealmDiscoveryPolicies, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphFederatedIdentityCredential[]] + $FederatedIdentityCredentials, [Parameter()] - [System.String] - $GroupMembershipClaims, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTokenLifetimePolicy[]] + $TokenLifetimePolicies, [Parameter()] - [System.String[]] - $IdentifierUris, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAppManagementPolicy[]] + $AppManagementPolicies, [Parameter()] [System.String] - $PublisherDomain, + $DisabledByMicrosoftStatus, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphCertification] - $Certification, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPasswordCredential[]] + $PasswordCredentials, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphInformationalUrl] - $Info, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPublicClientApplication] + $PublicClient, [Parameter()] [System.String] - $SamlMetadataUrl, + $Notes, [Parameter()] - [System.String] - $ServiceManagementReference, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphRequiredResourceAccess[]] + $RequiredResourceAccess, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphApiApplication] - $Api, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphParentalControlSettings] + $ParentalControlSettings, [Parameter()] - [System.Management.Automation.SwitchParameter] - $IsDeviceOnlyAuthSupported, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWebApplication] + $Web, [Parameter()] - [System.Uri] - $Proxy, + [System.String] + $DisplayName, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSpaApplication] - $Spa, + [System.Management.Automation.SwitchParameter] + $IsFallbackPublicClient, [Parameter()] - [System.String] - $TokenEncryptionKeyId, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAddIn[]] + $AddIns, [Parameter()] - [System.String] - $Id, + [System.DateTime] + $DeletedDateTime, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $Owners, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphRequestSignatureVerification] + $RequestSignatureVerification, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphFederatedIdentityCredential[]] - $FederatedIdentityCredentials, + [System.String] + $LogoInputFile, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphApplication1] - $BodyParameter, + [System.Collections.Hashtable] + $AdditionalProperties, [Parameter()] - [System.String] - $Notes, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAppRole[]] + $AppRoles, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphExtensionProperty[]] - $ExtensionProperties, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] [System.String] - $LogoInputFile, + $ServiceManagementReference, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPublicClientApplication] - $PublicClient, + [System.Management.Automation.SwitchParameter] + $Confirm, [Parameter()] - [System.String[]] - $Tags, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphExtensionProperty[]] + $ExtensionProperties, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsApplication] + $Windows, [Parameter()] [System.Management.Automation.PSCredential] $ProxyCredential, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphConnectorGroup] + $ConnectorGroup, + [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject] $CreatedOnBehalfOf, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTokenIssuancePolicy[]] - $TokenIssuancePolicies, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphKeyCredential[]] + $KeyCredentials, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPasswordCredential[]] - $PasswordCredentials, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphCertification] + $Certification, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOnPremisesPublishing] + $OnPremisesPublishing, + + [Parameter()] + [System.String] + $SamlMetadataUrl, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphInformationalUrl] + $Info, [Parameter()] [System.Management.Automation.SwitchParameter] - $Break, + $ProxyUseDefaultCredentials, [Parameter()] - [System.DateTime] - $DeletedDateTime, + [System.Management.Automation.SwitchParameter] + $Oauth2RequirePostResponse, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAppRole[]] - $AppRoles, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphApplication1] + $BodyParameter, [Parameter()] [System.String] - $AppId + $AppId, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break ) } function New-MgApplicationOwnerByRef @@ -11955,8 +11999,8 @@ function New-MgServicePrincipal $Oauth2PermissionScopes, [Parameter()] - [System.String[]] - $Tags, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSynchronization] + $Synchronization, [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAppRoleAssignment[]] @@ -11970,10 +12014,22 @@ function New-MgServicePrincipal [System.String] $SignInAudience, + [Parameter()] + [System.String] + $PublisherName, + + [Parameter()] + [System.String] + $ErrorUrl, + [Parameter()] [System.String[]] $NotificationEmailAddresses, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphLicenseDetails[]] + $LicenseDetails, + [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphClaimsMappingPolicy[]] $ClaimsMappingPolicies, @@ -11986,6 +12042,10 @@ function New-MgServicePrincipal [System.String] $Description, + [Parameter()] + [System.String] + $DisabledByMicrosoftStatus, + [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTokenIssuancePolicy[]] $TokenIssuancePolicies, @@ -12022,13 +12082,17 @@ function New-MgServicePrincipal [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSamlSingleSignOnSettings] $SamlSingleSignOnSettings, + [Parameter()] + [System.String[]] + $Tags, + [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend, [Parameter()] - [System.String] - $DisplayName, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $Owners, [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] @@ -12047,8 +12111,16 @@ function New-MgServicePrincipal $TokenLifetimePolicies, [Parameter()] - [System.String] - $DisabledByMicrosoftStatus, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAppManagementPolicy[]] + $AppManagementPolicies, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $CreatedObjects, + + [Parameter()] + [System.DateTime] + $PreferredTokenSigningKeyEndDateTime, [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDelegatedPermissionClassification[]] @@ -12067,12 +12139,16 @@ function New-MgServicePrincipal $Notes, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEndpoint[]] - $Endpoints, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPermissionScope[]] + $PublishedPermissionScopes, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAddIn[]] - $AddIns, + [System.String] + $DisplayName, + + [Parameter()] + [System.String] + $SamlMetadataUrl, [Parameter()] [System.DateTime] @@ -12102,10 +12178,6 @@ function New-MgServicePrincipal [System.Management.Automation.SwitchParameter] $Confirm, - [Parameter()] - [System.String] - $AppId, - [Parameter()] [System.Management.Automation.PSCredential] $ProxyCredential, @@ -12123,12 +12195,20 @@ function New-MgServicePrincipal $KeyCredentials, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphResourceSpecificPermission[]] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOAuth2PermissionGrant[]] + $Oauth2PermissionGrants, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphResourceSpecificPermission[]] $ResourceSpecificApplicationPermissions, [Parameter()] - [System.String] - $LogoutUrl, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPasswordSingleSignOnSettings] + $PasswordSingleSignOnSettings, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAddIn[]] + $AddIns, [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphInformationalUrl] @@ -12143,24 +12223,28 @@ function New-MgServicePrincipal $PreferredSingleSignOnMode, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $Owners, + [System.Collections.Hashtable] + $CustomSecurityAttributes, [Parameter()] [System.Management.Automation.SwitchParameter] $ProxyUseDefaultCredentials, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOAuth2PermissionGrant[]] - $Oauth2PermissionGrants, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEndpoint[]] + $Endpoints, [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphServicePrincipal] $BodyParameter, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $CreatedObjects, + [System.String] + $AppId, + + [Parameter()] + [System.String] + $LogoutUrl, [Parameter()] [System.Management.Automation.SwitchParameter] @@ -12269,6 +12353,14 @@ function Update-MgApplication { [CmdletBinding()] param( + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOptionalClaims] + $OptionalClaims, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IApplicationsIdentity] + $InputObject, + [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphHomeRealmDiscoveryPolicy[]] $HomeRealmDiscoveryPolicies, @@ -12281,6 +12373,10 @@ function Update-MgApplication [System.String[]] $Tags, + [Parameter()] + [System.String] + $DefaultRedirectUri, + [Parameter()] [System.DateTime] $CreatedDateTime, @@ -12297,10 +12393,6 @@ function Update-MgApplication [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphVerifiedPublisher] $VerifiedPublisher, - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOptionalClaims] - $OptionalClaims, - [Parameter()] [System.String[]] $IdentifierUris, @@ -12313,6 +12405,10 @@ function Update-MgApplication [System.String] $TokenEncryptionKeyId, + [Parameter()] + [System.String] + $UniqueName, + [Parameter()] [System.String] $Description, @@ -12357,6 +12453,10 @@ function Update-MgApplication [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTokenLifetimePolicy[]] $TokenLifetimePolicies, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAppManagementPolicy[]] + $AppManagementPolicies, + [Parameter()] [System.String] $DisabledByMicrosoftStatus, @@ -12369,6 +12469,10 @@ function Update-MgApplication [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPublicClientApplication] $PublicClient, + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Oauth2RequirePostResponse, + [Parameter()] [System.String] $Notes, @@ -12398,13 +12502,17 @@ function Update-MgApplication $PassThru, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAddIn[]] - $AddIns, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSynchronization] + $Synchronization, [Parameter()] [System.DateTime] $DeletedDateTime, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphRequestSignatureVerification] + $RequestSignatureVerification, + [Parameter()] [System.String] $LogoInputFile, @@ -12433,6 +12541,10 @@ function Update-MgApplication [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphExtensionProperty[]] $ExtensionProperties, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsApplication] + $Windows, + [Parameter()] [System.Management.Automation.PSCredential] $ProxyCredential, @@ -12441,6 +12553,14 @@ function Update-MgApplication [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject] $CreatedOnBehalfOf, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphConnectorGroup] + $ConnectorGroup, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAddIn[]] + $AddIns, + [Parameter()] [System.String] $ServiceManagementReference, @@ -12453,6 +12573,10 @@ function Update-MgApplication [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphCertification] $Certification, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOnPremisesPublishing] + $OnPremisesPublishing, + [Parameter()] [System.String] $SamlMetadataUrl, @@ -12465,18 +12589,10 @@ function Update-MgApplication [System.Management.Automation.SwitchParameter] $ProxyUseDefaultCredentials, - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Oauth2RequirePostResponse, - [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphApplication1] $BodyParameter, - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IApplicationsIdentity] - $InputObject, - [Parameter()] [System.String] $AppId, @@ -12515,8 +12631,8 @@ function Update-MgServicePrincipal $Oauth2PermissionScopes, [Parameter()] - [System.String[]] - $Tags, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSynchronization] + $Synchronization, [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAppRoleAssignment[]] @@ -12527,13 +12643,17 @@ function Update-MgServicePrincipal $ServicePrincipalId, [Parameter()] - [System.String] - $ApplicationTemplateId, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphLicenseDetails[]] + $LicenseDetails, [Parameter()] [System.String] $SignInAudience, + [Parameter()] + [System.String] + $PublisherName, + [Parameter()] [System.String[]] $NotificationEmailAddresses, @@ -12550,6 +12670,10 @@ function Update-MgServicePrincipal [System.String] $Description, + [Parameter()] + [System.String] + $DisabledByMicrosoftStatus, + [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTokenIssuancePolicy[]] $TokenIssuancePolicies, @@ -12586,6 +12710,10 @@ function Update-MgServicePrincipal [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSamlSingleSignOnSettings] $SamlSingleSignOnSettings, + [Parameter()] + [System.String[]] + $Tags, + [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend, @@ -12610,13 +12738,21 @@ function Update-MgServicePrincipal [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTokenLifetimePolicy[]] $TokenLifetimePolicies, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAppManagementPolicy[]] + $AppManagementPolicies, + [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] $CreatedObjects, + [Parameter()] + [System.DateTime] + $PreferredTokenSigningKeyEndDateTime, + [Parameter()] [System.String] - $DisabledByMicrosoftStatus, + $ErrorUrl, [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDelegatedPermissionClassification[]] @@ -12634,6 +12770,10 @@ function Update-MgServicePrincipal [System.String] $Notes, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPermissionScope[]] + $PublishedPermissionScopes, + [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEndpoint[]] $Endpoints, @@ -12686,6 +12826,10 @@ function Update-MgServicePrincipal [System.Management.Automation.SwitchParameter] $AppRoleAssignmentRequired, + [Parameter()] + [System.String] + $ApplicationTemplateId, + [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphKeyCredential[]] $KeyCredentials, @@ -12698,9 +12842,13 @@ function Update-MgServicePrincipal [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphResourceSpecificPermission[]] $ResourceSpecificApplicationPermissions, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPasswordSingleSignOnSettings] + $PasswordSingleSignOnSettings, + [Parameter()] [System.String] - $LogoutUrl, + $SamlMetadataUrl, [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphInformationalUrl] @@ -12718,6 +12866,10 @@ function Update-MgServicePrincipal [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] $Owners, + [Parameter()] + [System.Collections.Hashtable] + $CustomSecurityAttributes, + [Parameter()] [System.Management.Automation.SwitchParameter] $ProxyUseDefaultCredentials, @@ -12730,6 +12882,10 @@ function Update-MgServicePrincipal [System.String] $AppId, + [Parameter()] + [System.String] + $LogoutUrl, + [Parameter()] [System.Management.Automation.SwitchParameter] $Break @@ -13186,8 +13342,8 @@ function New-MgDeviceManagementDeviceCategory $HttpPipelinePrepend, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceCategory] - $BodyParameter, + [System.String] + $DisplayName, [Parameter()] [System.Uri] @@ -13198,8 +13354,8 @@ function New-MgDeviceManagementDeviceCategory $ProxyCredential, [Parameter()] - [System.String] - $DisplayName, + [System.String[]] + $RoleScopeTagIds, [Parameter()] [System.Management.Automation.SwitchParameter] @@ -13213,6 +13369,10 @@ function New-MgDeviceManagementDeviceCategory [System.Management.Automation.SwitchParameter] $ProxyUseDefaultCredentials, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceCategory] + $BodyParameter, + [Parameter()] [System.String] $Id, @@ -13282,6 +13442,10 @@ function New-MgDeviceManagementDeviceCompliancePolicy [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceComplianceDeviceStatus[]] $DeviceStatuses, + [Parameter()] + [System.String[]] + $RoleScopeTagIds, + [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceComplianceScheduledActionForRule[]] $ScheduledActionsForRule, @@ -13347,6 +13511,10 @@ function New-MgDeviceManagementDeviceConfiguration [System.String] $DisplayName, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceConfigurationDeviceStatus[]] + $DeviceStatuses, + [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceConfigurationDeviceOverview] $DeviceStatusOverview, @@ -13357,12 +13525,20 @@ function New-MgDeviceManagementDeviceConfiguration [Parameter()] [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + $SupportsScopeTags, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementApplicabilityRuleOSVersion] + $DeviceManagementApplicabilityRuleOSVersion, [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceConfigurationUserOverview] $UserStatusOverview, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceConfigurationGroupAssignment[]] + $GroupAssignments, + [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelinePrepend, @@ -13372,8 +13548,16 @@ function New-MgDeviceManagementDeviceConfiguration $Version, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceConfigurationDeviceStatus[]] - $DeviceStatuses, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSettingStateDeviceSummary[]] + $DeviceSettingStateSummaries, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementApplicabilityRuleDeviceMode] + $DeviceManagementApplicabilityRuleDeviceMode, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementApplicabilityRuleOSEdition] + $DeviceManagementApplicabilityRuleOSEdition, [Parameter()] [System.Uri] @@ -13387,10 +13571,6 @@ function New-MgDeviceManagementDeviceConfiguration [System.String] $Id, - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSettingStateDeviceSummary[]] - $DeviceSettingStateSummaries, - [Parameter()] [System.Management.Automation.SwitchParameter] $Confirm, @@ -13399,10 +13579,18 @@ function New-MgDeviceManagementDeviceConfiguration [System.Management.Automation.PSCredential] $ProxyCredential, + [Parameter()] + [System.String[]] + $RoleScopeTagIds, + [Parameter()] [System.Management.Automation.SwitchParameter] $Break, + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend @@ -13560,767 +13748,743 @@ function Update-MgDeviceManagement [CmdletBinding()] param( [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceCategory[]] - $DeviceCategories, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTermsAndConditions[]] + $TermsAndConditions, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphApplePushNotificationCertificate] - $ApplePushNotificationCertificate, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAndroidForWorkSettings] + $AndroidForWorkSettings, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementPartner[]] - $DeviceManagementPartners, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMicrosoftTunnelHealthThreshold[]] + $MicrosoftTunnelHealthThresholds, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTelecomExpenseManagementPartner[]] - $TelecomExpenseManagementPartners, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphRoleScopeTag[]] + $RoleScopeTags, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTermsAndConditions[]] - $TermsAndConditions, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementExchangeConnector[]] + $ExchangeConnectors, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementSettings] - $Settings, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagement] + $BodyParameter, [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroupPolicyObjectFile[]] + $GroupPolicyObjectFiles, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsAutopilotDeploymentProfile[]] + $WindowsAutopilotDeploymentProfiles, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsInformationProtectionNetworkLearningSummary[]] - $WindowsInformationProtectionNetworkLearningSummaries, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphResourceOperation[]] + $ResourceOperations, [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphConfigManagerCollection[]] + $ConfigManagerCollections, [Parameter()] - [Microsoft.Graph.PowerShell.Support.DeviceManagementSubscriptionState] - $SubscriptionState, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsBatteryHealthDevicePerformance[]] + $UserExperienceAnalyticsBatteryHealthDevicePerformance, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceCompliancePolicyDeviceStateSummary] - $DeviceCompliancePolicyDeviceStateSummary, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphZebraFotaConnector] + $ZebraFotaConnector, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphIntuneBrand] - $IntuneBrand, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphVirtualEndpoint] + $VirtualEndpoint, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementConfigurationCategory[]] + $ConfigurationCategories, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementTroubleshootingEvent[]] - $TroubleshootingEvents, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedDeviceEncryptionState[]] + $ManagedDeviceEncryptionStates, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceConfigurationDeviceStateSummary] - $DeviceConfigurationDeviceStateSummaries, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMicrosoftTunnelSite[]] + $MicrosoftTunnelSites, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphRoleDefinition[]] - $RoleDefinitions, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceEnrollmentConfiguration[]] + $DeviceEnrollmentConfigurations, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphComplianceManagementPartner[]] - $ComplianceManagementPartners, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementExchangeOnPremisesPolicy] + $ExchangeOnPremisesPolicy, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedDeviceOverview] - $ManagedDeviceOverview, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsBatteryHealthAppImpact[]] + $UserExperienceAnalyticsBatteryHealthAppImpact, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSoftwareUpdateStatusSummary] - $SoftwareUpdateStatusSummary, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsInformationProtectionAppLearningSummary[]] + $WindowsInformationProtectionAppLearningSummaries, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedDevice[]] - $ManagedDevices, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAndroidDeviceOwnerEnrollmentProfile[]] + $AndroidDeviceOwnerEnrollmentProfiles, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphNotificationMessageTemplate[]] - $NotificationMessageTemplates, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementConfigurationSettingDefinition[]] + $ReusableSettings, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementReports] - $Reports, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroupPolicyMigrationReport[]] + $GroupPolicyMigrationReports, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDetectedApp[]] - $DetectedApps, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsInformationProtectionNetworkLearningSummary[]] + $WindowsInformationProtectionNetworkLearningSummaries, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsAutopilotDeviceIdentity[]] - $WindowsAutopilotDeviceIdentities, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId[]] + $UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceAndAppManagementRoleAssignment[]] - $RoleAssignments, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsMetricHistory[]] + $UserExperienceAnalyticsMetricHistory, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceCompliancePolicySettingStateSummary[]] - $DeviceCompliancePolicySettingStateSummaries, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsWorkFromAnywhereMetric[]] + $UserExperienceAnalyticsWorkFromAnywhereMetrics, [Parameter()] - [System.Uri] - $Proxy, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEmbeddedSimActivationCodePool[]] + $EmbeddedSimActivationCodePools, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceCompliancePolicy[]] - $DeviceCompliancePolicies, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsModelScores[]] + $UserExperienceAnalyticsModelScores, [Parameter()] - [System.String] - $IntuneAccountId, + [System.Collections.Hashtable] + $AdditionalProperties, [Parameter()] - [System.String] - $Id, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementCompliancePolicy[]] + $CompliancePolicies, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsInformationProtectionAppLearningSummary[]] - $WindowsInformationProtectionAppLearningSummaries, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMobileThreatDefenseConnector[]] + $MobileThreatDefenseConnectors, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementConfigurationPolicy[]] + $ConfigurationPolicies, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphRemoteAssistancePartner[]] - $RemoteAssistancePartners, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceProtectionOverview] + $DeviceProtectionOverview, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementExchangeConnector[]] - $ExchangeConnectors, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDepOnboardingSetting[]] + $DepOnboardingSettings, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphIosUpdateDeviceStatus[]] - $IosUpdateStatuses, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroupPolicyDefinitionFile[]] + $GroupPolicyDefinitionFiles, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMobileThreatDefenseConnector[]] - $MobileThreatDefenseConnectors, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceAndAppManagementRoleAssignment[]] + $RoleAssignments, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagement] - $BodyParameter, + [System.DateTime] + $LastReportAggregationDateTime, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsDriverUpdateProfile[]] + $WindowsDriverUpdateProfiles, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOnPremisesConditionalAccessSettings] - $ConditionalAccessSettings, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphCartToClassAssociation[]] + $CartToClassAssociations, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceConfiguration[]] - $DeviceConfigurations, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementScript[]] + $DeviceManagementScripts, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphImportedWindowsAutopilotDeviceIdentity[]] - $ImportedWindowsAutopilotDeviceIdentities, + [Microsoft.Graph.PowerShell.Support.DeviceManagementSubscriptionState] + $SubscriptionState, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsMalwareInformation[]] + $WindowsMalwareInformation, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceEnrollmentConfiguration[]] - $DeviceEnrollmentConfigurations, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroupPolicyDefinition[]] + $GroupPolicyDefinitions, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDetectedApp[]] + $DetectedApps, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphResourceOperation[]] - $ResourceOperations - ) -} -function Update-MgDeviceManagementDeviceCategory -{ - [CmdletBinding()] - param( + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAdvancedThreatProtectionOnboardingStateSummary] + $AdvancedThreatProtectionOnboardingStateSummary, + [Parameter()] - [System.String] - $Description, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsDeviceScope[]] + $UserExperienceAnalyticsDeviceScopes, [Parameter()] - [System.String] - $DisplayName, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsBaseline[]] + $UserExperienceAnalyticsBaselines, [Parameter()] - [System.String] - $DeviceCategoryId, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsScoreHistory[]] + $UserExperienceAnalyticsScoreHistory, [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsAppHealthApplicationPerformance[]] + $UserExperienceAnalyticsAppHealthApplicationPerformance, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [System.DateTime] + $AccountMoveCompletionDateTime, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementReports] + $Reports, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IDeviceManagementIdentity] - $InputObject, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementSettings] + $Settings, [Parameter()] - [System.Uri] - $Proxy, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceConfiguration[]] + $DeviceConfigurations, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceCategory] - $BodyParameter, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphRemoteAssistanceSettings] + $RemoteAssistanceSettings, [Parameter()] - [System.String] - $Id, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphCertificateConnectorDetails[]] + $CertificateConnectorDetails, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAuditEvent[]] + $AuditEvents, [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroupPolicyConfiguration[]] + $GroupPolicyConfigurations, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceCategory[]] + $DeviceCategories, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, + [System.Collections.Hashtable] + $TenantAttachRbac, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend - ) -} -function Update-MgDeviceManagementDeviceCompliancePolicy -{ - [CmdletBinding()] - param( + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsAppHealthAppPerformanceByOSVersion[]] + $UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion, + [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceComplianceUserStatus[]] - $UserStatuses, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsCategory] + $UserExperienceAnalyticsAppHealthOverview, [Parameter()] - [System.String] - $Description, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsAutopilotSettings] + $WindowsAutopilotSettings, [Parameter()] - [System.DateTime] - $LastModifiedDateTime, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsBatteryHealthDeviceAppImpact[]] + $UserExperienceAnalyticsBatteryHealthDeviceAppImpact, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceCompliancePolicyAssignment[]] - $Assignments, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementConfigurationPolicyTemplate[]] + $ConfigurationPolicyTemplates, [Parameter()] - [System.DateTime] - $CreatedDateTime, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphApplePushNotificationCertificate] + $ApplePushNotificationCertificate, [Parameter()] - [System.String] - $DisplayName, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsMetricHistory[]] + $UserExperienceAnalyticsDeviceMetricHistory, [Parameter()] - [System.String] - $DeviceCompliancePolicyId, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsAppHealthOSVersionPerformance[]] + $UserExperienceAnalyticsAppHealthOSVersionPerformance, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceComplianceDeviceOverview] - $DeviceStatusOverview, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphRemoteAssistancePartner[]] + $RemoteAssistancePartners, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IDeviceManagementIdentity] - $InputObject, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementAutopilotEvent[]] + $AutopilotEvents, [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphComplianceManagementPartner[]] + $ComplianceManagementPartners, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsDeviceWithoutCloudIdentity[]] + $UserExperienceAnalyticsDevicesWithoutCloudIdentity, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceComplianceUserOverview] - $UserStatusOverview, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementTroubleshootingEvent[]] + $TroubleshootingEvents, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsBatteryHealthCapacityDetails] + $UserExperienceAnalyticsBatteryHealthCapacityDetails, [Parameter()] - [System.Int32] - $Version, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedDeviceOverview] + $ManagedDeviceOverview, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceComplianceDeviceStatus[]] - $DeviceStatuses, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroupPolicyUploadedDefinitionFile[]] + $GroupPolicyUploadedDefinitionFiles, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceComplianceScheduledActionForRule[]] - $ScheduledActionsForRule, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementPartner[]] + $DeviceManagementPartners, [Parameter()] - [System.Uri] - $Proxy, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAndroidManagedStoreAppConfigurationSchema[]] + $AndroidManagedStoreAppConfigurationSchemas, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceCompliancePolicy] - $BodyParameter, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsResourcePerformance[]] + $UserExperienceAnalyticsResourcePerformance, [Parameter()] - [System.String] - $Id, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMacOSSoftwareUpdateAccountSummary[]] + $MacOSSoftwareUpdateAccountSummaries, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSettingStateDeviceSummary[]] - $DeviceSettingStateSummaries, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsWorkFromAnywhereModelPerformance[]] + $UserExperienceAnalyticsWorkFromAnywhereModelPerformance, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementConfigurationCategory[]] + $ComplianceCategories, [Parameter()] [System.Management.Automation.SwitchParameter] $Confirm, [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceConfigurationConflictSummary[]] + $DeviceConfigurationConflictSummary, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTelecomExpenseManagementPartner[]] + $TelecomExpenseManagementPartners, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementTemplate[]] + $Templates, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMicrosoftTunnelConfiguration[]] + $MicrosoftTunnelConfigurations, [Parameter()] [System.Management.Automation.SwitchParameter] - $Break, + $ProxyUseDefaultCredentials, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend - ) -} -function Update-MgDeviceManagementDeviceConfiguration -{ - [CmdletBinding()] - param( + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsMalwareOverview] + $WindowsMalwareOverview, + [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceConfigurationUserStatus[]] - $UserStatuses, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementResourceAccessProfileBase[]] + $ResourceAccessProfiles, [Parameter()] - [System.String] - $Description, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory[]] + $UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory, [Parameter()] - [System.DateTime] - $LastModifiedDateTime, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementIntent[]] + $Intents, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceConfigurationAssignment[]] - $Assignments, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsFeatureUpdateProfile[]] + $WindowsFeatureUpdateProfiles, [Parameter()] - [System.DateTime] - $CreatedDateTime, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsBatteryHealthRuntimeDetails] + $UserExperienceAnalyticsBatteryHealthRuntimeDetails, [Parameter()] - [System.String] - $DisplayName, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementConfigurationSettingDefinition[]] + $ComplianceSettings, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceConfigurationDeviceStatus[]] - $DeviceStatuses, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsDeviceScores[]] + $UserExperienceAnalyticsDeviceScores, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceConfigurationDeviceOverview] - $DeviceStatusOverview, + [System.String] + $IntuneAccountId, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IDeviceManagementIdentity] - $InputObject, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOnPremisesConditionalAccessSettings] + $ConditionalAccessSettings, [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphIosUpdateDeviceStatus[]] + $IosUpdateStatuses, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [System.DateTime] + $DeviceComplianceReportSummarizationDateTime, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceConfigurationUserOverview] - $UserStatusOverview, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphZebraFotaDeployment[]] + $ZebraFotaDeployments, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphCloudPcConnectivityIssue[]] + $CloudPcConnectivityIssues, [Parameter()] - [System.Int32] - $Version, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsImpactingProcess[]] + $UserExperienceAnalyticsImpactingProcess, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSettingStateDeviceSummary[]] - $DeviceSettingStateSummaries, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsDeviceStartupHistory[]] + $UserExperienceAnalyticsDeviceStartupHistory, [Parameter()] - [System.String] - $DeviceConfigurationId, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementDerivedCredentialSettings[]] + $DerivedCredentials, [Parameter()] - [System.Uri] - $Proxy, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsBatteryHealthModelPerformance[]] + $UserExperienceAnalyticsBatteryHealthModelPerformance, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceConfiguration] - $BodyParameter, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceCompliancePolicy[]] + $DeviceCompliancePolicies, [Parameter()] [System.String] $Id, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAndroidForWorkAppConfigurationSchema[]] + $AndroidForWorkAppConfigurationSchemas, [Parameter()] [System.Management.Automation.SwitchParameter] $PassThru, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementSettingDefinition[]] + $SettingDefinitions, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsSettings] + $UserExperienceAnalyticsSettings, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend - ) -} -#endregion -#region MicrosoftGraph -#endregion -#region MicrosoftGraph -function Get-MgDeviceManagementDeviceEnrollmentConfiguration -{ - [CmdletBinding()] - param( + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAndroidManagedStoreAccountEnterpriseSettings] + $AndroidManagedStoreAccountEnterpriseSettings, + [Parameter()] - [System.String[]] - $Property, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedDevice[]] + $ManagedDevices, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IDeviceManagementEnrolmentIdentity] - $InputObject, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAppleUserInitiatedEnrollmentProfile[]] + $AppleUserInitiatedEnrollmentProfiles, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceConfigurationDeviceStateSummary] + $DeviceConfigurationDeviceStateSummaries, [Parameter()] - [System.Int32] - $PageSize, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric] + $UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementReusablePolicySetting[]] + $ReusablePolicySettings, [Parameter()] - [System.Int32] - $Skip, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails[]] + $UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails, [Parameter()] - [System.Int32] - $Top, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOemWarrantyInformationOnboarding[]] + $OemWarrantyInformationOnboarding, [Parameter()] - [System.String] - $CountVariable, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsRemoteConnection[]] + $UserExperienceAnalyticsRemoteConnection, [Parameter()] - [System.String] - $DeviceEnrollmentConfigurationId, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementConfigurationSettingDefinition[]] + $ConfigurationSettings, [Parameter()] - [System.Uri] - $Proxy, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsDeviceScope] + $UserExperienceAnalyticsDeviceScope, [Parameter()] - [System.String[]] - $Sort, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] - [System.Management.Automation.SwitchParameter] - $All, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] - [System.String] - $Filter, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsNotAutopilotReadyDevice[]] + $UserExperienceAnalyticsNotAutopilotReadyDevice, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsCategory[]] + $UserExperienceAnalyticsCategories, [Parameter()] - [System.String] - $Search, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphRestrictedAppsViolation[]] + $DeviceConfigurationRestrictedAppsViolations, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsDeviceStartupProcess[]] + $UserExperienceAnalyticsDeviceStartupProcesses, [Parameter()] - [System.String[]] - $ExpandProperty, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMobileAppTroubleshootingEvent[]] + $MobileAppTroubleshootingEvents, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend - ) -} -function Get-MgRoleManagement -{ - [CmdletBinding()] - param( + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOrganizationalMessageGuidedContent[]] + $OrganizationalMessageGuidedContents, + [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphChromeOSOnboardingSettings[]] + $ChromeOSOnboardingSettings, [Parameter()] - [System.Uri] - $Proxy, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphRoleDefinition[]] + $RoleDefinitions, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceShellScript[]] + $DeviceShellScripts, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphImportedWindowsAutopilotDeviceIdentity[]] + $ImportedWindowsAutopilotDeviceIdentities, [Parameter()] - [System.String[]] - $ExpandProperty, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsAppHealthAppPerformanceByAppVersion[]] + $UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion, [Parameter()] - [System.String[]] - $Property, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceCompliancePolicySettingStateSummary[]] + $DeviceCompliancePolicySettingStateSummaries, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break - ) -} -function Get-MgRoleManagementDirectory -{ - [CmdletBinding()] - param( + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAndroidForWorkEnrollmentProfile[]] + $AndroidForWorkEnrollmentProfiles, + [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphComanagementEligibleDevice[]] + $ComanagementEligibleDevices, [Parameter()] - [System.Uri] - $Proxy, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsRegressionSummary] + $UserExperienceAnalyticsRegressionSummary, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphNotificationMessageTemplate[]] + $NotificationMessageTemplates, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphIntuneBrand] + $IntuneBrand, [Parameter()] - [System.String[]] - $ExpandProperty, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsOverview] + $UserExperienceAnalyticsOverview, [Parameter()] - [System.String[]] - $Property, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementConfigurationSettingTemplate[]] + $TemplateSettings, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphRemoteActionAudit[]] + $RemoteActionAudits, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break - ) -} -function Get-MgRoleManagementDirectoryRoleDefinition -{ - [CmdletBinding()] - param( + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsUpdateCatalogItem[]] + $WindowsUpdateCatalogItems, + [Parameter()] - [System.String[]] - $Property, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsAppHealthDevicePerformanceDetails[]] + $UserExperienceAnalyticsAppHealthDevicePerformanceDetails, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IDeviceManagementEnrolmentIdentity] - $InputObject, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAdminConsent] + $AdminConsent, [Parameter()] [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + $LegacyPcManangementEnabled, [Parameter()] - [System.Int32] - $PageSize, + [System.Management.Automation.SwitchParameter] + $Break, [Parameter()] - [System.String] - $UnifiedRoleDefinitionId, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceHealthScript[]] + $DeviceHealthScripts, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedDevice1[]] + $ComanagedDevices, [Parameter()] - [System.Int32] - $Skip, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroupPolicyCategory[]] + $GroupPolicyCategories, [Parameter()] - [System.Int32] - $Top, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceAndAppManagementAssignmentFilter[]] + $AssignmentFilters, [Parameter()] - [System.String] - $CountVariable, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceConfigurationUserStateSummary] + $DeviceConfigurationUserStateSummaries, [Parameter()] - [System.Uri] - $Proxy, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedAllDeviceCertificateState[]] + $DeviceConfigurationsAllManagedDeviceCertificateStates, [Parameter()] - [System.String[]] - $Sort, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsAppHealthDevicePerformance[]] + $UserExperienceAnalyticsAppHealthDevicePerformance, [Parameter()] - [System.Management.Automation.SwitchParameter] - $All, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOrganizationalMessageDetail[]] + $OrganizationalMessageDetails, [Parameter()] - [System.String] - $Filter, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceCustomAttributeShellScript[]] + $DeviceCustomAttributeShellScripts, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsAppHealthDeviceModelPerformance[]] + $UserExperienceAnalyticsAppHealthDeviceModelPerformance, [Parameter()] - [System.String] - $Search, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphZebraFotaArtifact[]] + $ZebraFotaArtifacts, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphImportedDeviceIdentity[]] + $ImportedDeviceIdentities, [Parameter()] - [System.String[]] - $ExpandProperty, + [System.Int32] + $MaximumDepTokens, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend - ) -} -function New-MgDeviceManagementDeviceEnrollmentConfiguration -{ - [CmdletBinding()] - param( + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSoftwareUpdateStatusSummary] + $SoftwareUpdateStatusSummary, + [Parameter()] - [System.String] - $Description, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsQualityUpdateProfile[]] + $WindowsQualityUpdateProfiles, [Parameter()] - [System.DateTime] - $LastModifiedDateTime, + [System.Management.Automation.SwitchParameter] + $UnlicensedAdminstratorsEnabled, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEnrollmentConfigurationAssignment[]] - $Assignments, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphNdesConnector[]] + $NdesConnectors, [Parameter()] - [System.DateTime] - $CreatedDateTime, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMicrosoftTunnelServerLogCollectionResponse[]] + $MicrosoftTunnelServerLogCollectionResponses, [Parameter()] - [System.String] - $DisplayName, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsBatteryHealthOSPerformance[]] + $UserExperienceAnalyticsBatteryHealthOSPerformance, [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserPfxCertificate[]] + $UserPfxCertificates, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsAutopilotDeviceIdentity[]] + $WindowsAutopilotDeviceIdentities, [Parameter()] - [System.Int32] - $Priority, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsDeviceStartupProcessPerformance[]] + $UserExperienceAnalyticsDeviceStartupProcessPerformance, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphIntuneBrandingProfile[]] + $IntuneBrandingProfiles, [Parameter()] - [System.Int32] - $Version, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementDomainJoinConnector[]] + $DomainJoinConnectors, [Parameter()] - [System.Uri] - $Proxy, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementSettingCategory[]] + $Categories, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceEnrollmentConfiguration1] - $BodyParameter, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementExchangeOnPremisesPolicy[]] + $ExchangeOnPremisesPolicies, [Parameter()] - [System.String] - $Id, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceCompliancePolicyDeviceStateSummary] + $DeviceCompliancePolicyDeviceStateSummary, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [System.Uri] + $Proxy, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserExperienceAnalyticsDevicePerformance[]] + $UserExperienceAnalyticsDevicePerformance, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceComplianceScript[]] + $DeviceComplianceScripts, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend + [Microsoft.Graph.PowerShell.Support.DeviceManagementSubscriptions] + $Subscriptions, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedDeviceCleanupSettings] + $ManagedDeviceCleanupSettings, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDataSharingConsent[]] + $DataSharingConsents ) } -function New-MgRoleManagementDirectoryRoleDefinition +function Update-MgDeviceManagementDeviceCategory { [CmdletBinding()] param( @@ -14333,8 +14497,8 @@ function New-MgRoleManagementDirectoryRoleDefinition $DisplayName, [Parameter()] - [System.String[]] - $ResourceScopes, + [System.String] + $DeviceCategoryId, [Parameter()] [System.Collections.Hashtable] @@ -14344,45 +14508,37 @@ function New-MgRoleManagementDirectoryRoleDefinition [System.Management.Automation.SwitchParameter] $ProxyUseDefaultCredentials, - [Parameter()] - [System.String] - $TemplateId, - [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelinePrepend, [Parameter()] - [System.String] - $Version, + [System.String[]] + $RoleScopeTagIds, [Parameter()] - [System.Management.Automation.SwitchParameter] - $IsBuiltIn, + [Microsoft.Graph.PowerShell.Models.IDeviceManagementIdentity] + $InputObject, [Parameter()] [System.Uri] $Proxy, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleDefinition1] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceCategory] $BodyParameter, [Parameter()] [System.String] $Id, - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleDefinition1[]] - $InheritsPermissionsFrom, - [Parameter()] [System.Management.Automation.SwitchParameter] $Confirm, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRolePermission[]] - $RolePermissions, + [System.Management.Automation.SwitchParameter] + $PassThru, [Parameter()] [System.Management.Automation.PSCredential] @@ -14392,145 +14548,111 @@ function New-MgRoleManagementDirectoryRoleDefinition [System.Management.Automation.SwitchParameter] $Break, - [Parameter()] - [System.Management.Automation.SwitchParameter] - $IsEnabled, - [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend ) } -function Remove-MgDeviceManagementDeviceEnrollmentConfiguration +function Update-MgDeviceManagementDeviceCompliancePolicy { [CmdletBinding()] param( [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceComplianceUserStatus[]] + $UserStatuses, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.String] + $Description, [Parameter()] - [System.Uri] - $Proxy, + [System.DateTime] + $LastModifiedDateTime, [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceCompliancePolicyAssignment[]] + $Assignments, + + [Parameter()] + [System.DateTime] + $CreatedDateTime, [Parameter()] [System.String] - $IfMatch, + $DisplayName, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IDeviceManagementEnrolmentIdentity] - $InputObject, + [System.String] + $DeviceCompliancePolicyId, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceComplianceDeviceOverview] + $DeviceStatusOverview, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [Microsoft.Graph.PowerShell.Models.IDeviceManagementIdentity] + $InputObject, [Parameter()] - [System.String] - $DeviceEnrollmentConfigurationId, + [System.Collections.Hashtable] + $AdditionalProperties, [Parameter()] [System.Management.Automation.SwitchParameter] - $Break, + $ProxyUseDefaultCredentials, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend - ) -} -function Remove-MgRoleManagementDirectory -{ - [CmdletBinding()] - param( + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceComplianceUserOverview] + $UserStatusOverview, + [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelinePrepend, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.Int32] + $Version, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceComplianceDeviceStatus[]] + $DeviceStatuses, + + [Parameter()] + [System.String[]] + $RoleScopeTagIds, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceComplianceScheduledActionForRule[]] + $ScheduledActionsForRule, [Parameter()] [System.Uri] $Proxy, [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceCompliancePolicy] + $BodyParameter, [Parameter()] [System.String] - $IfMatch, + $Id, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSettingStateDeviceSummary[]] + $DeviceSettingStateSummaries, [Parameter()] [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + $Confirm, [Parameter()] [System.Management.Automation.SwitchParameter] - $Break, - - [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend - ) -} -function Remove-MgRoleManagementDirectoryRoleDefinition -{ - [CmdletBinding()] - param( - [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + $PassThru, [Parameter()] [System.Management.Automation.PSCredential] $ProxyCredential, - [Parameter()] - [System.Uri] - $Proxy, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, - - [Parameter()] - [System.String] - $IfMatch, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IDeviceManagementEnrolmentIdentity] - $InputObject, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.String] - $UnifiedRoleDefinitionId, - [Parameter()] [System.Management.Automation.SwitchParameter] $Break, @@ -14540,10 +14662,14 @@ function Remove-MgRoleManagementDirectoryRoleDefinition $HttpPipelineAppend ) } -function Update-MgDeviceManagementDeviceEnrollmentConfiguration +function Update-MgDeviceManagementDeviceConfiguration { [CmdletBinding()] param( + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceConfigurationUserStatus[]] + $UserStatuses, + [Parameter()] [System.String] $Description, @@ -14553,7 +14679,7 @@ function Update-MgDeviceManagementDeviceEnrollmentConfiguration $LastModifiedDateTime, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEnrollmentConfigurationAssignment[]] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceConfigurationAssignment[]] $Assignments, [Parameter()] @@ -14565,7 +14691,15 @@ function Update-MgDeviceManagementDeviceEnrollmentConfiguration $DisplayName, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IDeviceManagementEnrolmentIdentity] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceConfigurationDeviceStatus[]] + $DeviceStatuses, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceConfigurationDeviceOverview] + $DeviceStatusOverview, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IDeviceManagementIdentity] $InputObject, [Parameter()] @@ -14574,11 +14708,19 @@ function Update-MgDeviceManagementDeviceEnrollmentConfiguration [Parameter()] [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + $SupportsScopeTags, [Parameter()] - [System.Int32] - $Priority, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementApplicabilityRuleOSVersion] + $DeviceManagementApplicabilityRuleOSVersion, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceConfigurationUserOverview] + $UserStatusOverview, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceConfigurationGroupAssignment[]] + $GroupAssignments, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] @@ -14588,16 +14730,28 @@ function Update-MgDeviceManagementDeviceEnrollmentConfiguration [System.Int32] $Version, + [Parameter()] + [System.String[]] + $RoleScopeTagIds, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSettingStateDeviceSummary[]] + $DeviceSettingStateSummaries, + [Parameter()] [System.String] - $DeviceEnrollmentConfigurationId, + $DeviceConfigurationId, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementApplicabilityRuleOSEdition] + $DeviceManagementApplicabilityRuleOSEdition, [Parameter()] [System.Uri] $Proxy, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceEnrollmentConfiguration1] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceConfiguration] $BodyParameter, [Parameter()] @@ -14608,6 +14762,10 @@ function Update-MgDeviceManagementDeviceEnrollmentConfiguration [System.Management.Automation.SwitchParameter] $Confirm, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementApplicabilityRuleDeviceMode] + $DeviceManagementApplicabilityRuleDeviceMode, + [Parameter()] [System.Management.Automation.SwitchParameter] $PassThru, @@ -14620,606 +14778,670 @@ function Update-MgDeviceManagementDeviceEnrollmentConfiguration [System.Management.Automation.SwitchParameter] $Break, + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend ) } -function Update-MgRoleManagement +function Get-MgDeviceManagementAssignmentFilter { [CmdletBinding()] param( [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.String[]] + $Property, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IDeviceManagementIdentity] + $InputObject, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [System.Int32] + $PageSize, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelinePrepend, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphRoleManagement] - $BodyParameter, + [System.Int32] + $Skip, + + [Parameter()] + [System.Int32] + $Top, + + [Parameter()] + [System.String] + $CountVariable, [Parameter()] [System.Uri] $Proxy, [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, + [System.String[]] + $Sort, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [System.String] + $DeviceAndAppManagementAssignmentFilterId, [Parameter()] [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + $All, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphRbacApplication1] - $EntitlementManagement, + [System.String] + $Filter, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphRbacApplication1] - $Directory, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, + [System.String] + $Search, [Parameter()] [System.Management.Automation.SwitchParameter] $Break, + [Parameter()] + [System.String[]] + $ExpandProperty, + [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend ) } -function Update-MgRoleManagementDirectory +function Get-MgDeviceManagementConfigurationPolicy { [CmdletBinding()] param( [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleAssignmentScheduleRequest[]] - $RoleAssignmentScheduleRequests, + [System.String[]] + $Property, [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, + [Microsoft.Graph.PowerShell.Models.IDeviceManagementIdentity] + $InputObject, [Parameter()] [System.Management.Automation.SwitchParameter] $ProxyUseDefaultCredentials, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleEligibilitySchedule[]] - $RoleEligibilitySchedules, + [System.Int32] + $PageSize, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelinePrepend, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleDefinition1[]] - $RoleDefinitions, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleEligibilityScheduleRequest[]] - $RoleEligibilityScheduleRequests, + [System.Int32] + $Skip, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleAssignmentSchedule[]] - $RoleAssignmentSchedules, + [System.Int32] + $Top, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleAssignment[]] - $RoleAssignments, + [System.String] + $CountVariable, [Parameter()] [System.Uri] $Proxy, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphRbacApplication1] - $BodyParameter, - - [Parameter()] - [System.String] - $Id, + [System.String[]] + $Sort, [Parameter()] [System.Management.Automation.SwitchParameter] - $Confirm, + $All, [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, + [System.String] + $Filter, [Parameter()] [System.Management.Automation.PSCredential] $ProxyCredential, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleEligibilityScheduleInstance[]] - $RoleEligibilityScheduleInstances, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleAssignmentScheduleInstance[]] - $RoleAssignmentScheduleInstances, + [System.String] + $Search, [Parameter()] [System.Management.Automation.SwitchParameter] $Break, + [Parameter()] + [System.String[]] + $ExpandProperty, + + [Parameter()] + [System.String] + $DeviceManagementConfigurationPolicyId, + [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend ) } -function Update-MgRoleManagementDirectoryRoleDefinition +function Get-MgDeviceManagementConfigurationPolicyAssignment { [CmdletBinding()] param( [Parameter()] - [System.String] - $Description, + [System.String[]] + $Property, [Parameter()] - [System.String] - $DisplayName, + [Microsoft.Graph.PowerShell.Models.IDeviceManagementIdentity] + $InputObject, [Parameter()] [System.String[]] - $ResourceScopes, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IDeviceManagementEnrolmentIdentity] - $InputObject, + $ExpandProperty, [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, [Parameter()] - [System.String] - $UnifiedRoleDefinitionId, + [System.Int32] + $PageSize, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelinePrepend, [Parameter()] - [System.String] - $Version, + [System.Int32] + $Skip, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, + [System.Int32] + $Top, [Parameter()] - [System.Management.Automation.SwitchParameter] - $IsBuiltIn, + [System.String] + $CountVariable, [Parameter()] [System.Uri] $Proxy, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleDefinition1] - $BodyParameter, + [System.String[]] + $Sort, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $All, [Parameter()] [System.String] - $Id, + $Filter, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleDefinition1[]] - $InheritsPermissionsFrom, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRolePermission[]] - $RolePermissions, - - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + $Break, [Parameter()] [System.String] - $TemplateId, + $Search, [Parameter()] - [System.Management.Automation.SwitchParameter] - $IsEnabled, + [System.String] + $DeviceManagementConfigurationPolicyId, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [System.String] + $DeviceManagementConfigurationPolicyAssignmentId, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend ) } -#endregion -#region MicrosoftGraph -function Invoke-MgTargetDeviceAppMgtTargetedManagedAppConfigurationApp +function Get-MgDeviceManagementConfigurationPolicySetting { [CmdletBinding()] param( [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.String[]] + $Property, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IDeviceManagementIdentity] + $InputObject, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [System.String] + $DeviceManagementConfigurationSettingId, + + [Parameter()] + [System.Int32] + $PageSize, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelinePrepend, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IPathsXzr66BDeviceappmanagementTargetedmanagedappconfigurationsTargetedmanagedappconfigurationIdMicrosoftGraphTargetappsPostRequestbodyContentApplicationJsonSchema] - $BodyParameter, + [System.Int32] + $Skip, + + [Parameter()] + [System.Int32] + $Top, + + [Parameter()] + [System.String] + $CountVariable, [Parameter()] [System.Uri] $Proxy, [Parameter()] - [Microsoft.Graph.PowerShell.Support.TargetedManagedAppGroupType] - $AppGroupType, + [System.String[]] + $Sort, [Parameter()] [System.Management.Automation.SwitchParameter] - $PassThru, + $All, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedMobileApp[]] - $Apps, + [System.String] + $Filter, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IDevicesCorporateManagementIdentity] - $InputObject, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + $Break, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [System.String] + $Search, [Parameter()] [System.String] - $TargetedManagedAppConfigurationId, + $DeviceManagementConfigurationPolicyId, [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, + [System.String[]] + $ExpandProperty, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend ) } -function New-MgDeviceAppMgtAndroidManagedAppProtection +function Get-MgDeviceManagementConfigurationSetting { [CmdletBinding()] param( [Parameter()] - [System.Management.Automation.SwitchParameter] - $FingerprintBlocked, - - [Parameter()] - [System.String] - $CustomBrowserDisplayName, - - [Parameter()] - [System.String] - $MinimumRequiredPatchVersion, + [System.String[]] + $Property, [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, + [Microsoft.Graph.PowerShell.Models.IDeviceManagementIdentity] + $InputObject, [Parameter()] [System.Management.Automation.SwitchParameter] - $DisableAppEncryptionIfDeviceEncryptionIsEnabled, + $ProxyUseDefaultCredentials, [Parameter()] [System.Int32] - $MinimumPinLength, + $PageSize, [Parameter()] - [System.DateTime] - $CreatedDateTime, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedAppPolicyDeploymentSummary] - $DeploymentSummary, + [System.Int32] + $Skip, [Parameter()] - [Microsoft.Graph.PowerShell.Support.ManagedBrowserType] - $ManagedBrowser, + [System.Int32] + $Top, [Parameter()] [System.String] - $Description, + $CountVariable, [Parameter()] - [System.TimeSpan] - $PeriodOnlineBeforeAccessCheck, + [System.Uri] + $Proxy, [Parameter()] - [Microsoft.Graph.PowerShell.Support.ManagedAppClipboardSharingLevel] - $AllowedOutboundClipboardSharingLevel, + [System.String[]] + $Sort, [Parameter()] - [System.TimeSpan] - $PeriodBeforePinReset, + [System.Management.Automation.SwitchParameter] + $All, [Parameter()] [System.String] - $MinimumWarningPatchVersion, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $PinRequired, + $Filter, [Parameter()] - [System.Uri] - $Proxy, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] - [System.Int32] - $DeployedAppCount, + [System.String] + $Search, [Parameter()] [System.String] - $CustomBrowserPackageId, + $DeviceManagementConfigurationSettingDefinitionId, [Parameter()] [System.Management.Automation.SwitchParameter] - $EncryptAppData, + $Break, [Parameter()] - [System.String] - $Id, + [System.String[]] + $ExpandProperty, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + $HttpPipelineAppend + ) +} +function Get-MgDeviceManagementIntent +{ + [CmdletBinding()] + param( + [Parameter()] + [System.String[]] + $Property, [Parameter()] - [System.TimeSpan] - $PeriodOfflineBeforeAccessCheck, + [Microsoft.Graph.PowerShell.Models.IDeviceManagementIdentity] + $InputObject, [Parameter()] [System.String] - $MinimumRequiredOSVersion, + $DeviceManagementIntentId, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ManagedBrowserToOpenLinksRequired, + [System.Int32] + $PageSize, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ContactSyncBlocked, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] [System.Int32] - $MaximumPinRetries, + $Skip, [Parameter()] - [System.TimeSpan] - $PeriodOfflineBeforeWipeIsEnforced, + [System.Int32] + $Top, [Parameter()] - [Microsoft.Graph.PowerShell.Support.ManagedAppDataTransferLevel] - $AllowedOutboundDataTransferDestinations, + [System.String] + $CountVariable, [Parameter()] - [System.Management.Automation.SwitchParameter] - $DataBackupBlocked, + [System.Uri] + $Proxy, [Parameter()] - [System.Management.Automation.SwitchParameter] - $OrganizationalCredentialsRequired, + [System.String[]] + $Sort, [Parameter()] - [Microsoft.Graph.PowerShell.Support.ManagedAppDataStorageLocation[]] - $AllowedDataStorageLocations, + [System.Management.Automation.SwitchParameter] + $All, [Parameter()] [System.String] - $DisplayName, + $Filter, [Parameter()] - [System.Management.Automation.SwitchParameter] - $IsAssigned, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] [System.String] - $MinimumWarningAppVersion, + $Search, [Parameter()] - [System.String] - $Version, + [System.Management.Automation.SwitchParameter] + $Break, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedMobileApp[]] - $Apps, + [System.String[]] + $ExpandProperty, [Parameter()] [System.Management.Automation.SwitchParameter] - $SimplePinBlocked, + $ProxyUseDefaultCredentials, + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +function Get-MgDeviceManagementIntentSetting +{ + [CmdletBinding()] + param( [Parameter()] [System.String] - $MinimumRequiredAppVersion, + $DeviceManagementSettingInstanceId, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [System.String[]] + $Property, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTargetedManagedAppPolicyAssignment1[]] - $Assignments, + [Microsoft.Graph.PowerShell.Models.IDeviceManagementIdentity] + $InputObject, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [System.String] + $DeviceManagementIntentId, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ScreenCaptureBlocked, + [System.Int32] + $PageSize, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] - [System.String] - $MinimumWarningOSVersion, + [System.Int32] + $Skip, [Parameter()] - [System.Management.Automation.SwitchParameter] - $SaveAsBlocked, + [System.Int32] + $Top, [Parameter()] - [System.DateTime] - $LastModifiedDateTime, + [System.String] + $CountVariable, [Parameter()] - [Microsoft.Graph.PowerShell.Support.ManagedAppDataTransferLevel] - $AllowedInboundDataTransferSources, + [System.Uri] + $Proxy, [Parameter()] - [System.Management.Automation.SwitchParameter] - $DisableAppPinIfDevicePinIsSet, + [System.String[]] + $Sort, [Parameter()] [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + $All, [Parameter()] - [System.Management.Automation.SwitchParameter] - $DeviceComplianceRequired, + [System.String] + $Filter, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAndroidManagedAppProtection1] - $BodyParameter, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] - [System.Management.Automation.SwitchParameter] - $PrintBlocked, + [System.String] + $Search, [Parameter()] [System.Management.Automation.SwitchParameter] $Break, [Parameter()] - [Microsoft.Graph.PowerShell.Support.ManagedAppPinCharacterSet] - $PinCharacterSet + [System.String[]] + $ExpandProperty, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend ) } -function Set-MgDeviceAppMgtTargetedManagedAppConfiguration +function New-MgDeviceManagementAssignmentFilter { [CmdletBinding()] param( [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.String] + $Description, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [System.DateTime] + $LastModifiedDateTime, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IPathsZxn05FDeviceappmanagementTargetedmanagedappconfigurationsTargetedmanagedappconfigurationIdMicrosoftGraphAssignPostRequestbodyContentApplicationJsonSchema] - $BodyParameter, + [System.DateTime] + $CreatedDateTime, [Parameter()] - [System.Uri] - $Proxy, + [System.String] + $DisplayName, [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, + [System.Collections.Hashtable] + $AdditionalProperties, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTargetedManagedAppPolicyAssignment1[]] - $Assignments, + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IDevicesCorporateManagementIdentity] - $InputObject, + [System.String[]] + $RoleScopeTags, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [System.String] + $Rule, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + $HttpPipelinePrepend, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [Microsoft.Graph.PowerShell.Support.DevicePlatformType] + $Platform, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceAndAppManagementAssignmentFilter] + $BodyParameter, [Parameter()] [System.String] - $TargetedManagedAppConfigurationId, + $Id, [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] [System.Management.Automation.SwitchParameter] - $Break + $Break, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend ) } -function Update-MgDeviceAppMgt +function New-MgDeviceManagementConfigurationPolicy { [CmdletBinding()] param( [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTargetedManagedAppConfiguration1[]] - $TargetedManagedAppConfigurations, + [System.String] + $Description, [Parameter()] [System.DateTime] - $MicrosoftStoreForBusinessLastSuccessfulSyncDateTime, + $LastModifiedDateTime, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedEBook1[]] - $ManagedEBooks, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementConfigurationPolicyAssignment[]] + $Assignments, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedAppPolicy1[]] - $ManagedAppPolicies, + [System.DateTime] + $CreatedDateTime, [Parameter()] [System.Management.Automation.SwitchParameter] $Confirm, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedAppStatus[]] - $ManagedAppStatuses, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementConfigurationSetting[]] + $Settings, + + [Parameter()] + [System.String] + $Name, [Parameter()] [System.Collections.Hashtable] @@ -15229,114 +15451,86 @@ function Update-MgDeviceAppMgt [System.Management.Automation.SwitchParameter] $ProxyUseDefaultCredentials, - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedAppRegistration1[]] - $ManagedAppRegistrations, - [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelinePrepend, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDefaultManagedAppProtection1[]] - $DefaultManagedAppProtections, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementConfigurationPolicyTemplateReference] + $TemplateReference, [Parameter()] - [System.Management.Automation.SwitchParameter] - $IsEnabledForMicrosoftStoreForBusiness, + [System.Int32] + $SettingCount, [Parameter()] - [System.DateTime] - $MicrosoftStoreForBusinessLastCompletedApplicationSyncTime, + [System.String[]] + $RoleScopeTagIds, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphIosManagedAppProtection1[]] - $IosManagedAppProtections, + [Microsoft.Graph.PowerShell.Support.DeviceManagementConfigurationPlatforms] + $Platforms, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.DeviceManagementConfigurationTechnologies] + $Technologies, [Parameter()] [System.Uri] $Proxy, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceAppManagement1] - $BodyParameter, + [System.Management.Automation.SwitchParameter] + $IsAssigned, [Parameter()] [System.String] $Id, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMobileAppCategory[]] - $MobileAppCategories, + [System.String] + $CreationSource, [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementConfigurationPolicy] + $BodyParameter, [Parameter()] [System.Management.Automation.PSCredential] $ProxyCredential, - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphVppToken1[]] - $VppTokens, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsInformationProtectionPolicy1[]] - $WindowsInformationProtectionPolicies, - - [Parameter()] - [System.String] - $MicrosoftStoreForBusinessLanguage, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAndroidManagedAppProtection1[]] - $AndroidManagedAppProtections, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMobileApp1[]] - $MobileApps, - [Parameter()] [System.Management.Automation.SwitchParameter] $Break, - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMdmWindowsInformationProtectionPolicy1[]] - $MdmWindowsInformationProtectionPolicies, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedDeviceMobileAppConfiguration1[]] - $MobileAppConfigurations, - [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend ) } -function Update-MgDeviceAppMgtAndroidManagedAppProtection +function New-MgDeviceManagementIntent { [CmdletBinding()] param( [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [System.String] + $Description, [Parameter()] - [System.Management.Automation.SwitchParameter] - $FingerprintBlocked, + [System.DateTime] + $LastModifiedDateTime, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IDevicesCorporateManagementIdentity] - $InputObject, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementIntentAssignment[]] + $Assignments, [Parameter()] [System.String] - $CustomBrowserDisplayName, + $DisplayName, [Parameter()] - [System.String] - $MinimumRequiredPatchVersion, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementSettingInstance[]] + $Settings, [Parameter()] [System.Collections.Hashtable] @@ -15344,210 +15538,176 @@ function Update-MgDeviceAppMgtAndroidManagedAppProtection [Parameter()] [System.Management.Automation.SwitchParameter] - $DisableAppEncryptionIfDeviceEncryptionIsEnabled, + $ProxyUseDefaultCredentials, [Parameter()] [System.Management.Automation.SwitchParameter] - $DataBackupBlocked, - - [Parameter()] - [System.DateTime] - $CreatedDateTime, + $IsAssigned, [Parameter()] - [Microsoft.Graph.PowerShell.Support.ManagedBrowserType] - $ManagedBrowser, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] [System.String] - $Description, - - [Parameter()] - [System.TimeSpan] - $PeriodOnlineBeforeAccessCheck, + $TemplateId, [Parameter()] - [Microsoft.Graph.PowerShell.Support.ManagedAppClipboardSharingLevel] - $AllowedOutboundClipboardSharingLevel, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementIntentDeviceSettingStateSummary[]] + $DeviceSettingStateSummaries, [Parameter()] - [System.TimeSpan] - $PeriodBeforePinReset, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementIntentDeviceState[]] + $DeviceStates, [Parameter()] - [System.String] - $MinimumWarningPatchVersion, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementIntentSettingCategory[]] + $Categories, [Parameter()] - [System.Int32] - $MinimumPinLength, + [System.String[]] + $RoleScopeTagIds, [Parameter()] - [System.Management.Automation.SwitchParameter] - $PinRequired, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementIntentDeviceStateSummary] + $DeviceStateSummary, [Parameter()] [System.Uri] $Proxy, [Parameter()] - [System.Int32] - $DeployedAppCount, - - [Parameter()] - [System.String] - $CustomBrowserPackageId, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementIntent] + $BodyParameter, [Parameter()] [System.String] $Id, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + [System.Management.Automation.SwitchParameter] + $Confirm, [Parameter()] - [System.TimeSpan] - $PeriodOfflineBeforeAccessCheck, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementIntentUserState[]] + $UserStates, [Parameter()] - [System.String] - $MinimumRequiredOSVersion, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementIntentUserStateSummary] + $UserStateSummary, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ManagedBrowserToOpenLinksRequired, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] [System.Management.Automation.SwitchParameter] - $ContactSyncBlocked, + $Break, [Parameter()] - [System.String] - $AndroidManagedAppProtectionId, - + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +function Remove-MgDeviceManagementAssignmentFilter +{ + [CmdletBinding()] + param( [Parameter()] - [System.TimeSpan] - $PeriodOfflineBeforeWipeIsEnforced, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] - [Microsoft.Graph.PowerShell.Support.ManagedAppDataTransferLevel] - $AllowedOutboundDataTransferDestinations, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] - [System.Management.Automation.SwitchParameter] - $OrganizationalCredentialsRequired, + [System.Uri] + $Proxy, [Parameter()] - [Microsoft.Graph.PowerShell.Support.ManagedAppDataStorageLocation[]] - $AllowedDataStorageLocations, + [System.Management.Automation.SwitchParameter] + $PassThru, [Parameter()] [System.String] - $DisplayName, + $IfMatch, [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, + [Microsoft.Graph.PowerShell.Models.IDeviceManagementIdentity] + $InputObject, [Parameter()] [System.Management.Automation.SwitchParameter] - $IsAssigned, + $Confirm, [Parameter()] - [System.String] - $MinimumWarningAppVersion, + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, [Parameter()] [System.String] - $Version, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedMobileApp[]] - $Apps, + $DeviceAndAppManagementAssignmentFilterId, [Parameter()] [System.Management.Automation.SwitchParameter] - $SimplePinBlocked, + $Break, [Parameter()] - [System.String] - $MinimumRequiredAppVersion, - + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +function Remove-MgDeviceManagementConfigurationPolicy +{ + [CmdletBinding()] + param( [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelinePrepend, - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTargetedManagedAppPolicyAssignment1[]] - $Assignments, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedAppPolicyDeploymentSummary] - $DeploymentSummary, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ScreenCaptureBlocked, - [Parameter()] [System.Management.Automation.PSCredential] $ProxyCredential, [Parameter()] - [System.Management.Automation.SwitchParameter] - $EncryptAppData, - - [Parameter()] - [System.String] - $MinimumWarningOSVersion, + [System.Uri] + $Proxy, [Parameter()] [System.Management.Automation.SwitchParameter] - $SaveAsBlocked, + $PassThru, [Parameter()] - [System.DateTime] - $LastModifiedDateTime, + [System.String] + $DeviceManagementConfigurationPolicyId, [Parameter()] - [Microsoft.Graph.PowerShell.Support.ManagedAppDataTransferLevel] - $AllowedInboundDataTransferSources, + [System.String] + $IfMatch, [Parameter()] - [System.Int32] - $MaximumPinRetries, + [Microsoft.Graph.PowerShell.Models.IDeviceManagementIdentity] + $InputObject, [Parameter()] [System.Management.Automation.SwitchParameter] - $DisableAppPinIfDevicePinIsSet, + $Confirm, [Parameter()] [System.Management.Automation.SwitchParameter] $ProxyUseDefaultCredentials, - [Parameter()] - [System.Management.Automation.SwitchParameter] - $DeviceComplianceRequired, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAndroidManagedAppProtection1] - $BodyParameter, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $PrintBlocked, - [Parameter()] [System.Management.Automation.SwitchParameter] $Break, [Parameter()] - [Microsoft.Graph.PowerShell.Support.ManagedAppPinCharacterSet] - $PinCharacterSet + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend ) } -function Get-MgDeviceAppManagement +function Remove-MgDeviceManagementIntent { [CmdletBinding()] param( @@ -15555,167 +15715,219 @@ function Get-MgDeviceAppManagement [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelinePrepend, + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, + [Parameter()] [System.Uri] $Proxy, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.Management.Automation.SwitchParameter] + $PassThru, + + [Parameter()] + [System.String] + $IfMatch, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IDeviceManagementIdentity] + $InputObject, [Parameter()] [System.Management.Automation.SwitchParameter] $ProxyUseDefaultCredentials, [Parameter()] - [System.String[]] - $ExpandProperty, + [System.String] + $DeviceManagementIntentId, [Parameter()] - [System.String[]] - $Property, + [System.Management.Automation.SwitchParameter] + $Confirm, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + [System.Management.Automation.SwitchParameter] + $Break, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend ) } -function Get-MgDeviceAppManagementAndroidManagedAppProtection +function Update-MgDeviceManagementAssignmentFilter { [CmdletBinding()] param( [Parameter()] - [System.String[]] - $Property, + [System.String] + $Description, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IDevicesCorporateManagementIdentity] - $InputObject, + [System.DateTime] + $LastModifiedDateTime, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [System.DateTime] + $CreatedDateTime, [Parameter()] - [System.Int32] - $PageSize, + [System.String] + $DisplayName, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [Microsoft.Graph.PowerShell.Models.IDeviceManagementIdentity] + $InputObject, [Parameter()] - [System.Int32] - $Skip, + [System.Collections.Hashtable] + $AdditionalProperties, [Parameter()] - [System.Int32] - $Top, + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, [Parameter()] - [System.String] - $CountVariable, + [System.String[]] + $RoleScopeTags, [Parameter()] - [System.Uri] - $Proxy, + [System.String] + $Rule, [Parameter()] - [System.String[]] - $Sort, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] - [System.Management.Automation.SwitchParameter] - $All, + [Microsoft.Graph.PowerShell.Support.DevicePlatformType] + $Platform, [Parameter()] - [System.String] - $Filter, + [System.Uri] + $Proxy, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceAndAppManagementAssignmentFilter] + $BodyParameter, [Parameter()] [System.String] - $AndroidManagedAppProtectionId, + $Id, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, [Parameter()] [System.String] - $Search, + $DeviceAndAppManagementAssignmentFilterId, [Parameter()] [System.Management.Automation.SwitchParameter] - $Break, + $PassThru, [Parameter()] - [System.String[]] - $ExpandProperty, + [System.Management.Automation.PSCredential] + $ProxyCredential, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend ) } -function Get-MgDeviceAppManagementiOSManagedAppProtection +function Update-MgDeviceManagementConfigurationPolicy { [CmdletBinding()] param( [Parameter()] - [System.String[]] - $Property, + [System.String] + $Description, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IDevicesCorporateManagementIdentity] - $InputObject, + [System.DateTime] + $LastModifiedDateTime, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementConfigurationPolicyAssignment[]] + $Assignments, + + [Parameter()] + [System.DateTime] + $CreatedDateTime, [Parameter()] [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + $Confirm, [Parameter()] - [System.Int32] - $PageSize, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementConfigurationSetting[]] + $Settings, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IDeviceManagementIdentity] + $InputObject, + + [Parameter()] + [System.Collections.Hashtable] + $AdditionalProperties, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelinePrepend, [Parameter()] - [System.String] - $IosManagedAppProtectionId, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementConfigurationPolicyTemplateReference] + $TemplateReference, [Parameter()] [System.Int32] - $Skip, + $SettingCount, [Parameter()] - [System.Int32] - $Top, + [System.String[]] + $RoleScopeTagIds, [Parameter()] - [System.String] - $CountVariable, + [Microsoft.Graph.PowerShell.Support.DeviceManagementConfigurationTechnologies] + $Technologies, [Parameter()] [System.Uri] $Proxy, [Parameter()] - [System.String[]] - $Sort, + [System.Management.Automation.SwitchParameter] + $IsAssigned, [Parameter()] - [System.Management.Automation.SwitchParameter] - $All, + [Microsoft.Graph.PowerShell.Support.DeviceManagementConfigurationPlatforms] + $Platforms, [Parameter()] [System.String] - $Filter, + $Id, + + [Parameter()] + [System.String] + $CreationSource, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementConfigurationPolicy] + $BodyParameter, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $PassThru, [Parameter()] [System.Management.Automation.PSCredential] @@ -15723,76 +15935,72 @@ function Get-MgDeviceAppManagementiOSManagedAppProtection [Parameter()] [System.String] - $Search, + $Name, [Parameter()] [System.Management.Automation.SwitchParameter] $Break, [Parameter()] - [System.String[]] - $ExpandProperty, + [System.String] + $DeviceManagementConfigurationPolicyId, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend ) } -function Get-MgDeviceAppManagementTargetedManagedAppConfiguration +function Update-MgDeviceManagementConfigurationPolicyAssignment { [CmdletBinding()] param( [Parameter()] - [System.String[]] - $Property, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceAndAppManagementAssignmentTarget1] + $Target, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IDevicesCorporateManagementIdentity] - $InputObject, + [System.Collections.Hashtable] + $AdditionalProperties, [Parameter()] [System.Management.Automation.SwitchParameter] $ProxyUseDefaultCredentials, [Parameter()] - [System.Int32] - $PageSize, + [System.String] + $SourceId, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelinePrepend, [Parameter()] - [System.Int32] - $Skip, - - [Parameter()] - [System.Int32] - $Top, + [Microsoft.Graph.PowerShell.Models.IDeviceManagementIdentity] + $InputObject, [Parameter()] - [System.String] - $CountVariable, + [Microsoft.Graph.PowerShell.Support.DeviceAndAppManagementAssignmentSource] + $Source, [Parameter()] [System.Uri] $Proxy, [Parameter()] - [System.String[]] - $Sort, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementConfigurationPolicyAssignment] + $BodyParameter, [Parameter()] [System.String] - $TargetedManagedAppConfigurationId, + $Id, [Parameter()] [System.Management.Automation.SwitchParameter] - $All, + $Confirm, [Parameter()] - [System.String] - $Filter, + [System.Management.Automation.SwitchParameter] + $PassThru, [Parameter()] [System.Management.Automation.PSCredential] @@ -15800,29 +16008,25 @@ function Get-MgDeviceAppManagementTargetedManagedAppConfiguration [Parameter()] [System.String] - $Search, + $DeviceManagementConfigurationPolicyId, [Parameter()] [System.Management.Automation.SwitchParameter] $Break, [Parameter()] - [System.String[]] - $ExpandProperty, + [System.String] + $DeviceManagementConfigurationPolicyAssignmentId, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend ) } -function New-MgDeviceAppManagementTargetedManagedAppConfiguration +function Update-MgDeviceManagementIntent { [CmdletBinding()] param( - [Parameter()] - [System.Int32] - $DeployedAppCount, - [Parameter()] [System.String] $Description, @@ -15832,28 +16036,24 @@ function New-MgDeviceAppManagementTargetedManagedAppConfiguration $LastModifiedDateTime, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTargetedManagedAppPolicyAssignment1[]] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementIntentAssignment[]] $Assignments, - [Parameter()] - [System.DateTime] - $CreatedDateTime, - [Parameter()] [System.String] $DisplayName, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementSettingInstance[]] + $Settings, [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, + [Microsoft.Graph.PowerShell.Models.IDeviceManagementIdentity] + $InputObject, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [System.Collections.Hashtable] + $AdditionalProperties, [Parameter()] [System.Management.Automation.SwitchParameter] @@ -15865,22 +16065,38 @@ function New-MgDeviceAppManagementTargetedManagedAppConfiguration [Parameter()] [System.String] - $Version, + $TemplateId, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedAppPolicyDeploymentSummary] - $DeploymentSummary, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementIntentDeviceSettingStateSummary[]] + $DeviceSettingStateSummaries, [Parameter()] - [System.Uri] - $Proxy, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementIntentDeviceState[]] + $DeviceStates, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphKeyValuePair[]] - $CustomSettings, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementIntentSettingCategory[]] + $Categories, + + [Parameter()] + [System.String[]] + $RoleScopeTagIds, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementIntentDeviceStateSummary] + $DeviceStateSummary, + + [Parameter()] + [System.String] + $DeviceManagementIntentId, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTargetedManagedAppConfiguration1] + [System.Uri] + $Proxy, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementIntent] $BodyParameter, [Parameter()] @@ -15888,8 +16104,20 @@ function New-MgDeviceAppManagementTargetedManagedAppConfiguration $Id, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedMobileApp[]] - $Apps, + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $PassThru, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementIntentUserState[]] + $UserStates, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementIntentUserStateSummary] + $UserStateSummary, [Parameter()] [System.Management.Automation.PSCredential] @@ -15899,38 +16127,58 @@ function New-MgDeviceAppManagementTargetedManagedAppConfiguration [System.Management.Automation.SwitchParameter] $Break, + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend ) } -function Remove-MgDeviceAppManagementAndroidManagedAppProtection +function Update-MgDeviceManagementIntentSetting { [CmdletBinding()] param( + [Parameter()] + [System.String] + $DeviceManagementSettingInstanceId, + + [Parameter()] + [System.Collections.Hashtable] + $AdditionalProperties, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelinePrepend, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.String] + $ValueJson, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IDeviceManagementIdentity] + $InputObject, + + [Parameter()] + [System.String] + $DeviceManagementIntentId, [Parameter()] [System.Uri] $Proxy, [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementSettingInstance] + $BodyParameter, [Parameter()] [System.String] - $IfMatch, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IDevicesCorporateManagementIdentity] - $InputObject, + $Id, [Parameter()] [System.Management.Automation.SwitchParameter] @@ -15938,11 +16186,15 @@ function Remove-MgDeviceAppManagementAndroidManagedAppProtection [Parameter()] [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + $PassThru, [Parameter()] [System.String] - $AndroidManagedAppProtectionId, + $DefinitionId, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] [System.Management.Automation.SwitchParameter] @@ -15953,56 +16205,88 @@ function Remove-MgDeviceAppManagementAndroidManagedAppProtection $HttpPipelineAppend ) } -function Remove-MgDeviceAppManagementiOSManagedAppProtection +#endregion +#region MicrosoftGraph +#endregion +#region MicrosoftGraph +function Get-MgDeviceManagementDeviceEnrollmentConfiguration { [CmdletBinding()] param( + [Parameter()] + [System.String[]] + $Property, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IDeviceManagementEnrolmentIdentity] + $InputObject, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [System.Int32] + $PageSize, + [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelinePrepend, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.Int32] + $Skip, [Parameter()] - [System.Uri] - $Proxy, + [System.Int32] + $Top, [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, + [System.String] + $CountVariable, [Parameter()] [System.String] - $IfMatch, + $DeviceEnrollmentConfigurationId, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IDevicesCorporateManagementIdentity] - $InputObject, + [System.Uri] + $Proxy, [Parameter()] - [System.String] - $IosManagedAppProtectionId, + [System.String[]] + $Sort, [Parameter()] [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + $All, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [System.String] + $Filter, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, + + [Parameter()] + [System.String] + $Search, [Parameter()] [System.Management.Automation.SwitchParameter] $Break, + [Parameter()] + [System.String[]] + $ExpandProperty, + [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend ) } -function Remove-MgDeviceAppManagementTargetedManagedAppConfiguration +function Get-MgRoleManagement { [CmdletBinding()] param( @@ -16010,176 +16294,153 @@ function Remove-MgDeviceAppManagementTargetedManagedAppConfiguration [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelinePrepend, - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - [Parameter()] [System.Uri] $Proxy, [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] - [System.String] - $IfMatch, + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IDevicesCorporateManagementIdentity] - $InputObject, + [System.String[]] + $ExpandProperty, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [System.String[]] + $Property, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend, - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.String] - $TargetedManagedAppConfigurationId, - [Parameter()] [System.Management.Automation.SwitchParameter] $Break ) } -function Update-MgDeviceAppManagement +function Get-MgRoleManagementDirectory { [CmdletBinding()] param( [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTargetedManagedAppConfiguration1[]] - $TargetedManagedAppConfigurations, - - [Parameter()] - [System.DateTime] - $MicrosoftStoreForBusinessLastSuccessfulSyncDateTime, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedEBook1[]] - $ManagedEBooks, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedAppPolicy1[]] - $ManagedAppPolicies, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedAppStatus[]] - $ManagedAppStatuses, + [System.Uri] + $Proxy, [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] [System.Management.Automation.SwitchParameter] $ProxyUseDefaultCredentials, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedAppRegistration1[]] - $ManagedAppRegistrations, + [System.String[]] + $ExpandProperty, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [System.String[]] + $Property, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDefaultManagedAppProtection1[]] - $DefaultManagedAppProtections, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend, [Parameter()] [System.Management.Automation.SwitchParameter] - $IsEnabledForMicrosoftStoreForBusiness, - + $Break + ) +} +function Get-MgRoleManagementDirectoryRoleDefinition +{ + [CmdletBinding()] + param( [Parameter()] - [System.DateTime] - $MicrosoftStoreForBusinessLastCompletedApplicationSyncTime, + [System.String[]] + $Property, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphIosManagedAppProtection1[]] - $IosManagedAppProtections, + [Microsoft.Graph.PowerShell.Models.IDeviceManagementEnrolmentIdentity] + $InputObject, [Parameter()] - [System.Uri] - $Proxy, + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceAppManagement1] - $BodyParameter, + [System.Int32] + $PageSize, [Parameter()] [System.String] - $Id, + $UnifiedRoleDefinitionId, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMobileAppCategory[]] - $MobileAppCategories, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, + [System.Int32] + $Skip, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.Int32] + $Top, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphVppToken1[]] - $VppTokens, + [System.String] + $CountVariable, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsInformationProtectionPolicy1[]] - $WindowsInformationProtectionPolicies, + [System.Uri] + $Proxy, + + [Parameter()] + [System.String[]] + $Sort, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $All, [Parameter()] [System.String] - $MicrosoftStoreForBusinessLanguage, + $Filter, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAndroidManagedAppProtection1[]] - $AndroidManagedAppProtections, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMobileApp1[]] - $MobileApps, + [System.String] + $Search, [Parameter()] [System.Management.Automation.SwitchParameter] $Break, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMdmWindowsInformationProtectionPolicy1[]] - $MdmWindowsInformationProtectionPolicies, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedDeviceMobileAppConfiguration1[]] - $MobileAppConfigurations, + [System.String[]] + $ExpandProperty, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend ) } -function Update-MgDeviceAppManagementTargetedManagedAppConfiguration +function New-MgDeviceManagementDeviceEnrollmentConfiguration { [CmdletBinding()] param( - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedAppPolicyDeploymentSummary] - $DeploymentSummary, - [Parameter()] [System.String] $Description, @@ -16189,7 +16450,7 @@ function Update-MgDeviceAppManagementTargetedManagedAppConfiguration $LastModifiedDateTime, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTargetedManagedAppPolicyAssignment1[]] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEnrollmentConfigurationAssignment[]] $Assignments, [Parameter()] @@ -16200,319 +16461,314 @@ function Update-MgDeviceAppManagementTargetedManagedAppConfiguration [System.String] $DisplayName, - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IDevicesCorporateManagementIdentity] - $InputObject, - [Parameter()] [System.Collections.Hashtable] $AdditionalProperties, [Parameter()] [System.Management.Automation.SwitchParameter] - $IsAssigned, + $ProxyUseDefaultCredentials, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [System.Int32] + $Priority, [Parameter()] - [System.String] - $Version, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] [System.Int32] - $DeployedAppCount, + $Version, [Parameter()] - [System.String] - $TargetedManagedAppConfigurationId, + [System.String[]] + $RoleScopeTagIds, [Parameter()] [System.Uri] $Proxy, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphKeyValuePair[]] - $CustomSettings, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTargetedManagedAppConfiguration1] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceEnrollmentConfiguration1] $BodyParameter, [Parameter()] [System.String] $Id, - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedMobileApp[]] - $Apps, - [Parameter()] [System.Management.Automation.SwitchParameter] - $PassThru, + $Confirm, [Parameter()] [System.Management.Automation.PSCredential] $ProxyCredential, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, + [Microsoft.Graph.PowerShell.Support.DeviceEnrollmentConfigurationType] + $DeviceEnrollmentConfigurationType, [Parameter()] [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + $Break, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend ) } -#endregion -#region MicrosoftGraph -function Get-MgGroup +function New-MgRoleManagementDirectoryRoleDefinition { [CmdletBinding()] param( [Parameter()] - [System.String[]] - $Property, + [System.String] + $Description, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] - $InputObject, + [System.String] + $DisplayName, [Parameter()] - [System.Int32] - $PageSize, + [System.String[]] + $ResourceScopes, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [System.Collections.Hashtable] + $AdditionalProperties, [Parameter()] - [System.Int32] - $Skip, + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, [Parameter()] - [System.Int32] - $Top, + [System.String] + $TemplateId, [Parameter()] - [System.String] - $CountVariable, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] [System.String] - $GroupId, + $Version, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $IsBuiltIn, [Parameter()] [System.Uri] $Proxy, [Parameter()] - [System.String[]] - $Sort, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleDefinition1] + $BodyParameter, [Parameter()] [System.String] - $ConsistencyLevel, + $Id, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleDefinition1[]] + $InheritsPermissionsFrom, [Parameter()] [System.Management.Automation.SwitchParameter] - $All, + $Confirm, [Parameter()] - [System.String] - $Filter, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRolePermission[]] + $RolePermissions, [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, + $IsEnabled, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend ) } -function Get-MgGroupLifecyclePolicy +function Remove-MgDeviceManagementDeviceEnrollmentConfiguration { [CmdletBinding()] param( - [Parameter()] - [System.String[]] - $Property, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] - $InputObject, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.String] - $GroupLifecyclePolicyId, - - [Parameter()] - [System.Int32] - $PageSize, - [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelinePrepend, [Parameter()] - [System.Int32] - $Skip, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] - [System.Int32] - $Top, + [System.Uri] + $Proxy, [Parameter()] - [System.String] - $CountVariable, + [System.Management.Automation.SwitchParameter] + $PassThru, [Parameter()] - [System.Uri] - $Proxy, + [System.String] + $IfMatch, [Parameter()] - [System.String[]] - $Sort, + [Microsoft.Graph.PowerShell.Models.IDeviceManagementEnrolmentIdentity] + $InputObject, [Parameter()] [System.Management.Automation.SwitchParameter] - $All, - - [Parameter()] - [System.String] - $Filter, + $Confirm, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, [Parameter()] [System.String] - $Search, + $DeviceEnrollmentConfigurationId, [Parameter()] [System.Management.Automation.SwitchParameter] $Break, - [Parameter()] - [System.String[]] - $ExpandProperty, - [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend ) } -function Get-MgGroupMember +function Remove-MgRoleManagementDirectory { [CmdletBinding()] param( [Parameter()] - [System.String[]] - $Property, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] - [System.Int32] - $PageSize, + [System.Uri] + $Proxy, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [System.Management.Automation.SwitchParameter] + $PassThru, [Parameter()] - [System.Int32] - $Skip, + [System.String] + $IfMatch, [Parameter()] - [System.Int32] - $Top, + [System.Management.Automation.SwitchParameter] + $Confirm, [Parameter()] - [System.String] - $CountVariable, + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, [Parameter()] - [System.String] - $GroupId, + [System.Management.Automation.SwitchParameter] + $Break, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +function Remove-MgRoleManagementDirectoryRoleDefinition +{ + [CmdletBinding()] + param( + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] [System.Uri] $Proxy, [Parameter()] - [System.String[]] - $Sort, + [System.Management.Automation.SwitchParameter] + $PassThru, [Parameter()] - [System.Management.Automation.SwitchParameter] - $All, + [System.String] + $UnifiedRoleDefinitionId, [Parameter()] [System.String] - $Filter, + $IfMatch, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [Microsoft.Graph.PowerShell.Models.IDeviceManagementEnrolmentIdentity] + $InputObject, [Parameter()] - [System.String] - $Search, + [System.Management.Automation.SwitchParameter] + $Confirm, [Parameter()] [System.Management.Automation.SwitchParameter] - $Break, + $ProxyUseDefaultCredentials, [Parameter()] - [System.String[]] - $ExpandProperty, + [System.Management.Automation.SwitchParameter] + $Break, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend ) } -function Get-MgGroupOwner +function Update-MgDeviceManagementDeviceEnrollmentConfiguration { [CmdletBinding()] param( [Parameter()] - [System.String[]] - $Property, + [System.String] + $Description, + + [Parameter()] + [System.DateTime] + $LastModifiedDateTime, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEnrollmentConfigurationAssignment[]] + $Assignments, + + [Parameter()] + [System.DateTime] + $CreatedDateTime, + + [Parameter()] + [System.String] + $DisplayName, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IDeviceManagementEnrolmentIdentity] + $InputObject, + + [Parameter()] + [System.Collections.Hashtable] + $AdditionalProperties, [Parameter()] [System.Management.Automation.SwitchParameter] @@ -16520,7 +16776,7 @@ function Get-MgGroupOwner [Parameter()] [System.Int32] - $PageSize, + $Priority, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] @@ -16528,409 +16784,394 @@ function Get-MgGroupOwner [Parameter()] [System.Int32] - $Skip, - - [Parameter()] - [System.Int32] - $Top, + $Version, [Parameter()] - [System.String] - $CountVariable, + [System.String[]] + $RoleScopeTagIds, [Parameter()] [System.String] - $GroupId, + $DeviceEnrollmentConfigurationId, [Parameter()] [System.Uri] $Proxy, [Parameter()] - [System.String[]] - $Sort, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceEnrollmentConfiguration1] + $BodyParameter, + + [Parameter()] + [System.String] + $Id, [Parameter()] [System.Management.Automation.SwitchParameter] - $All, + $Confirm, [Parameter()] - [System.String] - $Filter, + [System.Management.Automation.SwitchParameter] + $PassThru, [Parameter()] [System.Management.Automation.PSCredential] $ProxyCredential, [Parameter()] - [System.String] - $Search, + [Microsoft.Graph.PowerShell.Support.DeviceEnrollmentConfigurationType] + $DeviceEnrollmentConfigurationType, [Parameter()] [System.Management.Automation.SwitchParameter] $Break, - [Parameter()] - [System.String[]] - $ExpandProperty, - [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend ) } -function New-MgGroup +function Update-MgRoleManagement { [CmdletBinding()] param( [Parameter()] - [System.String] - $Mail, - - [Parameter()] - [System.String] - $Visibility, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphResourceSpecificPermissionGrant[]] - $PermissionGrants, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSite1[]] - $Sites, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphRoleManagement] + $BodyParameter, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAppRoleAssignment[]] - $AppRoleAssignments, + [System.Uri] + $Proxy, [Parameter()] [System.Management.Automation.SwitchParameter] - $SecurityEnabled, + $PassThru, [Parameter()] - [System.DateTime] - $CreatedDateTime, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphRbacApplicationMultiple] + $DeviceManagement, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphCalendar] - $Calendar, + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, [Parameter()] - [System.String] - $SecurityIdentifier, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphRbacApplication1] + $EntitlementManagement, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAssignedLicense[]] - $AssignedLicenses, + [System.Management.Automation.SwitchParameter] + $Confirm, [Parameter()] - [System.DateTime] - $RenewedDateTime, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphRbacApplication1] + $Directory, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $RejectedSenders, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphRbacApplicationMultiple] + $CloudPc, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphExtension[]] - $Extensions, + [System.Management.Automation.SwitchParameter] + $Break, [Parameter()] - [System.Int32] - $UnseenCount, + [System.Collections.Hashtable] + $AdditionalProperties + ) +} +function Update-MgRoleManagementDirectory +{ + [CmdletBinding()] + param( + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleAssignmentScheduleRequest[]] + $RoleAssignmentScheduleRequests, [Parameter()] - [System.String] - $Classification, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleAssignment1[]] + $TransitiveRoleAssignments, [Parameter()] - [System.Management.Automation.SwitchParameter] - $AutoSubscribeNewMembers, + [System.Collections.Hashtable] + $AdditionalProperties, [Parameter()] - [System.String[]] - $ProxyAddresses, + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, [Parameter()] - [System.String] - $OnPremisesNetBiosName, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleEligibilitySchedule[]] + $RoleEligibilitySchedules, [Parameter()] - [System.DateTime] - $ExpirationDateTime, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRbacResourceNamespace[]] + $ResourceNamespaces, [Parameter()] - [System.Uri] - $Proxy, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOnPremisesProvisioningError[]] - $OnPremisesProvisioningErrors, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleDefinition1[]] + $RoleDefinitions, [Parameter()] - [System.String] - $OnPremisesSecurityIdentifier, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleEligibilityScheduleInstance[]] + $RoleEligibilityScheduleInstances, [Parameter()] - [System.Management.Automation.SwitchParameter] - $IsArchived, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleEligibilityScheduleRequest[]] + $RoleEligibilityScheduleRequests, [Parameter()] - [System.String] - $PreferredLanguage, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleAssignmentSchedule[]] + $RoleAssignmentSchedules, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $TransitiveMembers, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleAssignment[]] + $RoleAssignments, [Parameter()] - [System.Management.Automation.SwitchParameter] - $HideFromAddressLists, + [System.Uri] + $Proxy, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPlannerGroup] - $Planner, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphRbacApplication1] + $BodyParameter, [Parameter()] [System.String] $Id, [Parameter()] - [System.DateTime] - $OnPremisesLastSyncDateTime, + [System.Management.Automation.SwitchParameter] + $Confirm, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $Owners, + [System.Management.Automation.SwitchParameter] + $PassThru, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroupLifecyclePolicy[]] - $GroupLifecyclePolicies, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphLicenseProcessingState] - $LicenseProcessingState, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleAssignmentScheduleInstance[]] + $RoleAssignmentScheduleInstances, [Parameter()] - [System.String] - $OnPremisesDomainName, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphApproval[]] + $RoleAssignmentApprovals, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroupSetting[]] - $Settings, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAssignedLabel[]] - $AssignedLabels, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $AcceptedSenders, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOnenote] - $Onenote, + [System.Management.Automation.SwitchParameter] + $Break, [Parameter()] - [System.String] - $MembershipRuleProcessingState, - + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +function Update-MgRoleManagementDirectoryRoleDefinition +{ + [CmdletBinding()] + param( [Parameter()] [System.String] $Description, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $MemberOf, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $MailEnabled, + [System.String] + $DisplayName, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDrive1[]] - $Drives, + [System.String[]] + $ResourceScopes, [Parameter()] - [System.Management.Automation.SwitchParameter] - $AllowExternalSenders, + [Microsoft.Graph.PowerShell.Models.IDeviceManagementEnrolmentIdentity] + $InputObject, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [System.Collections.Hashtable] + $AdditionalProperties, [Parameter()] [System.String] - $DisplayName, + $UnifiedRoleDefinitionId, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphProfilePhoto] - $Photo, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] [System.String] - $Theme, + $Version, [Parameter()] - [System.DateTime] - $DeletedDateTime, + [System.Management.Automation.SwitchParameter] + $Break, [Parameter()] [System.Management.Automation.SwitchParameter] - $HasMembersWithLicenseErrors, + $IsBuiltIn, [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, + [System.Uri] + $Proxy, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $TransitiveMemberOf, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleDefinition1] + $BodyParameter, [Parameter()] - [System.Management.Automation.SwitchParameter] - $OnPremisesSyncEnabled, + [System.String] + $Id, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleDefinition1[]] + $InheritsPermissionsFrom, [Parameter()] [System.Management.Automation.SwitchParameter] $Confirm, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDrive1] - $Drive, + [System.Management.Automation.SwitchParameter] + $PassThru, [Parameter()] - [System.String] - $MailNickname, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRolePermission[]] + $RolePermissions, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEvent1[]] - $CalendarView, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphProfilePhoto[]] - $Photos, + [System.String] + $TemplateId, [Parameter()] [System.Management.Automation.SwitchParameter] - $IsAssignableToRole, + $IsEnabled, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject] - $CreatedOnBehalfOf, - + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +#endregion +#region MicrosoftGraph +function Invoke-MgTargetDeviceAppMgtTargetedManagedAppConfigurationApp +{ + [CmdletBinding()] + param( [Parameter()] - [System.Management.Automation.SwitchParameter] - $HideFromOutlookClients, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] - [System.Management.Automation.SwitchParameter] - $IsSubscribedByMail, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEvent1[]] - $Events, + [Microsoft.Graph.PowerShell.Models.IPathsXzr66BDeviceappmanagementTargetedmanagedappconfigurationsTargetedmanagedappconfigurationIdMicrosoftGraphTargetappsPostRequestbodyContentApplicationJsonSchema] + $BodyParameter, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphConversationThread[]] - $Threads, + [System.Uri] + $Proxy, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTeam1] - $Team, + [Microsoft.Graph.PowerShell.Support.TargetedManagedAppGroupType] + $AppGroupType, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $Members, + [System.Management.Automation.SwitchParameter] + $PassThru, [Parameter()] - [System.String[]] - $GroupTypes, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedMobileApp[]] + $Apps, [Parameter()] - [System.String] - $MembershipRule, + [Microsoft.Graph.PowerShell.Models.IDevicesCorporateManagementIdentity] + $InputObject, [Parameter()] - [System.String] - $PreferredDataLocation, + [System.Management.Automation.SwitchParameter] + $Confirm, [Parameter()] - [System.String] - $OnPremisesSamAccountName, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphConversation[]] - $Conversations, + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $MembersWithLicenseErrors, + [System.String] + $TargetedManagedAppConfigurationId, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroup] - $BodyParameter, + [System.Collections.Hashtable] + $AdditionalProperties, [Parameter()] [System.Management.Automation.SwitchParameter] $Break ) } -function New-MgGroupLifecyclePolicy +function New-MgDeviceAppMgtAndroidManagedAppProtection { [CmdletBinding()] param( [Parameter()] - [System.String] - $Id, - - [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroupLifecyclePolicy] - $BodyParameter, - - [Parameter()] - [System.Uri] - $Proxy, + [System.Management.Automation.SwitchParameter] + $Confirm, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [Microsoft.Graph.PowerShell.Support.ManagedAppRemediationAction] + $AppActionIfDevicePasscodeComplexityLessThanHigh, [Parameter()] [System.Management.Automation.SwitchParameter] - $Confirm, + $DisableAppPinIfDevicePinIsSet, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [Microsoft.Graph.PowerShell.Support.ManagedAppDeviceThreatLevel] + $MaximumAllowedDeviceThreatLevel, [Parameter()] [System.String] - $AlternateNotificationEmails, + $CustomBrowserDisplayName, [Parameter()] [System.String] - $ManagedGroupTypes, + $MinimumRequiredPatchVersion, [Parameter()] - [System.Int32] - $GroupLifetimeInDays, + [Microsoft.Graph.PowerShell.Support.ManagedAppRemediationAction] + $AppActionIfAndroidDeviceModelNotAllowed, [Parameter()] [System.Collections.Hashtable] @@ -16938,439 +17179,411 @@ function New-MgGroupLifecyclePolicy [Parameter()] [System.Management.Automation.SwitchParameter] - $Break, + $DisableAppEncryptionIfDeviceEncryptionIsEnabled, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend - ) -} -function New-MgGroupMember -{ - [CmdletBinding()] - param( - [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [System.Int32] + $MinimumPinLength, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject] - $BodyParameter, + [System.DateTime] + $CreatedDateTime, [Parameter()] - [System.Uri] - $Proxy, + [System.String] + $MinimumWarningAppVersion, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [Microsoft.Graph.PowerShell.Support.ManagedBrowserType] + $ManagedBrowser, [Parameter()] [System.String] - $GroupId, + $Description, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] - $InputObject, + [System.TimeSpan] + $PeriodOnlineBeforeAccessCheck, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [System.Int32] + $PreviousPinBlockCount, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + [System.String] + $MaximumWarningOSVersion, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [System.TimeSpan] + $PeriodBeforePinReset, [Parameter()] [System.String] - $DirectoryObjectId, + $MinimumWarningCompanyPortalVersion, [Parameter()] [System.Management.Automation.SwitchParameter] - $Break - ) -} -function New-MgGroupMemberByRef -{ - [CmdletBinding()] - param( + $RequireClass3Biometrics, + [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.String] + $MinimumWarningPatchVersion, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [Microsoft.Graph.PowerShell.Support.ManagedAppRemediationAction] + $AppActionIfDeviceComplianceRequired, [Parameter()] - [System.Collections.Hashtable] - $BodyParameter, + [System.Management.Automation.SwitchParameter] + $SaveAsBlocked, [Parameter()] - [System.Uri] - $Proxy, + [System.String] + $CustomDialerAppDisplayName, [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, + [Microsoft.Graph.PowerShell.Support.ManagedAppDataIngestionLocation[]] + $AllowedDataIngestionLocations, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] - $InputObject, + [System.Uri] + $Proxy, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [System.Int32] + $DeployedAppCount, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + [Microsoft.Graph.PowerShell.Support.ManagedAppNotificationRestriction] + $NotificationRestriction, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [System.String[]] + $RoleScopeTagIds, [Parameter()] [System.String] - $GroupId, - - [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, + $CustomBrowserPackageId, [Parameter()] [System.Management.Automation.SwitchParameter] - $Break - ) -} -function New-MgGroupOwner -{ - [CmdletBinding()] - param( - [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject] - $BodyParameter, - - [Parameter()] - [System.Uri] - $Proxy, + $BiometricAuthenticationBlocked, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [Microsoft.Graph.PowerShell.Support.ManagedAppRemediationAction] + $AppActionIfDevicePasscodeComplexityLessThanMedium, [Parameter()] [System.String] - $GroupId, + $Id, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] - $InputObject, + [System.Management.Automation.SwitchParameter] + $DeviceComplianceRequired, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [Microsoft.Graph.PowerShell.Support.TargetedManagedAppGroupType] + $AppGroupType, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + [System.TimeSpan] + $PeriodOfflineBeforeAccessCheck, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [Microsoft.Graph.PowerShell.Support.ManagedAppRemediationAction] + $AppActionIfUnableToAuthenticateUser, [Parameter()] [System.String] - $DirectoryObjectId, + $MinimumRequiredOSVersion, [Parameter()] [System.Management.Automation.SwitchParameter] - $Break - ) -} -function New-MgGroupOwnerByRef -{ - [CmdletBinding()] - param( - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + $RequirePinAfterBiometricChange, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [System.Management.Automation.SwitchParameter] + $DataBackupBlocked, [Parameter()] - [System.Collections.Hashtable] - $BodyParameter, + [System.String] + $MaximumRequiredOSVersion, [Parameter()] - [System.Uri] - $Proxy, + [System.String] + $MinimumWipePatchVersion, [Parameter()] [System.Management.Automation.SwitchParameter] - $PassThru, + $ContactSyncBlocked, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] - $InputObject, + [Microsoft.Graph.PowerShell.Support.ManagedAppClipboardSharingLevel] + $AllowedOutboundClipboardSharingLevel, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [System.Int32] + $MaximumPinRetries, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + [Microsoft.Graph.PowerShell.Support.AndroidManagedAppSafetyNetAppsVerificationType] + $RequiredAndroidSafetyNetAppsVerificationType, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [Microsoft.Graph.PowerShell.Support.ManagedAppRemediationAction] + $AppActionIfMaximumPinRetriesExceeded, [Parameter()] [System.String] - $GroupId, + $MinimumWipeCompanyPortalVersion, [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, + [Microsoft.Graph.PowerShell.Support.ManagedAppDataTransferLevel] + $AllowedOutboundDataTransferDestinations, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break - ) -} -function Remove-MgGroup -{ - [CmdletBinding()] - param( - [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [Microsoft.Graph.PowerShell.Support.ManagedAppRemediationAction] + $AppActionIfAndroidDeviceManufacturerNotAllowed, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.String] + $MinimumWipeAppVersion, [Parameter()] - [System.Uri] - $Proxy, + [System.String] + $AllowedAndroidDeviceManufacturers, [Parameter()] [System.Management.Automation.SwitchParameter] - $PassThru, + $OrganizationalCredentialsRequired, [Parameter()] [System.String] - $IfMatch, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] - $InputObject, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + $CustomDialerAppPackageId, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + [Microsoft.Graph.PowerShell.Support.ManagedAppDataStorageLocation[]] + $AllowedDataStorageLocations, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [System.Int32] + $BlockAfterCompanyPortalUpdateDeferralInDays, [Parameter()] [System.String] - $GroupId, + $DisplayName, [Parameter()] [System.Management.Automation.SwitchParameter] - $Break - ) -} -function Remove-MgGroupLifecyclePolicy -{ - [CmdletBinding()] - param( - [Parameter()] - [System.String] - $GroupLifecyclePolicyId, - - [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + $IsAssigned, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [Microsoft.Graph.PowerShell.Support.ManagedAppPhoneNumberRedirectLevel] + $DialerRestrictionLevel, [Parameter()] - [System.Uri] - $Proxy, + [System.Int32] + $AllowedOutboundClipboardSharingExceptionLength, [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, + [Microsoft.Graph.PowerShell.Support.ManagedAppRemediationAction] + $AppActionIfAndroidSafetyNetDeviceAttestationFailed, [Parameter()] [System.String] - $IfMatch, + $Version, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] - $InputObject, + [Microsoft.Graph.PowerShell.Support.ManagedAppRemediationAction] + $AppActionIfAndroidSafetyNetAppsVerificationFailed, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [System.String] + $MinimumWipeOSVersion, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphKeyValuePair[]] + $ApprovedKeyboards, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, + [System.TimeSpan] + $PeriodOfflineBeforeWipeIsEnforced, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend - ) -} -function Remove-MgGroupMemberByRef -{ - [CmdletBinding()] - param( + [System.TimeSpan] + $PinRequiredInsteadOfBiometricTimeout, + [Parameter()] [System.String] - $Id, + $MinimumRequiredAppVersion, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelinePrepend, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.Uri] - $Proxy, + [Microsoft.Graph.PowerShell.Support.ManagedAppRemediationAction] + $MobileThreatDefenseRemediationAction, [Parameter()] [System.Management.Automation.SwitchParameter] - $PassThru, - - [Parameter()] - [System.String] - $GroupId, + $KeyboardsRestricted, [Parameter()] - [System.String] - $IfMatch, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedAppPolicyDeploymentSummary] + $DeploymentSummary, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] - $InputObject, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedMobileApp[]] + $Apps, [Parameter()] [System.Management.Automation.SwitchParameter] - $Confirm, + $ScreenCaptureBlocked, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + [Microsoft.Graph.PowerShell.Support.ManagedAppPinCharacterSet] + $PinCharacterSet, [Parameter()] [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + $ManagedBrowserToOpenLinksRequired, [Parameter()] [System.String] - $DirectoryObjectId, + $MaximumWipeOSVersion, [Parameter()] [System.Management.Automation.SwitchParameter] - $Break - ) -} -function Remove-MgGroupOwnerByRef -{ - [CmdletBinding()] - param( + $PrintBlocked, + [Parameter()] - [System.String] - $Id, + [System.TimeSpan] + $GracePeriodToBlockAppsDuringOffClockHours, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [System.Management.Automation.SwitchParameter] + $SimplePinBlocked, [Parameter()] [System.Management.Automation.PSCredential] $ProxyCredential, [Parameter()] - [System.Uri] - $Proxy, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend, [Parameter()] [System.Management.Automation.SwitchParameter] - $PassThru, + $EncryptAppData, [Parameter()] [System.String] - $GroupId, + $MinimumWarningOSVersion, [Parameter()] - [System.String] - $IfMatch, + [System.Management.Automation.SwitchParameter] + $ConnectToVpnOnLaunch, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] - $InputObject, + [System.Int32] + $WipeAfterCompanyPortalUpdateDeferralInDays, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.AndroidManagedAppSafetyNetEvaluationType] + $RequiredAndroidSafetyNetEvaluationType, [Parameter()] [System.Management.Automation.SwitchParameter] - $Confirm, + $PinRequired, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + [System.Int32] + $WarnAfterCompanyPortalUpdateDeferralInDays, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.ManagedAppRemediationAction] + $AppActionIfDevicePasscodeComplexityLessThanLow, [Parameter()] [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + $FingerprintBlocked, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.ManagedAppRemediationAction] + $AppActionIfDeviceLockNotSet, [Parameter()] [System.String] - $DirectoryObjectId, + $MinimumRequiredCompanyPortalVersion, [Parameter()] [System.Management.Automation.SwitchParameter] - $Break - ) + $BlockDataIngestionIntoOrganizationDocuments, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTargetedManagedAppPolicyAssignment1[]] + $Assignments, + + [Parameter()] + [System.DateTime] + $LastModifiedDateTime, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.ManagedAppDataTransferLevel] + $AllowedInboundDataTransferSources, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.AndroidManagedAppSafetyNetDeviceAttestationType] + $RequiredAndroidSafetyNetDeviceAttestationType, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $FingerprintAndBiometricEnabled, + + [Parameter()] + [System.String[]] + $AllowedAndroidDeviceModels, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAndroidManagedAppProtection1] + $BodyParameter, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $DeviceLockRequired, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphKeyValuePair[]] + $ExemptedAppPackages, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.AppManagementLevel] + $TargetedAppManagementLevels + ) } -function Set-MgGroupLicense +function Set-MgDeviceAppMgtTargetedManagedAppConfiguration { [CmdletBinding()] param( + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, + [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelinePrepend, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IPaths6Fg5LiGroupsGroupIdMicrosoftGraphAssignlicensePostRequestbodyContentApplicationJsonSchema] + [Microsoft.Graph.PowerShell.Models.IPathsZxn05FDeviceappmanagementTargetedmanagedappconfigurationsTargetedmanagedappconfigurationIdMicrosoftGraphAssignPostRequestbodyContentApplicationJsonSchema] $BodyParameter, [Parameter()] @@ -17378,19 +17591,15 @@ function Set-MgGroupLicense $Proxy, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [System.String[]] - $RemoveLicenses, + [System.Management.Automation.SwitchParameter] + $PassThru, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAssignedLicense[]] - $AddLicenses, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTargetedManagedAppPolicyAssignment1[]] + $Assignments, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] + [Microsoft.Graph.PowerShell.Models.IDevicesCorporateManagementIdentity] $InputObject, [Parameter()] @@ -17407,7 +17616,7 @@ function Set-MgGroupLicense [Parameter()] [System.String] - $GroupId, + $TargetedManagedAppConfigurationId, [Parameter()] [System.Collections.Hashtable] @@ -17418,1109 +17627,4285 @@ function Set-MgGroupLicense $Break ) } -function Update-MgGroup +function Update-MgDeviceAppMgt { [CmdletBinding()] param( [Parameter()] - [System.String] - $Mail, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTargetedManagedAppConfiguration1[]] + $TargetedManagedAppConfigurations, [Parameter()] - [System.String] - $Visibility, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedEBook1[]] + $ManagedEBooks, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] - $InputObject, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMobileApp1[]] + $MobileApps, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphResourceSpecificPermissionGrant[]] - $PermissionGrants, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEnterpriseCodeSigningCertificate[]] + $EnterpriseCodeSigningCertificates, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSite1[]] - $Sites, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedAppPolicy1[]] + $ManagedAppPolicies, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAppRoleAssignment[]] - $AppRoleAssignments, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceAppManagementTask[]] + $DeviceAppManagementTasks, [Parameter()] [System.Management.Automation.SwitchParameter] - $SecurityEnabled, + $Confirm, [Parameter()] - [System.DateTime] - $CreatedDateTime, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedAppStatus[]] + $ManagedAppStatuses, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.Collections.Hashtable] + $AdditionalProperties, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphCalendar] - $Calendar, + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAssignedLicense[]] - $AssignedLicenses, + [System.String] + $MicrosoftStoreForBusinessLanguage, [Parameter()] - [System.DateTime] - $RenewedDateTime, + [System.String] + $Id, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $RejectedSenders, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedAppRegistration1[]] + $ManagedAppRegistrations, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphExtension[]] - $Extensions, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] - [System.Int32] - $UnseenCount, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsManagedAppProtection[]] + $WindowsManagedAppProtections, [Parameter()] - [System.String] - $Classification, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDefaultManagedAppProtection1[]] + $DefaultManagedAppProtections, [Parameter()] [System.Management.Automation.SwitchParameter] - $AutoSubscribeNewMembers, - - [Parameter()] - [System.String] - $MailNickname, + $IsEnabledForMicrosoftStoreForBusiness, [Parameter()] - [System.String[]] - $ProxyAddresses, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMobileAppCategory[]] + $MobileAppCategories, [Parameter()] - [System.String] - $OnPremisesNetBiosName, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedEBookCategory[]] + $ManagedEBookCategories, [Parameter()] [System.DateTime] - $ExpirationDateTime, + $MicrosoftStoreForBusinessLastCompletedApplicationSyncTime, [Parameter()] - [System.Uri] - $Proxy, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSymantecCodeSigningCertificate] + $SymantecCodeSigningCertificate, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOnPremisesProvisioningError[]] - $OnPremisesProvisioningErrors, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphIosManagedAppProtection1[]] + $IosManagedAppProtections, [Parameter()] - [System.String] - $OnPremisesSecurityIdentifier, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphIosLobAppProvisioningConfiguration[]] + $IosLobAppProvisioningConfigurations, [Parameter()] - [System.Management.Automation.SwitchParameter] - $IsArchived, + [System.Uri] + $Proxy, [Parameter()] - [System.String] - $PreferredLanguage, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceAppManagement1] + $BodyParameter, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $TransitiveMembers, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsInformationProtectionWipeAction[]] + $WindowsInformationProtectionWipeActions, [Parameter()] - [System.Management.Automation.SwitchParameter] - $HideFromAddressLists, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMdmWindowsInformationProtectionPolicy1[]] + $MdmWindowsInformationProtectionPolicies, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPlannerGroup] - $Planner, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsManagementApp] + $WindowsManagementApp, [Parameter()] - [System.String] - $Id, + [System.Management.Automation.SwitchParameter] + $PassThru, [Parameter()] - [System.DateTime] - $OnPremisesLastSyncDateTime, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSideLoadingKey[]] + $SideLoadingKeys, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $Owners, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPolicySet[]] + $PolicySets, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroupLifecyclePolicy[]] - $GroupLifecyclePolicies, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphLicenseProcessingState] - $LicenseProcessingState, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsInformationProtectionDeviceRegistration[]] + $WindowsInformationProtectionDeviceRegistrations, [Parameter()] - [System.String] - $Theme, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphVppToken1[]] + $VppTokens, [Parameter()] - [System.String] - $OnPremisesDomainName, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsInformationProtectionPolicy1[]] + $WindowsInformationProtectionPolicies, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroupSetting[]] - $Settings, + [Microsoft.Graph.PowerShell.Support.MicrosoftStoreForBusinessPortalSelectionOptions] + $MicrosoftStoreForBusinessPortalSelection, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAssignedLabel[]] - $AssignedLabels, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAndroidManagedAppProtection1[]] + $AndroidManagedAppProtections, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $AcceptedSenders, + [System.Management.Automation.SwitchParameter] + $Break, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOnenote] - $Onenote, + [System.DateTime] + $MicrosoftStoreForBusinessLastSuccessfulSyncDateTime, [Parameter()] - [System.String] - $MembershipRuleProcessingState, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedDeviceMobileAppConfiguration1[]] + $MobileAppConfigurations, [Parameter()] - [System.String] - $Description, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $MemberOf, - + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsDefenderApplicationControlSupplementalPolicy[]] + $WdacSupplementalPolicies + ) +} +function Update-MgDeviceAppMgtAndroidManagedAppProtection +{ + [CmdletBinding()] + param( [Parameter()] [System.Management.Automation.SwitchParameter] - $MailEnabled, + $Confirm, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDrive1[]] - $Drives, + [Microsoft.Graph.PowerShell.Support.ManagedAppRemediationAction] + $AppActionIfDevicePasscodeComplexityLessThanHigh, [Parameter()] [System.Management.Automation.SwitchParameter] - $AllowExternalSenders, + $DisableAppPinIfDevicePinIsSet, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [Microsoft.Graph.PowerShell.Support.ManagedAppDeviceThreatLevel] + $MaximumAllowedDeviceThreatLevel, [Parameter()] [System.String] - $DisplayName, + $CustomBrowserDisplayName, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphProfilePhoto] - $Photo, + [System.String] + $MinimumRequiredPatchVersion, [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, + [Microsoft.Graph.PowerShell.Support.ManagedAppRemediationAction] + $AppActionIfAndroidDeviceModelNotAllowed, [Parameter()] - [System.DateTime] - $DeletedDateTime, + [System.Collections.Hashtable] + $AdditionalProperties, [Parameter()] [System.Management.Automation.SwitchParameter] - $HasMembersWithLicenseErrors, + $DisableAppEncryptionIfDeviceEncryptionIsEnabled, [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, + [System.Int32] + $MinimumPinLength, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $TransitiveMemberOf, + [System.DateTime] + $CreatedDateTime, [Parameter()] - [System.String] - $GroupId, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedAppPolicyDeploymentSummary] + $DeploymentSummary, [Parameter()] - [System.Management.Automation.SwitchParameter] - $OnPremisesSyncEnabled, + [System.String] + $MinimumWarningAppVersion, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [Microsoft.Graph.PowerShell.Support.ManagedBrowserType] + $ManagedBrowser, + + [Parameter()] + [System.TimeSpan] + $PeriodOnlineBeforeAccessCheck, + + [Parameter()] + [System.Int32] + $PreviousPinBlockCount, + + [Parameter()] + [System.String] + $MaximumWarningOSVersion, + + [Parameter()] + [System.TimeSpan] + $PeriodBeforePinReset, + + [Parameter()] + [System.String] + $MinimumWarningCompanyPortalVersion, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $RequireClass3Biometrics, + + [Parameter()] + [System.String] + $MinimumWarningPatchVersion, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.ManagedAppRemediationAction] + $AppActionIfDeviceComplianceRequired, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $SaveAsBlocked, + + [Parameter()] + [System.String] + $CustomDialerAppDisplayName, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.ManagedAppDataIngestionLocation[]] + $AllowedDataIngestionLocations, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [System.Int32] + $DeployedAppCount, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.ManagedAppNotificationRestriction] + $NotificationRestriction, + + [Parameter()] + [System.String] + $CustomBrowserPackageId, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.ManagedAppRemediationAction] + $AppActionIfDevicePasscodeComplexityLessThanMedium, + + [Parameter()] + [System.String] + $Id, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.AndroidManagedAppSafetyNetAppsVerificationType] + $RequiredAndroidSafetyNetAppsVerificationType, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphKeyValuePair[]] + $ApprovedKeyboards, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $DeviceComplianceRequired, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.TargetedManagedAppGroupType] + $AppGroupType, + + [Parameter()] + [System.TimeSpan] + $PeriodOfflineBeforeAccessCheck, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.ManagedAppRemediationAction] + $AppActionIfUnableToAuthenticateUser, + + [Parameter()] + [System.String] + $MinimumRequiredOSVersion, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $RequirePinAfterBiometricChange, + + [Parameter()] + [System.String] + $MaximumRequiredOSVersion, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ContactSyncBlocked, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.ManagedAppClipboardSharingLevel] + $AllowedOutboundClipboardSharingLevel, + + [Parameter()] + [System.String] + $Description, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.ManagedAppRemediationAction] + $AppActionIfDevicePasscodeComplexityLessThanLow, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.ManagedAppRemediationAction] + $AppActionIfMaximumPinRetriesExceeded, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IDevicesCorporateManagementIdentity] + $InputObject, + + [Parameter()] + [System.String] + $MinimumWipeCompanyPortalVersion, + + [Parameter()] + [System.String] + $AndroidManagedAppProtectionId, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.ManagedAppDataTransferLevel] + $AllowedOutboundDataTransferDestinations, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.ManagedAppRemediationAction] + $AppActionIfAndroidDeviceManufacturerNotAllowed, + + [Parameter()] + [System.String] + $MinimumWipeAppVersion, + + [Parameter()] + [System.String] + $AllowedAndroidDeviceManufacturers, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $OrganizationalCredentialsRequired, + + [Parameter()] + [System.String] + $CustomDialerAppPackageId, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.ManagedAppDataStorageLocation[]] + $AllowedDataStorageLocations, + + [Parameter()] + [System.String] + $MinimumWipePatchVersion, + + [Parameter()] + [System.String] + $DisplayName, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $PassThru, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $IsAssigned, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.ManagedAppPhoneNumberRedirectLevel] + $DialerRestrictionLevel, + + [Parameter()] + [System.Int32] + $AllowedOutboundClipboardSharingExceptionLength, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.ManagedAppRemediationAction] + $AppActionIfAndroidSafetyNetDeviceAttestationFailed, + + [Parameter()] + [System.String] + $Version, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.ManagedAppRemediationAction] + $AppActionIfAndroidSafetyNetAppsVerificationFailed, + + [Parameter()] + [System.String] + $MinimumWipeOSVersion, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $DataBackupBlocked, + + [Parameter()] + [System.TimeSpan] + $PeriodOfflineBeforeWipeIsEnforced, + + [Parameter()] + [System.TimeSpan] + $PinRequiredInsteadOfBiometricTimeout, + + [Parameter()] + [System.String] + $MinimumRequiredAppVersion, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.ManagedAppRemediationAction] + $MobileThreatDefenseRemediationAction, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $BiometricAuthenticationBlocked, + + [Parameter()] + [System.String[]] + $RoleScopeTagIds, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedMobileApp[]] + $Apps, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ScreenCaptureBlocked, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.AndroidManagedAppSafetyNetDeviceAttestationType] + $RequiredAndroidSafetyNetDeviceAttestationType, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.ManagedAppPinCharacterSet] + $PinCharacterSet, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ManagedBrowserToOpenLinksRequired, + + [Parameter()] + [System.String] + $MaximumWipeOSVersion, + + [Parameter()] + [System.TimeSpan] + $GracePeriodToBlockAppsDuringOffClockHours, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $SimplePinBlocked, + + [Parameter()] + [System.String] + $MinimumWarningOSVersion, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $EncryptAppData, + + [Parameter()] + [System.Int32] + $MaximumPinRetries, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ConnectToVpnOnLaunch, + + [Parameter()] + [System.Int32] + $WipeAfterCompanyPortalUpdateDeferralInDays, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.AppManagementLevel] + $TargetedAppManagementLevels, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.AndroidManagedAppSafetyNetEvaluationType] + $RequiredAndroidSafetyNetEvaluationType, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $PinRequired, + + [Parameter()] + [System.Int32] + $WarnAfterCompanyPortalUpdateDeferralInDays, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.ManagedAppRemediationAction] + $AppActionIfDeviceLockNotSet, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $FingerprintBlocked, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, + + [Parameter()] + [System.String] + $MinimumRequiredCompanyPortalVersion, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $BlockDataIngestionIntoOrganizationDocuments, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTargetedManagedAppPolicyAssignment1[]] + $Assignments, + + [Parameter()] + [System.DateTime] + $LastModifiedDateTime, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.ManagedAppDataTransferLevel] + $AllowedInboundDataTransferSources, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $KeyboardsRestricted, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $FingerprintAndBiometricEnabled, + + [Parameter()] + [System.String[]] + $AllowedAndroidDeviceModels, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAndroidManagedAppProtection1] + $BodyParameter, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $PrintBlocked, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $DeviceLockRequired, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphKeyValuePair[]] + $ExemptedAppPackages, + + [Parameter()] + [System.Int32] + $BlockAfterCompanyPortalUpdateDeferralInDays + ) +} +function Get-MgDeviceAppManagement +{ + [CmdletBinding()] + param( + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $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()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break + ) +} +function Get-MgDeviceAppManagementAndroidManagedAppProtection +{ + [CmdletBinding()] + param( + [Parameter()] + [System.String[]] + $Property, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IDevicesCorporateManagementIdentity] + $InputObject, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [System.Int32] + $PageSize, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $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] + $AndroidManagedAppProtectionId, + + [Parameter()] + [System.String] + $Search, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break, + + [Parameter()] + [System.String[]] + $ExpandProperty, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +function Get-MgDeviceAppManagementiOSManagedAppProtection +{ + [CmdletBinding()] + param( + [Parameter()] + [System.String[]] + $Property, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IDevicesCorporateManagementIdentity] + $InputObject, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [System.Int32] + $PageSize, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [System.String] + $IosManagedAppProtectionId, + + [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()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +function Get-MgDeviceAppManagementTargetedManagedAppConfiguration +{ + [CmdletBinding()] + param( + [Parameter()] + [System.String[]] + $Property, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IDevicesCorporateManagementIdentity] + $InputObject, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [System.Int32] + $PageSize, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [System.Int32] + $Skip, + + [Parameter()] + [System.Int32] + $Top, + + [Parameter()] + [System.String] + $CountVariable, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [System.String[]] + $Sort, + + [Parameter()] + [System.String] + $TargetedManagedAppConfigurationId, + + [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()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +function New-MgDeviceAppManagementTargetedManagedAppConfiguration +{ + [CmdletBinding()] + param( + [Parameter()] + [System.Int32] + $DeployedAppCount, + + [Parameter()] + [System.String] + $Description, + + [Parameter()] + [System.DateTime] + $LastModifiedDateTime, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTargetedManagedAppPolicyAssignment[]] + $Assignments, + + [Parameter()] + [System.DateTime] + $CreatedDateTime, + + [Parameter()] + [System.String] + $DisplayName, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [System.Collections.Hashtable] + $AdditionalProperties, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $IsAssigned, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [System.String] + $Version, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedAppPolicyDeploymentSummary] + $DeploymentSummary, + + [Parameter()] + [System.String[]] + $RoleScopeTagIds, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.TargetedManagedAppGroupType] + $AppGroupType, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphKeyValuePair[]] + $CustomSettings, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTargetedManagedAppConfiguration] + $BodyParameter, + + [Parameter()] + [System.String] + $Id, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedMobileApp[]] + $Apps, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +function Remove-MgDeviceAppManagementAndroidManagedAppProtection +{ + [CmdletBinding()] + param( + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $PassThru, + + [Parameter()] + [System.String] + $IfMatch, + + [Parameter()] + [System.String] + $AndroidManagedAppProtectionId, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IDevicesCorporateManagementIdentity] + $InputObject, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +function Remove-MgDeviceAppManagementiOSManagedAppProtection +{ + [CmdletBinding()] + param( + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $PassThru, + + [Parameter()] + [System.String] + $IfMatch, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IDevicesCorporateManagementIdentity] + $InputObject, + + [Parameter()] + [System.String] + $IosManagedAppProtectionId, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +function Remove-MgDeviceAppManagementTargetedManagedAppConfiguration +{ + [CmdletBinding()] + param( + [Parameter()] + [System.String] + $TargetedManagedAppConfigurationId, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $PassThru, + + [Parameter()] + [System.String] + $IfMatch, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IDevicesCorporateManagementIdentity] + $InputObject, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break + ) +} +function Update-MgDeviceAppManagement +{ + [CmdletBinding()] + param( + [Parameter()] + [System.DateTime] + $MicrosoftStoreForBusinessLastSuccessfulSyncDateTime, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTargetedManagedAppConfiguration[]] + $TargetedManagedAppConfigurations, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPolicySet[]] + $PolicySets, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedEBook[]] + $ManagedEBooks, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMobileApp[]] + $MobileApps, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEnterpriseCodeSigningCertificate[]] + $EnterpriseCodeSigningCertificates, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedAppPolicy[]] + $ManagedAppPolicies, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceAppManagementTask[]] + $DeviceAppManagementTasks, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedAppStatus[]] + $ManagedAppStatuses, + + [Parameter()] + [System.Collections.Hashtable] + $AdditionalProperties, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsManagementApp] + $WindowsManagementApp, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedAppRegistration[]] + $ManagedAppRegistrations, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsManagedAppProtection[]] + $WindowsManagedAppProtections, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDefaultManagedAppProtection[]] + $DefaultManagedAppProtections, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $IsEnabledForMicrosoftStoreForBusiness, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsInformationProtectionWipeAction[]] + $WindowsInformationProtectionWipeActions, + + [Parameter()] + [System.String] + $MicrosoftStoreForBusinessLanguage, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedEBookCategory[]] + $ManagedEBookCategories, + + [Parameter()] + [System.DateTime] + $MicrosoftStoreForBusinessLastCompletedApplicationSyncTime, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSymantecCodeSigningCertificate] + $SymantecCodeSigningCertificate, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphIosManagedAppProtection[]] + $IosManagedAppProtections, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphIosLobAppProvisioningConfiguration[]] + $IosLobAppProvisioningConfigurations, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceAppManagement] + $BodyParameter, + + [Parameter()] + [System.String] + $Id, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMobileAppCategory[]] + $MobileAppCategories, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $PassThru, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSideLoadingKey[]] + $SideLoadingKeys, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsInformationProtectionDeviceRegistration[]] + $WindowsInformationProtectionDeviceRegistrations, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphVppToken[]] + $VppTokens, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsInformationProtectionPolicy[]] + $WindowsInformationProtectionPolicies, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.MicrosoftStoreForBusinessPortalSelectionOptions] + $MicrosoftStoreForBusinessPortalSelection, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAndroidManagedAppProtection[]] + $AndroidManagedAppProtections, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMdmWindowsInformationProtectionPolicy[]] + $MdmWindowsInformationProtectionPolicies, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedDeviceMobileAppConfiguration[]] + $MobileAppConfigurations, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsDefenderApplicationControlSupplementalPolicy[]] + $WdacSupplementalPolicies + ) +} +function Update-MgDeviceAppManagementTargetedManagedAppConfiguration +{ + [CmdletBinding()] + param( + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedAppPolicyDeploymentSummary] + $DeploymentSummary, + + [Parameter()] + [System.String] + $Description, + + [Parameter()] + [System.DateTime] + $LastModifiedDateTime, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTargetedManagedAppPolicyAssignment[]] + $Assignments, + + [Parameter()] + [System.DateTime] + $CreatedDateTime, + + [Parameter()] + [System.String] + $DisplayName, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IDevicesCorporateManagementIdentity] + $InputObject, + + [Parameter()] + [System.Collections.Hashtable] + $AdditionalProperties, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $PassThru, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $IsAssigned, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [System.String] + $Version, + + [Parameter()] + [System.Int32] + $DeployedAppCount, + + [Parameter()] + [System.String[]] + $RoleScopeTagIds, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.TargetedManagedAppGroupType] + $AppGroupType, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphKeyValuePair[]] + $CustomSettings, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTargetedManagedAppConfiguration] + $BodyParameter, + + [Parameter()] + [System.String] + $Id, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedMobileApp[]] + $Apps, + + [Parameter()] + [System.String] + $TargetedManagedAppConfigurationId, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +#endregion +#region MicrosoftGraph +function Get-MgGroup +{ + [CmdletBinding()] + param( + [Parameter()] + [System.String[]] + $Property, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] + $InputObject, + + [Parameter()] + [System.Int32] + $PageSize, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $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()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +function Get-MgGroupLifecyclePolicy +{ + [CmdletBinding()] + param( + [Parameter()] + [System.String[]] + $Property, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] + $InputObject, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [System.String] + $GroupLifecyclePolicyId, + + [Parameter()] + [System.Int32] + $PageSize, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $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()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +function Get-MgGroupMember +{ + [CmdletBinding()] + param( + [Parameter()] + [System.String[]] + $Property, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [System.Int32] + $PageSize, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $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.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()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +function Get-MgGroupOwner +{ + [CmdletBinding()] + param( + [Parameter()] + [System.String[]] + $Property, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [System.Int32] + $PageSize, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $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.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()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +function New-MgGroup +{ + [CmdletBinding()] + param( + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [System.String] + $Mail, + + [Parameter()] + [System.String] + $Visibility, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphResourceSpecificPermissionGrant[]] + $PermissionGrants, + + [Parameter()] + [System.String] + $CreatedByAppId, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSite1[]] + $Sites, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAppRoleAssignment[]] + $AppRoleAssignments, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $SecurityEnabled, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAssignedLabel[]] + $AssignedLabels, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphCalendar] + $Calendar, + + [Parameter()] + [System.String] + $SecurityIdentifier, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAssignedLicense[]] + $AssignedLicenses, + + [Parameter()] + [System.String] + $OnPremisesSamAccountName, + + [Parameter()] + [System.DateTime] + $RenewedDateTime, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $RejectedSenders, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphExtension[]] + $Extensions, + + [Parameter()] + [System.String] + $OrganizationId, + + [Parameter()] + [System.Int32] + $UnseenCount, + + [Parameter()] + [System.String] + $Classification, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $AutoSubscribeNewMembers, + + [Parameter()] + [System.String] + $MailNickname, + + [Parameter()] + [System.String[]] + $ProxyAddresses, + + [Parameter()] + [System.String] + $Description, + + [Parameter()] + [System.DateTime] + $ExpirationDateTime, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOnPremisesProvisioningError[]] + $OnPremisesProvisioningErrors, + + [Parameter()] + [System.String] + $OnPremisesSecurityIdentifier, + + [Parameter()] + [System.String[]] + $ResourceBehaviorOptions, + + [Parameter()] + [System.String] + $PreferredLanguage, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $TransitiveMembers, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $HideFromAddressLists, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPlannerGroup] + $Planner, + + [Parameter()] + [System.String] + $Id, + + [Parameter()] + [System.DateTime] + $OnPremisesLastSyncDateTime, + + [Parameter()] + [System.Int32] + $UnseenMessagesCount, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $Owners, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroupLifecyclePolicy[]] + $GroupLifecyclePolicies, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphLicenseProcessingState] + $LicenseProcessingState, + + [Parameter()] + [System.String] + $OnPremisesDomainName, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroupSetting[]] + $Settings, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $AcceptedSenders, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOnenote] + $Onenote, + + [Parameter()] + [System.String] + $MembershipRuleProcessingState, + + [Parameter()] + [System.String] + $AccessType, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $MemberOf, + + [Parameter()] + [System.String[]] + $ResourceProvisioningOptions, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $MailEnabled, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDrive1[]] + $Drives, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $AllowExternalSenders, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $MembersWithLicenseErrors, + + [Parameter()] + [System.String] + $DisplayName, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroupWritebackConfiguration] + $WritebackConfiguration, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphProfilePhoto] + $Photo, + + [Parameter()] + [System.String] + $Theme, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEvent1[]] + $Events, + + [Parameter()] + [System.DateTime] + $DeletedDateTime, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $HasMembersWithLicenseErrors, + + [Parameter()] + [System.Collections.Hashtable] + $AdditionalProperties, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $IsManagementRestricted, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $TransitiveMemberOf, + + [Parameter()] + [System.String[]] + $InfoCatalogs, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $OnPremisesSyncEnabled, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $IsArchived, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $IsFavorite, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDrive1] + $Drive, + + [Parameter()] + [System.String] + $OnPremisesNetBiosName, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEvent1[]] + $CalendarView, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphProfilePhoto[]] + $Photos, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $IsAssignableToRole, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $HideFromOutlookClients, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMembershipRuleProcessingStatus] + $MembershipRuleProcessingStatus, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $IsSubscribedByMail, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject] + $CreatedOnBehalfOf, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphConversationThread[]] + $Threads, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTeam1] + $Team, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $Members, + + [Parameter()] + [System.String[]] + $GroupTypes, + + [Parameter()] + [System.Int32] + $UnseenConversationsCount, + + [Parameter()] + [System.String] + $MembershipRule, + + [Parameter()] + [System.String] + $PreferredDataLocation, + + [Parameter()] + [System.DateTime] + $CreatedDateTime, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphConversation[]] + $Conversations, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEndpoint[]] + $Endpoints, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroup] + $BodyParameter, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break + ) +} +function New-MgGroupLifecyclePolicy +{ + [CmdletBinding()] + param( + [Parameter()] + [System.String] + $Id, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroupLifecyclePolicy] + $BodyParameter, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [System.String] + $AlternateNotificationEmails, + + [Parameter()] + [System.String] + $ManagedGroupTypes, + + [Parameter()] + [System.Int32] + $GroupLifetimeInDays, + + [Parameter()] + [System.Collections.Hashtable] + $AdditionalProperties, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +function New-MgGroupMember +{ + [CmdletBinding()] + param( + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject] + $BodyParameter, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, + + [Parameter()] + [System.String] + $GroupId, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] + $InputObject, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $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()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [System.Collections.Hashtable] + $BodyParameter, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $PassThru, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] + $InputObject, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [System.String] + $GroupId, + + [Parameter()] + [System.Collections.Hashtable] + $AdditionalProperties, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break + ) +} +function New-MgGroupOwner +{ + [CmdletBinding()] + param( + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject] + $BodyParameter, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, + + [Parameter()] + [System.String] + $GroupId, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] + $InputObject, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $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()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [System.Collections.Hashtable] + $BodyParameter, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $PassThru, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] + $InputObject, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [System.String] + $GroupId, + + [Parameter()] + [System.Collections.Hashtable] + $AdditionalProperties, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break + ) +} +function Remove-MgGroup +{ + [CmdletBinding()] + param( + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $PassThru, + + [Parameter()] + [System.String] + $IfMatch, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] + $InputObject, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $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()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $PassThru, + + [Parameter()] + [System.String] + $IfMatch, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] + $InputObject, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +function Remove-MgGroupMemberByRef +{ + [CmdletBinding()] + param( + [Parameter()] + [System.String] + $Id, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $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()] + [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] + $InputObject, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $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()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $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()] + [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] + $InputObject, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [System.String] + $DirectoryObjectId, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break + ) +} +function Set-MgGroupLicense +{ + [CmdletBinding()] + param( + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IPaths6Fg5LiGroupsGroupIdMicrosoftGraphAssignlicensePostRequestbodyContentApplicationJsonSchema] + $BodyParameter, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, + + [Parameter()] + [System.String[]] + $RemoveLicenses, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAssignedLicense[]] + $AddLicenses, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] + $InputObject, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $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()] + [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] + $InputObject, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphResourceSpecificPermissionGrant[]] + $PermissionGrants, + + [Parameter()] + [System.String] + $CreatedByAppId, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSite1[]] + $Sites, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAppRoleAssignment[]] + $AppRoleAssignments, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $SecurityEnabled, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAssignedLabel[]] + $AssignedLabels, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphCalendar] + $Calendar, + + [Parameter()] + [System.String] + $SecurityIdentifier, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAssignedLicense[]] + $AssignedLicenses, + + [Parameter()] + [System.String] + $OnPremisesSamAccountName, + + [Parameter()] + [System.DateTime] + $RenewedDateTime, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $RejectedSenders, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphExtension[]] + $Extensions, + + [Parameter()] + [System.String] + $OrganizationId, + + [Parameter()] + [System.Int32] + $UnseenCount, + + [Parameter()] + [System.String] + $Classification, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $AutoSubscribeNewMembers, + + [Parameter()] + [System.String] + $MailNickname, + + [Parameter()] + [System.String[]] + $ProxyAddresses, + + [Parameter()] + [System.String] + $Description, + + [Parameter()] + [System.DateTime] + $ExpirationDateTime, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOnPremisesProvisioningError[]] + $OnPremisesProvisioningErrors, + + [Parameter()] + [System.String] + $OnPremisesSecurityIdentifier, + + [Parameter()] + [System.String[]] + $ResourceBehaviorOptions, + + [Parameter()] + [System.String] + $PreferredLanguage, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $TransitiveMembers, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $HideFromAddressLists, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPlannerGroup] + $Planner, + + [Parameter()] + [System.String] + $Id, + + [Parameter()] + [System.DateTime] + $OnPremisesLastSyncDateTime, + + [Parameter()] + [System.Int32] + $UnseenMessagesCount, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $Owners, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroupLifecyclePolicy[]] + $GroupLifecyclePolicies, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphLicenseProcessingState] + $LicenseProcessingState, + + [Parameter()] + [System.String] + $PreferredDataLocation, + + [Parameter()] + [System.String] + $OnPremisesDomainName, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroupSetting[]] + $Settings, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $AcceptedSenders, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOnenote] + $Onenote, + + [Parameter()] + [System.String] + $MembershipRuleProcessingState, + + [Parameter()] + [System.String] + $AccessType, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $MemberOf, + + [Parameter()] + [System.String[]] + $ResourceProvisioningOptions, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $MailEnabled, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDrive1[]] + $Drives, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $AllowExternalSenders, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $MembersWithLicenseErrors, + + [Parameter()] + [System.String] + $DisplayName, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroupWritebackConfiguration] + $WritebackConfiguration, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphProfilePhoto] + $Photo, + + [Parameter()] + [System.String] + $Theme, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEvent1[]] + $Events, + + [Parameter()] + [System.DateTime] + $DeletedDateTime, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $HasMembersWithLicenseErrors, + + [Parameter()] + [System.Collections.Hashtable] + $AdditionalProperties, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $IsManagementRestricted, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $TransitiveMemberOf, + + [Parameter()] + [System.String[]] + $InfoCatalogs, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $OnPremisesSyncEnabled, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $PassThru, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $IsArchived, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDrive1] + $Drive, + + [Parameter()] + [System.String] + $OnPremisesNetBiosName, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEvent1[]] + $CalendarView, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphProfilePhoto[]] + $Photos, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $IsAssignableToRole, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $HideFromOutlookClients, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMembershipRuleProcessingStatus] + $MembershipRuleProcessingStatus, + + [Parameter()] + [System.String] + $GroupId, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $IsSubscribedByMail, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject] + $CreatedOnBehalfOf, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphConversationThread[]] + $Threads, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTeam1] + $Team, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $Members, + + [Parameter()] + [System.String[]] + $GroupTypes, + + [Parameter()] + [System.Int32] + $UnseenConversationsCount, + + [Parameter()] + [System.String] + $MembershipRule, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $IsFavorite, + + [Parameter()] + [System.DateTime] + $CreatedDateTime, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphConversation[]] + $Conversations, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEndpoint[]] + $Endpoints, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroup] + $BodyParameter, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break + ) +} +function Update-MgGroupLifecyclePolicy +{ + [CmdletBinding()] + param( + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] + $InputObject, + + [Parameter()] + [System.Collections.Hashtable] + $AdditionalProperties, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [System.Int32] + $GroupLifetimeInDays, + + [Parameter()] + [System.String] + $AlternateNotificationEmails, + + [Parameter()] + [System.String] + $GroupLifecyclePolicyId, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [System.String] + $ManagedGroupTypes, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroupLifecyclePolicy] + $BodyParameter, + + [Parameter()] + [System.String] + $Id, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $PassThru, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +#endregion +#region MicrosoftGraph +function Get-MgDevice +{ + [CmdletBinding()] + param( + [Parameter()] + [System.String[]] + $Property, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IIdentityDirectoryManagementIdentity] + $InputObject, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [System.String] + $DeviceId, + + [Parameter()] + [System.Int32] + $PageSize, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [System.Int32] + $Skip, + + [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()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +function Get-MgDirectory +{ + [CmdletBinding()] + param( + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $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()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break + ) +} +function Get-MgDirectoryRole +{ + [CmdletBinding()] + param( + [Parameter()] + [System.String[]] + $Property, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IIdentityDirectoryManagementIdentity] + $InputObject, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [System.Int32] + $PageSize, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [System.Int32] + $Skip, + + [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.String] + $DirectoryRoleId, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break, + + [Parameter()] + [System.String[]] + $ExpandProperty, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +function Get-MgDirectoryRoleTemplate +{ + [CmdletBinding()] + param( + [Parameter()] + [System.String[]] + $Property, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IIdentityDirectoryManagementIdentity] + $InputObject, [Parameter()] [System.Management.Automation.SwitchParameter] - $Confirm, + $ProxyUseDefaultCredentials, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDrive1] - $Drive, + [System.Int32] + $PageSize, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] [System.String] - $SecurityIdentifier, + $CountVariable, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEvent1[]] - $CalendarView, + [System.Int32] + $Skip, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphProfilePhoto[]] - $Photos, + [System.String] + $DirectoryRoleTemplateId, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [System.String[]] + $Sort, [Parameter()] [System.Management.Automation.SwitchParameter] - $IsAssignableToRole, + $All, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + [System.String] + $Filter, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject] - $CreatedOnBehalfOf, + [System.Management.Automation.PSCredential] + $ProxyCredential, + + [Parameter()] + [System.String] + $Search, [Parameter()] [System.Management.Automation.SwitchParameter] - $HideFromOutlookClients, + $Break, + + [Parameter()] + [System.String[]] + $ExpandProperty, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +function Get-MgOrganization +{ + [CmdletBinding()] + param( + [Parameter()] + [System.String[]] + $Property, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IIdentityDirectoryManagementIdentity] + $InputObject, + + [Parameter()] + [System.String[]] + $ExpandProperty, [Parameter()] [System.Management.Automation.SwitchParameter] - $IsSubscribedByMail, + $ProxyUseDefaultCredentials, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEvent1[]] - $Events, + [System.Int32] + $PageSize, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphConversationThread[]] - $Threads, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTeam1] - $Team, + [System.Int32] + $Skip, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $Members, + [System.Int32] + $Top, + + [Parameter()] + [System.String] + $CountVariable, + + [Parameter()] + [System.Uri] + $Proxy, [Parameter()] [System.String[]] - $GroupTypes, + $Sort, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $All, [Parameter()] [System.String] - $MembershipRule, + $Filter, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] [System.String] - $PreferredDataLocation, + $Search, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break, [Parameter()] [System.String] - $OnPremisesSamAccountName, + $OrganizationId, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphConversation[]] - $Conversations, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +function Get-MgSubscribedSku +{ + [CmdletBinding()] + param( + [Parameter()] + [System.String[]] + $Property, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $MembersWithLicenseErrors, + [Microsoft.Graph.PowerShell.Models.IIdentityDirectoryManagementIdentity] + $InputObject, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroup] - $BodyParameter, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, + + [Parameter()] + [System.Int32] + $PageSize, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend, [Parameter()] [System.Management.Automation.SwitchParameter] - $Break + $ProxyUseDefaultCredentials, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break, + + [Parameter()] + [System.String] + $SubscribedSkuId, + + [Parameter()] + [System.String] + $CountVariable, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $All, + + [Parameter()] + [System.String[]] + $Sort, + + [Parameter()] + [System.String] + $Search ) } -function Update-MgGroupLifecyclePolicy +function New-MgDevice { [CmdletBinding()] param( [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, + [System.Management.Automation.SwitchParameter] + $Confirm, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [System.DateTime] + $RegistrationDateTime, + + [Parameter()] + [System.String] + $Status, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUsageRight[]] + $UsageRights, + + [Parameter()] + [System.String] + $DeviceMetadata, + + [Parameter()] + [System.String] + $TrustType, [Parameter()] [System.Int32] - $GroupLifetimeInDays, + $DeviceVersion, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphExtension[]] + $Extensions, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAlternativeSecurityId[]] + $AlternativeSecurityIds, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphCommand[]] + $Commands, [Parameter()] [System.String] - $AlternateNotificationEmails, + $OperatingSystemVersion, [Parameter()] [System.String] - $GroupLifecyclePolicyId, + $Id, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [System.DateTime] + $OnPremisesLastSyncDateTime, + + [Parameter()] + [System.String] + $DisplayName, + + [Parameter()] + [System.String] + $DeviceId, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $IsCompliant, [Parameter()] [System.String] - $ManagedGroupTypes, + $EnrollmentType, [Parameter()] - [System.Uri] - $Proxy, + [System.String] + $ProfileType, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroupLifecyclePolicy] - $BodyParameter, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOnPremisesExtensionAttributes] + $ExtensionAttributes, [Parameter()] - [System.String] - $Id, + [System.Management.Automation.SwitchParameter] + $OnPremisesSyncEnabled, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $MemberOf, [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, + [System.String[]] + $Hostnames, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.String[]] + $PhysicalIds, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IGroupsIdentity] - $InputObject, + [System.DateTime] + $ComplianceExpirationDateTime, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, + [System.DateTime] + $DeletedDateTime, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend - ) -} -#endregion -#region MicrosoftGraph -function Get-MgDevice -{ - [CmdletBinding()] - param( + [System.String] + $DeviceCategory, + [Parameter()] - [System.String[]] - $Property, + [System.String] + $DomainName, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IIdentityDirectoryManagementIdentity] - $InputObject, + [System.Collections.Hashtable] + $AdditionalProperties, [Parameter()] [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + $IsManagementRestricted, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $TransitiveMemberOf, [Parameter()] [System.String] - $DeviceId, + $Model, [Parameter()] - [System.Int32] - $PageSize, + [System.String[]] + $SystemLabels, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelinePrepend, [Parameter()] - [System.Int32] - $Skip, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $RegisteredOwners, [Parameter()] - [System.Int32] - $Top, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $RegisteredUsers, [Parameter()] - [System.String] - $CountVariable, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] - [System.Uri] - $Proxy, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend, [Parameter()] - [System.String[]] - $Sort, + [System.String] + $OperatingSystem, [Parameter()] [System.String] - $ConsistencyLevel, + $Manufacturer, [Parameter()] - [System.Management.Automation.SwitchParameter] - $All, + [System.String] + $DeviceOwnership, [Parameter()] - [System.String] - $Filter, + [System.DateTime] + $ApproximateLastSignInDateTime, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.Management.Automation.SwitchParameter] + $IsManaged, [Parameter()] [System.String] - $Search, + $Name, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, + [System.String] + $Platform, [Parameter()] - [System.String[]] - $ExpandProperty, + [System.String] + $EnrollmentProfileName, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend - ) -} -function Get-MgDirectory -{ - [CmdletBinding()] - param( - [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [System.String] + $MdmAppId, [Parameter()] - [System.Uri] - $Proxy, + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDevice] + $BodyParameter, [Parameter()] [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + $IsRooted, [Parameter()] - [System.String[]] - $ExpandProperty, + [System.Management.Automation.SwitchParameter] + $AccountEnabled, [Parameter()] - [System.String[]] - $Property, + [System.String] + $ManagementType, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + [System.Management.Automation.SwitchParameter] + $Break, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break + [System.String] + $Kind ) } -function Get-MgDirectoryRole +function Remove-MgDevice { [CmdletBinding()] param( - [Parameter()] - [System.String[]] - $Property, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IIdentityDirectoryManagementIdentity] - $InputObject, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, - - [Parameter()] - [System.Int32] - $PageSize, - [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelinePrepend, [Parameter()] - [System.Int32] - $Skip, - - [Parameter()] - [System.String] - $CountVariable, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] [System.Uri] $Proxy, - [Parameter()] - [System.String[]] - $Sort, - [Parameter()] [System.Management.Automation.SwitchParameter] - $All, + $PassThru, [Parameter()] [System.String] - $Filter, + $IfMatch, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [Microsoft.Graph.PowerShell.Models.IIdentityDirectoryManagementIdentity] + $InputObject, [Parameter()] - [System.String] - $Search, + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, [Parameter()] [System.String] - $DirectoryRoleId, + $DeviceId, [Parameter()] [System.Management.Automation.SwitchParameter] $Break, - [Parameter()] - [System.String[]] - $ExpandProperty, - [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend ) } -function Get-MgDirectoryRoleTemplate +function Update-MgDevice { [CmdletBinding()] param( [Parameter()] - [System.String[]] - $Property, + [System.Management.Automation.SwitchParameter] + $Confirm, [Parameter()] [Microsoft.Graph.PowerShell.Models.IIdentityDirectoryManagementIdentity] $InputObject, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [System.DateTime] + $RegistrationDateTime, [Parameter()] - [System.Int32] - $PageSize, + [System.String] + $Status, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUsageRight[]] + $UsageRights, [Parameter()] [System.String] - $CountVariable, + $DeviceMetadata, + + [Parameter()] + [System.String] + $TrustType, [Parameter()] [System.Int32] - $Skip, + $DeviceVersion, [Parameter()] [System.String] - $DirectoryRoleTemplateId, + $OperatingSystem, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphExtension[]] + $Extensions, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAlternativeSecurityId[]] + $AlternativeSecurityIds, [Parameter()] [System.Uri] $Proxy, [Parameter()] - [System.String[]] - $Sort, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphCommand[]] + $Commands, [Parameter()] - [System.Management.Automation.SwitchParameter] - $All, + [System.String] + $OperatingSystemVersion, [Parameter()] [System.String] - $Filter, + $Id, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.DateTime] + $OnPremisesLastSyncDateTime, [Parameter()] [System.String] - $Search, + $DisplayName, + + [Parameter()] + [System.String] + $DeviceId, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $IsCompliant, + + [Parameter()] + [System.String] + $EnrollmentType, + + [Parameter()] + [System.String] + $ProfileType, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOnPremisesExtensionAttributes] + $ExtensionAttributes, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $OnPremisesSyncEnabled, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $MemberOf, [Parameter()] [System.String[]] - $ExpandProperty, + $Hostnames, - [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend - ) -} -function Get-MgOrganization -{ - [CmdletBinding()] - param( [Parameter()] [System.String[]] - $Property, + $PhysicalIds, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IIdentityDirectoryManagementIdentity] - $InputObject, + [System.Management.Automation.SwitchParameter] + $PassThru, [Parameter()] - [System.String[]] - $ExpandProperty, + [System.DateTime] + $ComplianceExpirationDateTime, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [System.DateTime] + $DeletedDateTime, [Parameter()] - [System.Int32] - $PageSize, + [System.String] + $DeviceCategory, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [System.String] + $DomainName, [Parameter()] - [System.Int32] - $Skip, + [System.Collections.Hashtable] + $AdditionalProperties, [Parameter()] - [System.Int32] - $Top, + [System.Management.Automation.SwitchParameter] + $IsManagementRestricted, [Parameter()] - [System.String] - $CountVariable, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $TransitiveMemberOf, [Parameter()] - [System.Uri] - $Proxy, + [System.String] + $Model, [Parameter()] [System.String[]] - $Sort, + $SystemLabels, [Parameter()] - [System.Management.Automation.SwitchParameter] - $All, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] - [System.String] - $Filter, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $RegisteredOwners, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $RegisteredUsers, [Parameter()] [System.Management.Automation.PSCredential] $ProxyCredential, [Parameter()] - [System.String] - $Search, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, + [System.String] + $DeviceId1, [Parameter()] [System.String] - $OrganizationId, + $Manufacturer, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend - ) -} -function Get-MgSubscribedSku -{ - [CmdletBinding()] - param( - [Parameter()] - [System.String[]] - $Property, + [System.String] + $DeviceOwnership, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IIdentityDirectoryManagementIdentity] - $InputObject, + [System.DateTime] + $ApproximateLastSignInDateTime, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [System.Management.Automation.SwitchParameter] + $IsManaged, [Parameter()] - [System.Uri] - $Proxy, + [System.String] + $Name, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.String] + $Platform, [Parameter()] - [System.Int32] - $PageSize, + [System.String] + $EnrollmentProfileName, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + [System.String] + $MdmAppId, [Parameter()] [System.Management.Automation.SwitchParameter] $ProxyUseDefaultCredentials, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDevice] + $BodyParameter, + [Parameter()] [System.Management.Automation.SwitchParameter] - $Break, + $IsRooted, [Parameter()] - [System.String] - $SubscribedSkuId, + [System.Management.Automation.SwitchParameter] + $AccountEnabled, [Parameter()] [System.String] - $CountVariable, + $ManagementType, [Parameter()] [System.Management.Automation.SwitchParameter] - $All, - - [Parameter()] - [System.String[]] - $Sort, + $Break, [Parameter()] [System.String] - $Search + $Kind ) } -function New-MgDevice +function Update-MgDirectory { [CmdletBinding()] param( [Parameter()] - [System.Int32] - $DeviceVersion, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphInboundSharedUserProfile[]] + $InboundSharedUserProfiles, [Parameter()] - [System.DateTime] - $ComplianceExpirationDateTime, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSharedEmailDomain[]] + $SharedEmailDomains, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAlternativeSecurityId[]] - $AlternativeSecurityIds, + [System.Collections.Hashtable] + $AdditionalProperties, [Parameter()] - [System.String] - $DisplayName, + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOutboundSharedUserProfile[]] + $OutboundSharedUserProfiles, [Parameter()] - [System.String] - $DeviceId, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphIdentityProviderBase[]] + $FederationConfigurations, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $RegisteredUsers, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] - [System.String] - $ProfileType, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAdministrativeUnit[]] + $AdministrativeUnits, [Parameter()] - [System.DateTime] - $ApproximateLastSignInDateTime, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphRecommendation[]] + $Recommendations, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $TransitiveMemberOf, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAttributeSet[]] + $AttributeSets, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [System.Uri] + $Proxy, [Parameter()] - [System.String] - $OperatingSystem, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectory1] + $BodyParameter, [Parameter()] - [System.String[]] - $PhysicalIds, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $DeletedItems, [Parameter()] - [System.String] - $TrustType, + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphRecommendationResource[]] + $ImpactedResources, [Parameter()] [System.Management.Automation.SwitchParameter] - $IsManaged, + $PassThru, [Parameter()] [System.String] - $OperatingSystemVersion, + $Id, [Parameter()] - [System.String[]] - $SystemLabels, + [System.Management.Automation.PSCredential] + $ProxyCredential, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphCustomSecurityAttributeDefinition[]] + $CustomSecurityAttributeDefinitions, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphFeatureRolloutPolicy[]] + $FeatureRolloutPolicies, [Parameter()] [System.Management.Automation.SwitchParameter] - $AccountEnabled, + $Break, [Parameter()] - [System.DateTime] - $OnPremisesLastSyncDateTime, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +function Update-MgOrganization +{ + [CmdletBinding()] + param( + [Parameter()] + [System.String] + $PostalCode, [Parameter()] - [System.Uri] - $Proxy, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphVerifiedDomain[]] + $VerifiedDomains, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDevice] - $BodyParameter, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphCertificateConnectorSetting] + $CertificateConnectorSetting, + + [Parameter()] + [System.DateTime] + $CreatedDateTime, [Parameter()] [System.String] - $Id, + $DisplayName, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $MemberOf, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOrganizationSettings] + $Settings, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphExtension[]] - $Extensions, + [System.String] + $Street, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.Collections.Hashtable] + $AdditionalProperties, [Parameter()] [System.String] - $DeviceMetadata, + $Id, [Parameter()] - [System.DateTime] - $DeletedDateTime, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] - [System.Management.Automation.SwitchParameter] - $IsCompliant, + [System.String] + $PreferredLanguage, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $RegisteredOwners, + [System.String] + $State, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, + [System.String] + $City, [Parameter()] - [System.Management.Automation.SwitchParameter] - $OnPremisesSyncEnabled, + [System.String[]] + $MarketingNotificationEmails, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [Microsoft.Graph.PowerShell.Models.IIdentityDirectoryManagementIdentity] + $InputObject, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAssignedPlan[]] + $AssignedPlans, + + [Parameter()] + [Microsoft.Graph.PowerShell.Support.MdmAuthority] + $MobileDeviceManagementAuthority, [Parameter()] [System.String] - $MdmAppId - ) -} -function Remove-MgDevice -{ - [CmdletBinding()] - param( + $TenantType, + [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [System.Management.Automation.SwitchParameter] + $IsMultipleDataLocationsForServicesEnabled, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.String] + $Country, [Parameter()] [System.Uri] $Proxy, [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, - - [Parameter()] - [System.String] - $IfMatch, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOrganization1] + $BodyParameter, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IIdentityDirectoryManagementIdentity] - $InputObject, + [System.String[]] + $SecurityComplianceNotificationMails, [Parameter()] [System.Management.Automation.SwitchParameter] $Confirm, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphCertificateBasedAuthConfiguration[]] + $CertificateBasedAuthConfiguration, [Parameter()] - [System.String] - $DeviceId, + [System.Management.Automation.SwitchParameter] + $PassThru, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPrivacyProfile] + $PrivacyProfile, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend - ) -} -function Update-MgDevice -{ - [CmdletBinding()] - param( + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphExtension[]] + $Extensions, + [Parameter()] - [System.Int32] - $DeviceVersion, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] - [System.DateTime] - $ComplianceExpirationDateTime, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphProvisionedPlan[]] + $ProvisionedPlans, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAlternativeSecurityId[]] - $AlternativeSecurityIds, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectorySizeQuota] + $DirectorySizeQuota, [Parameter()] - [System.String] - $DisplayName, + [System.String[]] + $TechnicalNotificationMails, [Parameter()] - [System.String] - $DeviceId1, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOrganizationalBranding] + $Branding, [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, + [System.DateTime] + $DeletedDateTime, [Parameter()] [System.String] - $DeviceId, + $CountryLetterCode, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $RegisteredUsers, + [System.String[]] + $BusinessPhones, [Parameter()] - [System.String] - $ProfileType, + [System.Management.Automation.SwitchParameter] + $Break, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $TransitiveMemberOf, + [System.Management.Automation.SwitchParameter] + $OnPremisesSyncEnabled, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [System.String] + $OrganizationId, [Parameter()] - [System.String] - $OperatingSystem, + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, [Parameter()] [System.String[]] - $PhysicalIds, + $SecurityComplianceNotificationPhones, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphExtension[]] - $Extensions, - + [System.DateTime] + $OnPremisesLastSyncDateTime + ) +} +function Get-MgDirectorySetting +{ + [CmdletBinding()] + param( [Parameter()] [System.String] - $TrustType, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $IsManaged, + $DirectorySettingId, [Parameter()] - [System.String] - $OperatingSystemVersion, + [System.String[]] + $Property, [Parameter()] [Microsoft.Graph.PowerShell.Models.IIdentityDirectoryManagementIdentity] $InputObject, [Parameter()] - [System.String[]] - $SystemLabels, + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, [Parameter()] - [System.Management.Automation.SwitchParameter] - $AccountEnabled, + [System.Int32] + $PageSize, [Parameter()] - [System.DateTime] - $OnPremisesLastSyncDateTime, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] - [System.Uri] - $Proxy, + [System.Int32] + $Skip, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDevice] - $BodyParameter, + [System.Int32] + $Top, [Parameter()] [System.String] - $Id, + $CountVariable, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $MemberOf, + [System.Uri] + $Proxy, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [System.String[]] + $Sort, [Parameter()] [System.Management.Automation.SwitchParameter] - $PassThru, + $All, [Parameter()] - [System.DateTime] - $ApproximateLastSignInDateTime, + [System.String] + $Filter, [Parameter()] [System.Management.Automation.PSCredential] @@ -18528,56 +21913,45 @@ function Update-MgDevice [Parameter()] [System.String] - $DeviceMetadata, - - [Parameter()] - [System.DateTime] - $DeletedDateTime, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $IsCompliant, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $RegisteredOwners, + $Search, [Parameter()] [System.Management.Automation.SwitchParameter] $Break, [Parameter()] - [System.Management.Automation.SwitchParameter] - $OnPremisesSyncEnabled, - - [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [System.String[]] + $ExpandProperty, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, - + $HttpPipelineAppend + ) +} +function New-MgDirectorySetting +{ + [CmdletBinding()] + param( [Parameter()] - [System.String] - $MdmAppId + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSettingValue[]] + $Values ) } -function Update-MgDirectory +function Remove-MgDirectorySetting { [CmdletBinding()] param( [Parameter()] [System.String] - $Id, + $DirectorySettingId, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelinePrepend, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectory1] - $BodyParameter, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] [System.Uri] @@ -18588,206 +21962,255 @@ function Update-MgDirectory $PassThru, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [System.String] + $IfMatch, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + [Microsoft.Graph.PowerShell.Models.IIdentityDirectoryManagementIdentity] + $InputObject, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAdministrativeUnit[]] - $AdministrativeUnits, + [System.Management.Automation.SwitchParameter] + $Confirm, [Parameter()] [System.Management.Automation.SwitchParameter] $ProxyUseDefaultCredentials, - [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphIdentityProviderBase[]] - $FederationConfigurations, - [Parameter()] [System.Management.Automation.SwitchParameter] $Break, [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, - + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +function Update-MgDirectorySetting +{ + [CmdletBinding()] + param( [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $DeletedItems + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSettingValue[]] + $Values ) } -function Update-MgOrganization +#endregion +#region MicrosoftGraph +function Get-MgAgreement { [CmdletBinding()] param( [Parameter()] - [System.String] - $PostalCode, + [System.String[]] + $Property, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IIdentityGovernanceIdentity] + $InputObject, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, + + [Parameter()] + [System.Int32] + $PageSize, + + [Parameter()] + [System.String] + $AgreementId, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphVerifiedDomain[]] - $VerifiedDomains, + [System.String] + $CountVariable, [Parameter()] - [System.DateTime] - $CreatedDateTime, + [System.Management.Automation.SwitchParameter] + $All, [Parameter()] [System.String] - $DisplayName, + $Search, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend, [Parameter()] - [System.String[]] - $TechnicalNotificationMails, - + [System.Management.Automation.SwitchParameter] + $Break + ) +} +#endregion +#region MicrosoftGraph +function Get-MgIdentityConditionalAccessNamedLocation +{ + [CmdletBinding()] + param( [Parameter()] - [System.String[]] - $BusinessPhones, + [System.String] + $NamedLocationId, [Parameter()] - [System.String] - $Street, + [System.String[]] + $Property, [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, + [Microsoft.Graph.PowerShell.Models.IIdentitySignInsIdentity] + $InputObject, [Parameter()] [System.Management.Automation.SwitchParameter] - $PassThru, + $ProxyUseDefaultCredentials, [Parameter()] - [System.String] - $Id, + [System.Int32] + $PageSize, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelinePrepend, [Parameter()] - [System.String] - $PreferredLanguage, + [System.Int32] + $Skip, [Parameter()] - [System.String] - $State, + [System.Int32] + $Top, [Parameter()] [System.String] - $City, + $CountVariable, + + [Parameter()] + [System.Uri] + $Proxy, [Parameter()] [System.String[]] - $MarketingNotificationEmails, + $Sort, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IIdentityDirectoryManagementIdentity] - $InputObject, + [System.Management.Automation.SwitchParameter] + $All, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAssignedPlan[]] - $AssignedPlans, + [System.String] + $Filter, [Parameter()] - [Microsoft.Graph.PowerShell.Support.MdmAuthority] - $MobileDeviceManagementAuthority, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] [System.String] - $Country, + $Search, [Parameter()] - [System.Uri] - $Proxy, + [System.Management.Automation.SwitchParameter] + $Break, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOrganization1] - $BodyParameter, + [System.String[]] + $ExpandProperty, + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +function Get-MgIdentityConditionalAccessPolicy +{ + [CmdletBinding()] + param( [Parameter()] [System.String[]] - $SecurityComplianceNotificationMails, + $Property, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [Microsoft.Graph.PowerShell.Models.IIdentitySignInsIdentity] + $InputObject, [Parameter()] - [System.String] - $TenantType, + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPrivacyProfile] - $PrivacyProfile, + [System.Int32] + $PageSize, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphExtension[]] - $Extensions, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.Int32] + $Skip, [Parameter()] - [System.DateTime] - $DeletedDateTime, + [System.String] + $ConditionalAccessPolicyId, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphProvisionedPlan[]] - $ProvisionedPlans, + [System.Int32] + $Top, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphCertificateBasedAuthConfiguration[]] - $CertificateBasedAuthConfiguration, + [System.String] + $CountVariable, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOrganizationalBranding] - $Branding, + [System.Uri] + $Proxy, [Parameter()] - [System.String] - $CountryLetterCode, + [System.String[]] + $Sort, [Parameter()] [System.Management.Automation.SwitchParameter] - $Break, + $All, [Parameter()] - [System.Management.Automation.SwitchParameter] - $OnPremisesSyncEnabled, + [System.String] + $Filter, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] [System.String] - $OrganizationId, + $Search, [Parameter()] [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + $Break, [Parameter()] [System.String[]] - $SecurityComplianceNotificationPhones, + $ExpandProperty, [Parameter()] - [System.DateTime] - $OnPremisesLastSyncDateTime + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend ) } -#endregion -#region MicrosoftGraph -function Get-MgAgreement +function Get-MgOauth2PermissionGrant { [CmdletBinding()] param( @@ -18796,36 +22219,44 @@ function Get-MgAgreement $Property, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IIdentityGovernanceIdentity] + [System.String] + $OAuth2PermissionGrantId, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IIdentitySignInsIdentity] $InputObject, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, [Parameter()] - [System.Uri] - $Proxy, + [System.Int32] + $PageSize, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] [System.Int32] - $PageSize, + $Skip, + + [Parameter()] + [System.Int32] + $Top, [Parameter()] [System.String] - $AgreementId, + $CountVariable, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [System.Uri] + $Proxy, [Parameter()] - [System.String] - $CountVariable, + [System.String[]] + $Sort, [Parameter()] [System.Management.Automation.SwitchParameter] @@ -18833,27 +22264,33 @@ function Get-MgAgreement [Parameter()] [System.String] - $Search, + $Filter, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + [System.Management.Automation.PSCredential] + $ProxyCredential, + + [Parameter()] + [System.String] + $Search, [Parameter()] [System.Management.Automation.SwitchParameter] - $Break + $Break, + + [Parameter()] + [System.String[]] + $ExpandProperty, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend ) } -#endregion -#region MicrosoftGraph -function Get-MgIdentityConditionalAccessNamedLocation +function Get-MgPolicyAuthorizationPolicy { [CmdletBinding()] param( - [Parameter()] - [System.String] - $NamedLocationId, - [Parameter()] [System.String[]] $Property, @@ -18862,6 +22299,10 @@ function Get-MgIdentityConditionalAccessNamedLocation [Microsoft.Graph.PowerShell.Models.IIdentitySignInsIdentity] $InputObject, + [Parameter()] + [System.String] + $AuthorizationPolicyId, + [Parameter()] [System.Management.Automation.SwitchParameter] $ProxyUseDefaultCredentials, @@ -18920,10 +22361,47 @@ function Get-MgIdentityConditionalAccessNamedLocation [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend + $HttpPipelineAppend + ) +} +function Get-MgPolicyIdentitySecurityDefaultEnforcementPolicy +{ + [CmdletBinding()] + param( + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $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()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break ) } -function Get-MgIdentityConditionalAccessPolicy +function Get-MgPolicyRoleManagementPolicy { [CmdletBinding()] param( @@ -18953,7 +22431,7 @@ function Get-MgIdentityConditionalAccessPolicy [Parameter()] [System.String] - $ConditionalAccessPolicyId, + $UnifiedRoleManagementPolicyId, [Parameter()] [System.Int32] @@ -19000,7 +22478,7 @@ function Get-MgIdentityConditionalAccessPolicy $HttpPipelineAppend ) } -function Get-MgOauth2PermissionGrant +function Get-MgPolicyRoleManagementPolicyAssignment { [CmdletBinding()] param( @@ -19008,10 +22486,6 @@ function Get-MgOauth2PermissionGrant [System.String[]] $Property, - [Parameter()] - [System.String] - $OAuth2PermissionGrantId, - [Parameter()] [Microsoft.Graph.PowerShell.Models.IIdentitySignInsIdentity] $InputObject, @@ -19056,6 +22530,10 @@ function Get-MgOauth2PermissionGrant [System.String] $Filter, + [Parameter()] + [System.String] + $UnifiedRoleManagementPolicyAssignmentId, + [Parameter()] [System.Management.Automation.PSCredential] $ProxyCredential, @@ -19077,78 +22555,85 @@ function Get-MgOauth2PermissionGrant $HttpPipelineAppend ) } -function Get-MgPolicyAuthorizationPolicy +function Get-MgPolicyRoleManagementPolicyRule { [CmdletBinding()] param( [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, - - [Parameter()] - [System.Uri] - $Proxy, + [System.String[]] + $Property, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [Microsoft.Graph.PowerShell.Models.IIdentitySignInsIdentity] + $InputObject, [Parameter()] [System.Management.Automation.SwitchParameter] $ProxyUseDefaultCredentials, [Parameter()] - [System.String[]] - $ExpandProperty, + [System.String] + $UnifiedRoleManagementPolicyRuleId, [Parameter()] - [System.String[]] - $Property, + [System.Int32] + $PageSize, [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + $HttpPipelinePrepend, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break - ) -} -function Get-MgPolicyIdentitySecurityDefaultEnforcementPolicy -{ - [CmdletBinding()] - param( + [System.Int32] + $Skip, + [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [System.String] + $UnifiedRoleManagementPolicyId, + + [Parameter()] + [System.Int32] + $Top, + + [Parameter()] + [System.String] + $CountVariable, [Parameter()] [System.Uri] $Proxy, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.String[]] + $Sort, [Parameter()] [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + $All, [Parameter()] - [System.String[]] - $ExpandProperty, + [System.String] + $Filter, [Parameter()] - [System.String[]] - $Property, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + [System.String] + $Search, [Parameter()] [System.Management.Automation.SwitchParameter] - $Break + $Break, + + [Parameter()] + [System.String[]] + $ExpandProperty, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend ) } function Get-MgPolicyTokenLifetimePolicy @@ -19622,6 +23107,10 @@ function Update-MgPolicyAuthorizationPolicy [System.Management.Automation.SwitchParameter] $BlockMsolPowerShell, + [Parameter()] + [System.String] + $AuthorizationPolicyId, + [Parameter()] [System.String] $DisplayName, @@ -19630,6 +23119,10 @@ function Update-MgPolicyAuthorizationPolicy [System.Management.Automation.SwitchParameter] $AllowedToUseSspr, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IIdentitySignInsIdentity] + $InputObject, + [Parameter()] [System.Collections.Hashtable] $AdditionalProperties, @@ -19650,6 +23143,10 @@ function Update-MgPolicyAuthorizationPolicy [System.Management.Automation.SwitchParameter] $AllowedToSignUpEmailBasedSubscriptions, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDefaultUserRoleOverride[]] + $DefaultUserRoleOverrides, + [Parameter()] [System.String] $AllowInvitesFrom, @@ -19676,40 +23173,202 @@ function Update-MgPolicyAuthorizationPolicy [Parameter()] [System.Management.Automation.SwitchParameter] - $AllowEmailVerifiedUsersToJoinOrganization, + $AllowEmailVerifiedUsersToJoinOrganization, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, + + [Parameter()] + [System.DateTime] + $DeletedDateTime, + + [Parameter()] + [System.String[]] + $PermissionGrantPolicyIdsAssignedToDefaultUserRole, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDefaultUserRolePermissions] + $DefaultUserRolePermissions, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend, + + [Parameter()] + [System.String[]] + $EnabledPreviewFeatures + ) +} +function Update-MgPolicyIdentitySecurityDefaultEnforcementPolicy +{ + [CmdletBinding()] + param( + [Parameter()] + [System.String] + $Description, + + [Parameter()] + [System.String] + $DisplayName, + + [Parameter()] + [System.Collections.Hashtable] + $AdditionalProperties, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphIdentitySecurityDefaultsEnforcementPolicy] + $BodyParameter, + + [Parameter()] + [System.String] + $Id, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $PassThru, + + [Parameter()] + [System.Management.Automation.PSCredential] + $ProxyCredential, + + [Parameter()] + [System.DateTime] + $DeletedDateTime, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Break, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $IsEnabled, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend + ) +} +function Update-MgPolicyRoleManagementPolicy +{ + [CmdletBinding()] + param( + [Parameter()] + [System.String] + $Description, + + [Parameter()] + [System.DateTime] + $LastModifiedDateTime, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleManagementPolicyRule[]] + $EffectiveRules, + + [Parameter()] + [System.String] + $UnifiedRoleManagementPolicyId, + + [Parameter()] + [System.String] + $DisplayName, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IIdentitySignInsIdentity] + $InputObject, + + [Parameter()] + [System.Collections.Hashtable] + $AdditionalProperties, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, + + [Parameter()] + [System.String] + $ScopeType, + + [Parameter()] + [System.String] + $ScopeId, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $IsOrganizationDefault, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphIdentity] + $LastModifiedBy, + + [Parameter()] + [System.Uri] + $Proxy, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleManagementPolicy] + $BodyParameter, + + [Parameter()] + [System.String] + $Id, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $PassThru, [Parameter()] [System.Management.Automation.PSCredential] $ProxyCredential, [Parameter()] - [System.DateTime] - $DeletedDateTime, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleManagementPolicyRule[]] + $Rules, [Parameter()] [System.Management.Automation.SwitchParameter] $Break, - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDefaultUserRolePermissions] - $DefaultUserRolePermissions, - [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend ) } -function Update-MgPolicyIdentitySecurityDefaultEnforcementPolicy +function Update-MgPolicyRoleManagementPolicyRule { [CmdletBinding()] param( [Parameter()] - [System.String] - $Description, - - [Parameter()] - [System.String] - $DisplayName, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleManagementPolicyRuleTarget] + $Target, [Parameter()] [System.Collections.Hashtable] @@ -19719,16 +23378,28 @@ function Update-MgPolicyIdentitySecurityDefaultEnforcementPolicy [System.Management.Automation.SwitchParameter] $ProxyUseDefaultCredentials, + [Parameter()] + [System.String] + $UnifiedRoleManagementPolicyRuleId, + [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelinePrepend, + [Parameter()] + [System.String] + $UnifiedRoleManagementPolicyId, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IIdentitySignInsIdentity] + $InputObject, + [Parameter()] [System.Uri] $Proxy, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphIdentitySecurityDefaultsEnforcementPolicy] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUnifiedRoleManagementPolicyRule] $BodyParameter, [Parameter()] @@ -19747,18 +23418,10 @@ function Update-MgPolicyIdentitySecurityDefaultEnforcementPolicy [System.Management.Automation.PSCredential] $ProxyCredential, - [Parameter()] - [System.DateTime] - $DeletedDateTime, - [Parameter()] [System.Management.Automation.SwitchParameter] $Break, - [Parameter()] - [System.Management.Automation.SwitchParameter] - $IsEnabled, - [Parameter()] [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] $HttpPipelineAppend @@ -20237,6 +23900,10 @@ function New-MgPlannerPlan [System.String] $Owner, + [Parameter()] + [System.Collections.Hashtable] + $Contexts, + [Parameter()] [System.Collections.Hashtable] $AdditionalProperties, @@ -20303,60 +23970,64 @@ function Update-MgPlanner [CmdletBinding()] param( [Parameter()] - [System.String] - $Id, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPlannerBucket[]] + $Buckets, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [System.Management.Automation.SwitchParameter] + $Confirm, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPlanner1] - $BodyParameter, + [System.Collections.Hashtable] + $AdditionalProperties, [Parameter()] - [System.Uri] - $Proxy, + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, [Parameter()] - [System.Management.Automation.SwitchParameter] - $PassThru, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPlannerBucket[]] - $Buckets, + [System.Uri] + $Proxy, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPlannerTask[]] + $Tasks, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPlannerRoster[]] + $Rosters, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPlannerPlan[]] + $Plans, [Parameter()] [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + $PassThru, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPlannerTask[]] - $Tasks, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPlanner1] + $BodyParameter, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPlannerPlan[]] - $Plans, + [System.String] + $Id, [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] [System.Management.Automation.SwitchParameter] - $Break + $Break, + + [Parameter()] + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend ) } function Update-MgPlannerPlan @@ -20380,8 +24051,8 @@ function Update-MgPlannerPlan $Owner, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IPlannerIdentity] - $InputObject, + [System.Collections.Hashtable] + $Contexts, [Parameter()] [System.Collections.Hashtable] @@ -20407,6 +24078,10 @@ function Update-MgPlannerPlan [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphIdentitySet] $CreatedBy, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IPlannerIdentity] + $InputObject, + [Parameter()] [System.Uri] $Proxy, @@ -20417,7 +24092,7 @@ function Update-MgPlannerPlan [Parameter()] [System.String] - $Title, + $Id, [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPlannerPlanDetails] @@ -20431,14 +24106,14 @@ function Update-MgPlannerPlan [System.Management.Automation.SwitchParameter] $PassThru, - [Parameter()] - [System.String] - $Id, - [Parameter()] [System.Management.Automation.PSCredential] $ProxyCredential, + [Parameter()] + [System.String] + $Title, + [Parameter()] [System.Management.Automation.SwitchParameter] $Break, @@ -21020,161 +24695,277 @@ function New-MgUser { [CmdletBinding()] param( + [Parameter()] + [System.Management.Automation.SwitchParameter] + $IsManagementRestricted, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTodo] + $Todo, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOfficeGraphInsights] + $Insights, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOnlineMeeting1[]] + $OnlineMeetings, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAssignedPlan[]] + $AssignedPlans, + [Parameter()] [System.String] - $Mail, + $ExternalUserState, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPresence1] - $Presence, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUser] + $BodyParameter, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ShowInAddressList, + [System.DateTime] + $EmployeeHireDate, [Parameter()] [System.String] - $Department, + $OnPremisesImmutableId, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $RegisteredDevices, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAppRoleAssignment1[]] + $AppRoleAssignments, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphInformationProtection] + $InformationProtection, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphApproval[]] + $Approvals, + + [Parameter()] + [System.DateTime] + $ExternalUserStateChangeDateTime, [Parameter()] [System.String[]] $ImAddresses, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceEnrollmentConfiguration[]] + $DeviceEnrollmentConfigurations, + [Parameter()] [System.String[]] $Responsibilities, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementTroubleshootingEvent1[]] - $DeviceManagementTroubleshootingEvents, + [System.DateTime] + $RefreshTokensValidFromDateTime, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphLicenseDetails[]] - $LicenseDetails, + [System.String] + $OnPremisesDomainName, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphProvisionedPlan[]] - $ProvisionedPlans, + [System.String] + $State, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphExtension[]] + $Extensions, [Parameter()] [System.DateTime] - $CreatedDateTime, + $SignInSessionsValidFromDateTime, [Parameter()] - [System.Management.Automation.PSCredential] - $ProxyCredential, + [System.DateTime] + $Birthday, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphCalendar1] - $Calendar, + [System.String] + $Mail, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTeam1[]] - $JoinedTeams, + [System.DateTime] + $HireDate, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMobileAppIntentAndState[]] + $MobileAppIntentAndStates, [Parameter()] [System.String[]] - $BusinessPhones, + $InfoCatalogs, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAssignedLicense[]] - $AssignedLicenses, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphChat1[]] + $Chats, + + [Parameter()] + [System.Collections.Hashtable] + $AdditionalProperties, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEmployeeOrgData] + $EmployeeOrgData, + + [Parameter()] + [System.DateTime] + $LastPasswordChangeDateTime, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject] + $Manager, [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphInferenceClassification] $InferenceClassification, [Parameter()] - [System.String[]] - $Interests, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphCalendarGroup1[]] + $CalendarGroups, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOnPremisesProvisioningError[]] - $OnPremisesProvisioningErrors, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMailFolder1[]] + $MailFolders, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphExtension[]] - $Extensions, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphScopedRoleMembership[]] + $ScopedRoleMemberOf, + + [Parameter()] + [System.String] + $ConsentProvidedForMinor, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSignInActivity] + $SignInActivity, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAgreementAcceptance[]] + $AgreementAcceptances, + + [Parameter()] + [System.String] + $EmployeeType, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $OwnedObjects, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAuthorizationInfo] + $AuthorizationInfo, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphProfilePhoto[]] + $Photos, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOAuth2PermissionGrant1[]] + $Oauth2PermissionGrants, + + [Parameter()] + [System.String] + $PreferredDataLocation, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMailboxSettings1] + $MailboxSettings, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelineAppend, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphNotification[]] + $Notifications, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOnPremisesExtensionAttributes] - $OnPremisesExtensionAttributes, + [System.String] + $Country, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedAppRegistration1[]] - $ManagedAppRegistrations, + [System.String] + $OnPremisesDistinguishedName, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserTeamwork1] - $Teamwork, + [System.String[]] + $Skills, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $DirectReports, + [System.String] + $MobilePhone, [Parameter()] [System.String] - $EmployeeType, + $FaxNumber, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTodo] - $Todo, + [System.DateTime] + $DeletedDateTime, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $CreatedObjects, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserSettings1] + $Settings, [Parameter()] - [System.String] - $UserType, + [System.Int32] + $DeviceEnrollmentLimit, [Parameter()] - [System.Uri] - $Proxy, + [System.String] + $AboutMe, [Parameter()] [System.String] $GivenName, [Parameter()] - [System.String] - $OnPremisesSecurityIdentifier, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphContactFolder1[]] + $ContactFolders, [Parameter()] - [System.String] - $PreferredLanguage, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] - [System.String] - $AboutMe, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPerson1[]] + $People, [Parameter()] - [System.String] - $CompanyName, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsInformationProtectionDeviceRegistration[]] + $WindowsInformationProtectionDeviceRegistrations, [Parameter()] [System.Management.Automation.SwitchParameter] $IsResourceAccount, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPlannerUser1] - $Planner, + [System.String[]] + $OtherMails, [Parameter()] [System.String] - $Id, + $PasswordPolicies, [Parameter()] [System.String] - $PreferredName, + $CreationType, [Parameter()] [System.String] - $OfficeLocation, + $OnPremisesUserPrincipalName, + + [Parameter()] + [System.String] + $PreferredLanguage, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAccessReviewInstance[]] + $PendingAccessReviewInstances, [Parameter()] [System.DateTime] @@ -21182,351 +24973,347 @@ function New-MgUser [Parameter()] [System.String] - $DisplayName, + $AgeGroup, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPerson1[]] - $People, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPlannerUser1] + $Planner, [Parameter()] - [System.String] - $CreationType, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphContact1[]] + $Contacts, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOutlookUser1] - $Outlook, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphCalendar1[]] + $Calendars, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDrive1] + $Drive, [Parameter()] [System.String] - $ConsentProvidedForMinor, + $UsageLocation, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPasswordProfile] - $PasswordProfile, + [System.Management.Automation.SwitchParameter] + $ProxyUseDefaultCredentials, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $ShowInAddressList, [Parameter()] [System.String] - $OnPremisesDomainName, + $JobTitle, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserSettings1] - $Settings, + [System.Management.Automation.SwitchParameter] + $AccountEnabled, + + [Parameter()] + [System.String[]] + $Schools, [Parameter()] [System.String] - $PasswordPolicies, + $Id, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOnenote1] - $Onenote, + [System.String] + $City, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $OwnedObjects, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserTeamwork1] + $Teamwork, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphChat1[]] - $Chats, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedAppRegistration1[]] + $ManagedAppRegistrations, [Parameter()] - [System.String] - $Country, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMessage1[]] + $Messages, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $MemberOf, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserPrint] + $Print, [Parameter()] - [System.String] - $ExternalUserState, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSecurity] + $Security, [Parameter()] - [System.DateTime] - $LastPasswordChangeDateTime, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphObjectIdentity[]] + $Identities, [Parameter()] - [System.String[]] - $PastProjects, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTeam1[]] + $JoinedTeams, [Parameter()] - [System.String] - $FaxNumber, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTasks] + $Tasks, [Parameter()] [System.String] $MySite, [Parameter()] - [System.DateTime] - $HireDate, + [System.String[]] + $BusinessPhones, [Parameter()] - [System.String] - $AgeGroup, + [System.Uri] + $Proxy, [Parameter()] - [System.String] - $State, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserAnalytics] + $Analytics, [Parameter()] - [System.String] - $PostalCode, + [System.String[]] + $ProxyAddresses, [Parameter()] - [System.DateTime] - $SignInSessionsValidFromDateTime, + [System.String] + $OfficeLocation, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphCalendar1[]] - $Calendars, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPresence1] + $Presence, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject] - $Manager, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPasswordProfile] + $PasswordProfile, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAppRoleAssignment1[]] - $AppRoleAssignments, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAppConsentRequest[]] + $AppConsentRequestsForApproval, [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $RegisteredDevices, + $TransitiveMemberOf, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAssignedPlan[]] - $AssignedPlans, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedDevice1[]] + $ManagedDevices, [Parameter()] - [System.Int32] - $DeviceEnrollmentLimit, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $CreatedObjects, [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphProfilePhoto] $Photo, [Parameter()] - [System.String[]] - $ProxyAddresses, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphLicenseDetails[]] + $LicenseDetails, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMailFolder1[]] - $MailFolders, + [System.String] + $StreetAddress, [Parameter()] - [System.DateTime] - $DeletedDateTime, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroup[]] + $JoinedGroups, [Parameter()] - [System.DateTime] - $EmployeeHireDate, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphCloudPc[]] + $CloudPCs, [Parameter()] - [System.String[]] - $Schools, + [System.Collections.Hashtable] + $CustomSecurityAttributes, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAuthentication1] - $Authentication, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEvent1[]] + $CalendarView, [Parameter()] - [System.Collections.Hashtable] - $AdditionalProperties, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOnenote1] + $Onenote, [Parameter()] [System.String] - $StreetAddress, + $SecurityIdentifier, + + [Parameter()] + [System.String] + $DisplayName, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphServicePrincipal[]] + $AppRoleAssignedResources, [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $TransitiveMemberOf, + $OwnedDevices, [Parameter()] - [System.String[]] - $OtherMails, + [System.Management.Automation.PSCredential] + $ProxyCredential, [Parameter()] - [System.String] - $UserPrincipalName, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSite1[]] + $FollowedSites, [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDrive1[]] $Drives, [Parameter()] - [System.DateTime] - $Birthday, - - [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMobileAppTroubleshootingEvent[]] + $MobileAppTroubleshootingEvents, [Parameter()] [System.String[]] - $Skills, + $Interests, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserActivity1[]] - $Activities, + [System.String] + $LegalAgeGroupClassification, [Parameter()] [System.Management.Automation.SwitchParameter] $Confirm, - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphLicenseAssignmentState[]] - $LicenseAssignmentStates, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMessage1[]] - $Messages, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDrive1] - $Drive, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $OwnedDevices, - - [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphContact1[]] - $Contacts, - [Parameter()] [System.String] - $MailNickname, + $OnPremisesSecurityIdentifier, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEvent1[]] - $CalendarView, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelineAppend, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphProfilePhoto[]] - $Photos, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphCalendar1] + $Calendar, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSite1[]] - $FollowedSites, + [System.Management.Automation.SwitchParameter] + $OnPremisesSyncEnabled, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMailboxSettings1] - $MailboxSettings, + [System.String] + $Department, [Parameter()] [System.String] - $LegalAgeGroupClassification, + $CompanyName, [Parameter()] - [System.String] - $OnPremisesImmutableId, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $MemberOf, [Parameter()] [System.String] - $City, + $EmployeeId, [Parameter()] [System.String] - $Surname, + $PostalCode, [Parameter()] - [System.DateTime] - $ExternalUserStateChangeDateTime, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAssignedLicense[]] + $AssignedLicenses, [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEvent1[]] $Events, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphCalendarGroup1[]] - $CalendarGroups, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceKey[]] + $DeviceKeys, [Parameter()] [System.String] - $JobTitle, + $UserPrincipalName, [Parameter()] - [System.String] - $OnPremisesUserPrincipalName, + [System.Management.Automation.SwitchParameter] + $Break, [Parameter()] - [System.Management.Automation.SwitchParameter] - $OnPremisesSyncEnabled, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUsageRight[]] + $UsageRights, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAgreementAcceptance[]] - $AgreementAcceptances, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphProvisionedPlan[]] + $ProvisionedPlans, [Parameter()] - [System.String] - $PreferredDataLocation, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOnPremisesProvisioningError[]] + $OnPremisesProvisioningErrors, [Parameter()] [System.String] - $MobilePhone, + $MailNickname, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphObjectIdentity[]] - $Identities, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOnPremisesExtensionAttributes] + $OnPremisesExtensionAttributes, [Parameter()] - [System.Management.Automation.SwitchParameter] - $AccountEnabled, + [System.String[]] + $PastProjects, [Parameter()] - [System.String] - $UsageLocation, + [System.DateTime] + $CreatedDateTime, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphManagedDevice1[]] - $ManagedDevices, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $DirectReports, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphContactFolder1[]] - $ContactFolders, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAuthentication1] + $Authentication, [Parameter()] - [System.String] - $OnPremisesDistinguishedName, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $TransitiveReports, [Parameter()] - [System.String] - $OnPremisesSamAccountName, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphLicenseAssignmentState[]] + $LicenseAssignmentStates, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEmployeeOrgData] - $EmployeeOrgData, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserActivity1[]] + $Activities, [Parameter()] - [System.Management.Automation.SwitchParameter] - $ProxyUseDefaultCredentials, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDevice[]] + $Devices, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOAuth2PermissionGrant1[]] - $Oauth2PermissionGrants, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOutlookUser1] + $Outlook, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUser] - $BodyParameter, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceManagementTroubleshootingEvent1[]] + $DeviceManagementTroubleshootingEvents, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphScopedRoleMembership[]] - $ScopedRoleMemberOf, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphProfile] + $Profile, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOfficeGraphInsights] - $Insights, + [System.String] + $OnPremisesSamAccountName, [Parameter()] [System.String] - $EmployeeId, + $PreferredName, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Break, + [System.String] + $UserType, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOnlineMeeting1[]] - $OnlineMeetings + [System.String] + $Surname ) } function Remove-MgUser @@ -21582,6 +25369,10 @@ function Update-MgUser { [CmdletBinding()] param( + [Parameter()] + [System.Management.Automation.SwitchParameter] + $IsManagementRestricted, + [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTodo] $Todo, @@ -21623,8 +25414,16 @@ function Update-MgUser $RegisteredDevices, [Parameter()] - [System.String] - $PreferredName, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAppRoleAssignment1[]] + $AppRoleAssignments, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphInformationProtection] + $InformationProtection, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphApproval[]] + $Approvals, [Parameter()] [System.DateTime] @@ -21634,6 +25433,18 @@ function Update-MgUser [System.String[]] $ImAddresses, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceEnrollmentConfiguration[]] + $DeviceEnrollmentConfigurations, + + [Parameter()] + [System.String[]] + $Responsibilities, + + [Parameter()] + [System.DateTime] + $RefreshTokensValidFromDateTime, + [Parameter()] [System.String] $OnPremisesDomainName, @@ -21642,6 +25453,10 @@ function Update-MgUser [System.String] $State, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphExtension[]] + $Extensions, + [Parameter()] [System.DateTime] $SignInSessionsValidFromDateTime, @@ -21658,6 +25473,14 @@ function Update-MgUser [System.DateTime] $HireDate, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMobileAppIntentAndState[]] + $MobileAppIntentAndStates, + + [Parameter()] + [System.String[]] + $InfoCatalogs, + [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphChat1[]] $Chats, @@ -21670,10 +25493,6 @@ function Update-MgUser [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEmployeeOrgData] $EmployeeOrgData, - [Parameter()] - [System.Management.Automation.SwitchParameter] - $IsResourceAccount, - [Parameter()] [System.DateTime] $LastPasswordChangeDateTime, @@ -21702,6 +25521,10 @@ function Update-MgUser [System.String] $ConsentProvidedForMinor, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSignInActivity] + $SignInActivity, + [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAgreementAcceptance[]] $AgreementAcceptances, @@ -21714,6 +25537,10 @@ function Update-MgUser [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] $OwnedObjects, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAuthorizationInfo] + $AuthorizationInfo, + [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphProfilePhoto[]] $Photos, @@ -21730,6 +25557,10 @@ function Update-MgUser [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMailboxSettings1] $MailboxSettings, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphNotification[]] + $Notifications, + [Parameter()] [System.String] $Country, @@ -21779,8 +25610,12 @@ function Update-MgUser $People, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAppRoleAssignment1[]] - $AppRoleAssignments, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphWindowsInformationProtectionDeviceRegistration[]] + $WindowsInformationProtectionDeviceRegistrations, + + [Parameter()] + [System.Management.Automation.SwitchParameter] + $IsResourceAccount, [Parameter()] [System.String[]] @@ -21791,8 +25626,8 @@ function Update-MgUser $PasswordPolicies, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] - $DirectReports, + [System.String] + $CreationType, [Parameter()] [System.String] @@ -21802,6 +25637,10 @@ function Update-MgUser [System.String] $PreferredLanguage, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAccessReviewInstance[]] + $PendingAccessReviewInstances, + [Parameter()] [System.DateTime] $OnPremisesLastSyncDateTime, @@ -21811,8 +25650,8 @@ function Update-MgUser $AgeGroup, [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPlannerUser1] + $Planner, [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphContact1[]] @@ -21852,7 +25691,7 @@ function Update-MgUser [Parameter()] [System.String] - $CreationType, + $Id, [Parameter()] [System.String] @@ -21871,8 +25710,12 @@ function Update-MgUser $Messages, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphExtension[]] - $Extensions, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserPrint] + $Print, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphSecurity] + $Security, [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphObjectIdentity[]] @@ -21882,6 +25725,10 @@ function Update-MgUser [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTeam1[]] $JoinedTeams, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphTasks] + $Tasks, + [Parameter()] [System.String] $MySite, @@ -21891,8 +25738,12 @@ function Update-MgUser $BusinessPhones, [Parameter()] - [System.String] - $Id, + [System.Uri] + $Proxy, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserAnalytics] + $Analytics, [Parameter()] [System.String[]] @@ -21910,6 +25761,10 @@ function Update-MgUser [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPasswordProfile] $PasswordProfile, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAppConsentRequest[]] + $AppConsentRequestsForApproval, + [Parameter()] [System.String] $UserType, @@ -21938,6 +25793,18 @@ function Update-MgUser [System.String] $StreetAddress, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphGroup[]] + $JoinedGroups, + + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphCloudPc[]] + $CloudPCs, + + [Parameter()] + [System.Collections.Hashtable] + $CustomSecurityAttributes, + [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphEvent1[]] $CalendarView, @@ -21946,13 +25813,17 @@ function Update-MgUser [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOnenote1] $Onenote, + [Parameter()] + [System.String] + $SecurityIdentifier, + [Parameter()] [System.String] $DisplayName, [Parameter()] - [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] - $HttpPipelinePrepend, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphServicePrincipal[]] + $AppRoleAssignedResources, [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] @@ -21970,6 +25841,10 @@ function Update-MgUser [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDrive1[]] $Drives, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphMobileAppTroubleshootingEvent[]] + $MobileAppTroubleshootingEvents, + [Parameter()] [System.String[]] $Interests, @@ -21978,6 +25853,10 @@ function Update-MgUser [System.String] $LegalAgeGroupClassification, + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + [Parameter()] [System.String] $OnPremisesSecurityIdentifier, @@ -22010,6 +25889,10 @@ function Update-MgUser [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] $MemberOf, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDeviceKey[]] + $DeviceKeys, + [Parameter()] [System.String] $EmployeeId, @@ -22023,17 +25906,21 @@ function Update-MgUser $Events, [Parameter()] - [System.String] - $UserPrincipalName, + [Microsoft.Graph.PowerShell.Runtime.SendAsyncStep[]] + $HttpPipelinePrepend, [Parameter()] - [System.String[]] - $Responsibilities, + [System.String] + $UserPrincipalName, [Parameter()] [System.Management.Automation.SwitchParameter] $Break, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUsageRight[]] + $UsageRights, + [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphProvisionedPlan[]] $ProvisionedPlans, @@ -22058,13 +25945,17 @@ function Update-MgUser [System.DateTime] $CreatedDateTime, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $DirectReports, + [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphAuthentication1] $Authentication, [Parameter()] - [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphPlannerUser1] - $Planner, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDirectoryObject[]] + $TransitiveReports, [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphLicenseAssignmentState[]] @@ -22074,6 +25965,10 @@ function Update-MgUser [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphUserActivity1[]] $Activities, + [Parameter()] + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphDevice[]] + $Devices, + [Parameter()] [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOutlookUser1] $Outlook, @@ -22087,8 +25982,8 @@ function Update-MgUser $PassThru, [Parameter()] - [System.Uri] - $Proxy, + [Microsoft.Graph.PowerShell.Models.IMicrosoftGraphProfile] + $Profile, [Parameter()] [System.String] @@ -22096,11 +25991,15 @@ function Update-MgUser [Parameter()] [System.String] - $Surname, + $PreferredName, + + [Parameter()] + [System.String] + $PostalCode, [Parameter()] [System.String] - $PostalCode + $Surname ) } #endregion @@ -31915,19 +35814,19 @@ function Set-CsTeamsGuestMessagingConfiguration [Parameter()] [System.Boolean] - $AllowGiphy, + $AllowUserDeleteMessage, [Parameter()] [System.Boolean] - $AllowStickers, + $AllowGiphy, [Parameter()] [System.Boolean] - $AllowUserEditMessage, + $AllowStickers, [Parameter()] [System.Boolean] - $AllowUserDeleteMessage, + $AllowUserEditMessage, [Parameter()] [System.String] @@ -31976,23 +35875,23 @@ function Set-CsTeamsMeetingBroadcastConfiguration [Parameter()] [System.String] - $SupportURL, + $SdnLicenseId, [Parameter()] [System.String] - $MsftInternalProcessingMode, + $SupportURL, [Parameter()] [System.String] - $SdnApiToken, + $MsftInternalProcessingMode, [Parameter()] [System.String] - $SdnApiTemplateUrl, + $SdnApiToken, [Parameter()] [System.String] - $SdnLicenseId + $SdnApiTemplateUrl ) } function Set-CsTeamsMeetingBroadcastPolicy @@ -32536,10 +36435,6 @@ function Set-CsTeamsUpgradeConfiguration { [CmdletBinding()] param( - [Parameter()] - [System.String] - $SfBMeetingJoinUx, - [Parameter()] [System.Management.Automation.SwitchParameter] $Confirm, @@ -32552,6 +36447,10 @@ function Set-CsTeamsUpgradeConfiguration [System.String] $Identity, + [Parameter()] + [System.String] + $SfBMeetingJoinUx, + [Parameter()] [System.String] $MsftInternalProcessingMode @@ -32598,17 +36497,13 @@ function Set-CsTenantFederationConfiguration { [CmdletBinding()] param( - [Parameter()] - [System.Management.Automation.SwitchParameter] - $Confirm, - [Parameter()] [System.Boolean] - $SharedSipAddressSpace, + $AllowTeamsConsumerInbound, [Parameter()] [System.Boolean] - $AllowTeamsConsumerInbound, + $SharedSipAddressSpace, [Parameter()] [System.Object] @@ -32618,6 +36513,10 @@ function Set-CsTenantFederationConfiguration [System.Boolean] $TreatDiscoveredPartnersAsUnverified, + [Parameter()] + [System.Management.Automation.SwitchParameter] + $Confirm, + [Parameter()] [System.Boolean] $AllowTeamsConsumer,