Microsoft.Graph.Compatibility.AzureAD.psm1
# ------------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ Set-StrictMode -Version 5 function Get-CompatADMSIdentityProvider { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["IdentityProviderBaseId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgIdentityProvider @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADServicePrincipalOAuth2PermissionGrant { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["OAuth2PermissionGrantId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgServicePrincipalOAuth2PermissionGrant @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADApplicationExtensionProperty { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgApplicationExtensionProperty @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADApplicationServiceEndpoint { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgServicePrincipalEndpoint @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADMSGroupPermissionGrant { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["GroupId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgGroupPermissionGrant @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADMSIdentityProvider { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Type, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Name, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ClientId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ClientSecret ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["Id"]) { $params["IdentityProviderBaseId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["Type"]) { $params["Type"] = $PSBoundParameters["Type"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Name"]) { $params["Name"] = $PSBoundParameters["Name"] } if($null -ne $PSBoundParameters["ClientId"]) { $params["ClientId"] = $PSBoundParameters["ClientId"] } if($null -ne $PSBoundParameters["ClientSecret"]) { $params["ClientSecret"] = $PSBoundParameters["ClientSecret"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgIdentityProvider @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Add-CompatADGroupOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $RefObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["GroupId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["RefObjectId"]) { $params["RefObjectId"] = $PSBoundParameters["RefObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgGroupOwner @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Revoke-CompatADUserAllRefreshToken { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["UserId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Revoke-MgUserSignInSession @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADGroup { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $SearchString, [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{SearchString = "Filter"; ObjectId = "Id"} if($null -ne $PSBoundParameters["SearchString"]) { $TmpValue = $PSBoundParameters["SearchString"] $Value = "mailNickName eq '$TmpValue' or (mail eq '$TmpValue' or (displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')))" $params["Filter"] = $Value } if($null -ne $PSBoundParameters["ObjectId"]) { $params["GroupId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgGroup @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADApplicationExtensionProperty { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ExtensionPropertyId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["ExtensionPropertyId"]) { $params["ExtensionPropertyId"] = $PSBoundParameters["ExtensionPropertyId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgApplicationExtensionProperty @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADUser { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $PostalCode, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $MailNickName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $ShowInAddressList, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Mobile, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $JobTitle, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ConsentProvidedForMinor, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $PhysicalDeliveryOfficeName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $OtherMails, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $PasswordPolicies, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsCompromised, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName]] $SignInNames, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $PreferredLanguage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $UserState, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ImmutableId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $City, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $AgeGroup, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionProperty, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $UsageLocation, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $UserStateChangedOn, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.Nullable`1[System.Boolean]] $AccountEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Country, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $UserPrincipalName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $GivenName, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][Microsoft.Open.AzureAD.Model.PasswordProfile] $PasswordProfile, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $UserType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $StreetAddress, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $State, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Department, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $CompanyName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $FacsimileTelephoneNumber, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Surname, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $TelephoneNumber, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $CreationType ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["PostalCode"]) { $params["PostalCode"] = $PSBoundParameters["PostalCode"] } if($null -ne $PSBoundParameters["MailNickName"]) { $params["MailNickName"] = $PSBoundParameters["MailNickName"] } if($null -ne $PSBoundParameters["ShowInAddressList"]) { $params["ShowInAddressList"] = $PSBoundParameters["ShowInAddressList"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if($null -ne $PSBoundParameters["Mobile"]) { $params["Mobile"] = $PSBoundParameters["Mobile"] } if($null -ne $PSBoundParameters["JobTitle"]) { $params["JobTitle"] = $PSBoundParameters["JobTitle"] } if($null -ne $PSBoundParameters["ConsentProvidedForMinor"]) { $params["ConsentProvidedForMinor"] = $PSBoundParameters["ConsentProvidedForMinor"] } if($null -ne $PSBoundParameters["PhysicalDeliveryOfficeName"]) { $params["PhysicalDeliveryOfficeName"] = $PSBoundParameters["PhysicalDeliveryOfficeName"] } if($null -ne $PSBoundParameters["OtherMails"]) { $params["OtherMails"] = $PSBoundParameters["OtherMails"] } if($null -ne $PSBoundParameters["PasswordPolicies"]) { $params["PasswordPolicies"] = $PSBoundParameters["PasswordPolicies"] } if($null -ne $PSBoundParameters["IsCompromised"]) { $params["IsCompromised"] = $PSBoundParameters["IsCompromised"] } if($null -ne $PSBoundParameters["SignInNames"]) { $params["SignInNames"] = $PSBoundParameters["SignInNames"] } if($null -ne $PSBoundParameters["PreferredLanguage"]) { $params["PreferredLanguage"] = $PSBoundParameters["PreferredLanguage"] } if($null -ne $PSBoundParameters["UserState"]) { $params["UserState"] = $PSBoundParameters["UserState"] } if($null -ne $PSBoundParameters["ImmutableId"]) { $params["ImmutableId"] = $PSBoundParameters["ImmutableId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["City"]) { $params["City"] = $PSBoundParameters["City"] } if($null -ne $PSBoundParameters["AgeGroup"]) { $params["AgeGroup"] = $PSBoundParameters["AgeGroup"] } if($null -ne $PSBoundParameters["ExtensionProperty"]) { $params["ExtensionProperty"] = $PSBoundParameters["ExtensionProperty"] } if($null -ne $PSBoundParameters["UsageLocation"]) { $params["UsageLocation"] = $PSBoundParameters["UsageLocation"] } if($null -ne $PSBoundParameters["UserStateChangedOn"]) { $params["UserStateChangedOn"] = $PSBoundParameters["UserStateChangedOn"] } if($null -ne $PSBoundParameters["AccountEnabled"]) { $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] } if($null -ne $PSBoundParameters["Country"]) { $params["Country"] = $PSBoundParameters["Country"] } if($null -ne $PSBoundParameters["UserPrincipalName"]) { $params["UserPrincipalName"] = $PSBoundParameters["UserPrincipalName"] } if($null -ne $PSBoundParameters["GivenName"]) { $params["GivenName"] = $PSBoundParameters["GivenName"] } if($null -ne $PSBoundParameters["PasswordProfile"]) { $TmpValue = $PSBoundParameters["PasswordProfile"] $Value = @{ forceChangePasswordNextSignIn = $TmpValue.ForceChangePasswordNextLogin password = $TmpValue.Password } $params["PasswordProfile"] = $Value } if($null -ne $PSBoundParameters["UserType"]) { $params["UserType"] = $PSBoundParameters["UserType"] } if($null -ne $PSBoundParameters["StreetAddress"]) { $params["StreetAddress"] = $PSBoundParameters["StreetAddress"] } if($null -ne $PSBoundParameters["State"]) { $params["State"] = $PSBoundParameters["State"] } if($null -ne $PSBoundParameters["Department"]) { $params["Department"] = $PSBoundParameters["Department"] } if($null -ne $PSBoundParameters["CompanyName"]) { $params["CompanyName"] = $PSBoundParameters["CompanyName"] } if($null -ne $PSBoundParameters["FacsimileTelephoneNumber"]) { $params["FacsimileTelephoneNumber"] = $PSBoundParameters["FacsimileTelephoneNumber"] } if($null -ne $PSBoundParameters["Surname"]) { $params["Surname"] = $PSBoundParameters["Surname"] } if($null -ne $PSBoundParameters["TelephoneNumber"]) { $params["TelephoneNumber"] = $PSBoundParameters["TelephoneNumber"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["CreationType"]) { $params["CreationType"] = $PSBoundParameters["CreationType"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgUser @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADMSGroupLifecyclePolicy { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["GroupLifecyclePolicyId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgGroupLifecyclePolicy @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADDomain { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Name ) PROCESS { $params = @{} $keysChanged = @{Name = "DomainId"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Name"]) { $params["DomainId"] = $PSBoundParameters["Name"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDomain @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADDomain { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsDefault, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $SupportedServices, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $Name, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsDefaultForCloudRedirections ) PROCESS { $params = @{} $keysChanged = @{Name = "Id"} if($null -ne $PSBoundParameters["IsDefault"]) { $params["IsDefault"] = $PSBoundParameters["IsDefault"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["SupportedServices"]) { $params["SupportedServices"] = $PSBoundParameters["SupportedServices"] } if($null -ne $PSBoundParameters["Name"]) { $params["Id"] = $PSBoundParameters["Name"] } if($null -ne $PSBoundParameters["IsDefaultForCloudRedirections"]) { $params["IsDefaultForCloudRedirections"] = $PSBoundParameters["IsDefaultForCloudRedirections"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgDomain @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Reset-CompatADMSLifeCycleGroup { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["GroupId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Invoke-MgRenewGroup @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADGroupMember { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["GroupId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgGroupMember @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADTrustedCertificateAuthority { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][Microsoft.Open.AzureAD.Model.CertificateAuthorityInformation] $CertificateAuthorityInformation ) PROCESS { $params = @{} $params["Uri"] = "/v1.0/organization/6bb43237-958e-4721-8eaf-8515a3739156/certificateBasedAuthConfiguration" $params["Method"] = "POST" if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } $certNotFound = $true $modifiedCert = $PSBoundParameters["CertificateAuthorityInformation"] $previusCerts = @() Get-CompatADTrustedCertificateAuthority | ForEach-Object { if(($_.TrustedIssuer -eq $modifiedCert.TrustedIssuer) -and ($_.TrustedIssuerSki -eq $modifiedCert.TrustedIssuerSki)){ $certNotFound = $false } else{ $previusCerts += $_ } } if($certNotFound){ Throw [System.Management.Automation.PSArgumentException] "Provided certificate authority not found on the server. Please make sure you have provided the correct information in trustedIssuer and trustedIssuerSki fields." } $body = @{ certificateAuthorities = @() } $previusCerts | ForEach-Object { $isRoot = $false if("RootAuthority" -eq $_.AuthorityType){ $isRoot = $true } $cert = @{ isRootAuthority = $isRoot certificateRevocationListUrl = $_.CrlDistributionPoint deltaCertificateRevocationListUrl = $_.DeltaCrlDistributionPoint certificate = [convert]::tobase64string($_.TrustedCertificate) } $body.certificateAuthorities += $cert } $params["Body"] = ConvertTo-Json $body Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") Invoke-GraphRequest @params } } function Get-CompatADServiceAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["AppRoleAssignmentId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgServicePrincipalAppRoleAssignment @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADMSGroup { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Visibility, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.Nullable`1[System.Boolean]] $MailEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsAssignableToRole, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $GroupTypes, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.Nullable`1[System.Boolean]] $SecurityEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $MailNickname, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $DisplayName ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["Visibility"]) { $params["Visibility"] = $PSBoundParameters["Visibility"] } if($null -ne $PSBoundParameters["Description"]) { $params["Description"] = $PSBoundParameters["Description"] } if($null -ne $PSBoundParameters["MailEnabled"]) { $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["IsAssignableToRole"]) { $params["IsAssignableToRole"] = $PSBoundParameters["IsAssignableToRole"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["GroupTypes"]) { $params["GroupTypes"] = $PSBoundParameters["GroupTypes"] } if($null -ne $PSBoundParameters["SecurityEnabled"]) { $params["SecurityEnabled"] = $PSBoundParameters["SecurityEnabled"] } if($null -ne $PSBoundParameters["MailNickname"]) { $params["MailNickname"] = $PSBoundParameters["MailNickname"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgGroup @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADMSRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $RoleDefinitionId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DirectoryScopeId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $PrincipalId ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["RoleDefinitionId"]) { $params["RoleDefinitionId"] = $PSBoundParameters["RoleDefinitionId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["DirectoryScopeId"]) { $params["DirectoryScopeId"] = $PSBoundParameters["DirectoryScopeId"] } if($null -ne $PSBoundParameters["PrincipalId"]) { $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgRoleManagementDirectoryRoleAssignment @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Select-CompatADGroupIdsUserIsMemberOf { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["GroupIdsForMembershipCheck"]) { $params["GroupIdsForMembershipCheck"] = $PSBoundParameters["GroupIdsForMembershipCheck"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUserMemberOf @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADTrustedCertificateAuthority { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $TrustedIssuer, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $TrustedIssuerSki ) PROCESS { $params = @{} $params["OrganizationId"] = (Get-MgContext).TenantId if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["TrustedIssuerSki"]) { $trustedIssuerSki = $PSBoundParameters["TrustedIssuerSki"] } if($null -ne $PSBoundParameters["TrustedIssuer"]) { $trustedIssuer = $PSBoundParameters["TrustedIssuer"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $responseData = Get-MgOrganizationCertificateBasedAuthConfiguration @params $response= @() $responseData.CertificateAuthorities | ForEach-Object { $data = @{ AuthorityType = "IntermediateAuthority" TrustedCertificate = $_.Certificate CrlDistributionPoint = $_.CertificateRevocationListUrl DeltaCrlDistributionPoint = $_.DeltaCertificateRevocationListUrl TrustedIssuer = $_.Issuer TrustedIssuerSki = $_.IssuerSki } if($_.IsRootAuthority){ $data.AuthorityType = "RootAuthority" } $dataJson = ConvertTo-Json $data $response += [Newtonsoft.Json.JsonConvert]::DeserializeObject($dataJson, [Microsoft.Open.AzureAD.Model.CertificateAuthorityInformation]) } $response } } function Remove-CompatADApplicationKeyCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $KeyId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["KeyId"]) { $params["KeyId"] = $PSBoundParameters["KeyId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgApplicationKey @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADUserLicenseDetail { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["LicenseDetailsId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUserLicenseDetail @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Add-CompatADServicePrincipalOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $RefObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["RefObjectId"]) { $params["RefObjectId"] = $PSBoundParameters["RefObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgServicePrincipalOwnerByRef @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADMSApplicationKey { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $KeyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Proof ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["KeyId"]) { $params["KeyId"] = $PSBoundParameters["KeyId"] } if($null -ne $PSBoundParameters["Proof"]) { $params["Proof"] = $PSBoundParameters["Proof"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgApplicationKey @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Add-CompatADMSApplicationOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $RefObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["RefObjectId"]) { $params["RefObjectId"] = $PSBoundParameters["RefObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgApplicationOwnerByRef @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADMSServicePrincipalDelegatedPermissionClassification { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ServicePrincipalId, [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($null -ne $PSBoundParameters["ServicePrincipalId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } if($null -ne $PSBoundParameters["Id"]) { $params["DelegatedPermissionClassificationId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgServicePrincipalDelegatedPermissionClassification @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADServicePrincipalKeyCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $KeyId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["KeyId"]) { $params["KeyId"] = $PSBoundParameters["KeyId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgServicePrincipalKey @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADUser { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["UserId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgUser @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Update-CompatADSignedInUserPassword { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Security.SecureString] $NewPassword, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Security.SecureString] $CurrentPassword ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["NewPassword"]) { $params["NewPassword"] = $PSBoundParameters["NewPassword"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["CurrentPassword"]) { $params["CurrentPassword"] = $PSBoundParameters["CurrentPassword"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgUserPassword @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Add-CompatADDeviceRegisteredOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $RefObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"; RefObjectId = "BodyParameter"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DeviceId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["RefObjectId"]) { $TmpValue = $PSBoundParameters["RefObjectId"] $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} $params["BodyParameter"] = $Value } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgDeviceRegisteredOwnerByRef @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADUserThumbnailPhoto { [CmdletBinding(DefaultParameterSetName = 'File')] param ( [Parameter(ParameterSetName = "ByteArray")][System.String] $ObjectId, [Parameter(ParameterSetName = "ByteArray", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Byte[]] $ImageByteArray, [Parameter(ParameterSetName = "File", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $FilePath, [Parameter(ParameterSetName = "Stream", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.IO.Stream] $FileStream ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["UserId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["ImageByteArray"]) { $params["ImageByteArray"] = $PSBoundParameters["ImageByteArray"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["FilePath"]) { $params["FilePath"] = $PSBoundParameters["FilePath"] } if($null -ne $PSBoundParameters["FileStream"]) { $params["FileStream"] = $PSBoundParameters["FileStream"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Set-MgUserPhotoContent @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADApplication { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $SearchString, [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{SearchString = "Filter"; ObjectId = "Id"} if($null -ne $PSBoundParameters["SearchString"]) { $TmpValue = $PSBoundParameters["SearchString"] $Value = "displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')" $params["Filter"] = $Value } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgApplication @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADMSApplicationVerifiedPublisher { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][Microsoft.Open.MSGraph.Model.SetVerifiedPublisherRequest] $SetVerifiedPublisherRequest, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $AppObjectId ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["SetVerifiedPublisherRequest"]) { $params["SetVerifiedPublisherRequest"] = $PSBoundParameters["SetVerifiedPublisherRequest"] } if($null -ne $PSBoundParameters["AppObjectId"]) { $params["AppObjectId"] = $PSBoundParameters["AppObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Set-MgApplicationVerifiedPublisher @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADDeviceRegisteredUser { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DeviceId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDeviceRegisteredUser @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Add-CompatADDirectoryRoleMember { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $RefObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryRoleId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["RefObjectId"]) { $params["RefObjectId"] = $PSBoundParameters["RefObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgDirectoryRoleMemberByRef @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADMSServicePrincipalDelegatedPermissionClassification { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ServicePrincipalId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ServicePrincipalId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } if($null -ne $PSBoundParameters["Id"]) { $params["DelegatedPermissionClassificationId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgServicePrincipalDelegatedPermissionClassification @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADMSAuthorizationPolicy { [CmdletBinding(DefaultParameterSetName = '')] param ( ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgPolicyAuthorizationPolicy @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Select-CompatADGroupIdsServicePrincipalIsMemberOf { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["GroupIdsForMembershipCheck"]) { $params["GroupIdsForMembershipCheck"] = $PSBoundParameters["GroupIdsForMembershipCheck"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgServicePrincipalMemberOf @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADGroup { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Description, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $MailEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $SecurityEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $MailNickName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["Description"]) { $params["Description"] = $PSBoundParameters["Description"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["GroupId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["MailEnabled"]) { $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["SecurityEnabled"]) { $params["SecurityEnabled"] = $PSBoundParameters["SecurityEnabled"] } if($null -ne $PSBoundParameters["MailNickName"]) { $params["MailNickName"] = $PSBoundParameters["MailNickName"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgGroup @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADApplicationLogo { [CmdletBinding(DefaultParameterSetName = 'File')] param ( [Parameter(ParameterSetName = "ByteArray")][System.String] $ObjectId, [Parameter(ParameterSetName = "ByteArray", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Byte[]] $ImageByteArray, [Parameter(ParameterSetName = "File", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $FilePath, [Parameter(ParameterSetName = "Stream", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.IO.Stream] $FileStream ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["ImageByteArray"]) { $params["ImageByteArray"] = $PSBoundParameters["ImageByteArray"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["FilePath"]) { $params["FilePath"] = $PSBoundParameters["FilePath"] } if($null -ne $PSBoundParameters["FileStream"]) { $params["FileStream"] = $PSBoundParameters["FileStream"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Set-MgApplicationLogo @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADContactDirectReport { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgContactDirectReport @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Add-CompatADGroupMember { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $RefObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"; RefObjectId = "DirectoryObjectId"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["GroupId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["RefObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["RefObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgGroupMember @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADMSConditionalAccessPolicy { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $PolicyId ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["PolicyId"]) { $params["PolicyId"] = $PSBoundParameters["PolicyId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgIdentityConditionalAccessPolicy @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Add-CompatADMSServicePrincipalDelegatedPermissionClassification { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $PermissionId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.Nullable`1[Microsoft.Open.MSGraph.Model.DelegatedPermissionClassification+ClassificationEnum]] $Classification, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $PermissionName, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ServicePrincipalId ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["PermissionId"]) { $params["PermissionId"] = $PSBoundParameters["PermissionId"] } if($null -ne $PSBoundParameters["Classification"]) { $params["Classification"] = $PSBoundParameters["Classification"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["PermissionName"]) { $params["PermissionName"] = $PSBoundParameters["PermissionName"] } if($null -ne $PSBoundParameters["ServicePrincipalId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgServicePrincipalDelegatedPermissionClassification @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADServiceAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $AppRoleAssignmentId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["AppRoleAssignmentId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["AppRoleAssignmentId"]) { $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgServicePrincipalAppRoleAssignment @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADDomainNameReference { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Name ) PROCESS { $params = @{} $keysChanged = @{Name = "DomainId"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Name"]) { $params["DomainId"] = $PSBoundParameters["Name"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDomainNameReference @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADMSConditionalAccessPolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $PolicyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls] $SessionControls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $State, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls] $GrantControls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet] $Conditions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["Id"]) { $params["ConditionalAccessPolicyId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["PolicyId"]) { $params["PolicyId"] = $PSBoundParameters["PolicyId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["SessionControls"]) { $params["SessionControls"] = $PSBoundParameters["SessionControls"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["State"]) { $params["State"] = $PSBoundParameters["State"] } if($null -ne $PSBoundParameters["GrantControls"]) { $params["GrantControls"] = $PSBoundParameters["GrantControls"] } if($null -ne $PSBoundParameters["Conditions"]) { $params["Conditions"] = $PSBoundParameters["Conditions"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgIdentityConditionalAccessPolicy @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADMSAdministrativeUnitMember { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $MemberId ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["AdministrativeUnitId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["MemberId"]) { $params["MemberId"] = $PSBoundParameters["MemberId"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgDirectoryAdministrativeUnitScopedRoleMember @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADUserOAuth2PermissionGrant { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["OAuth2PermissionGrantId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUserOAuth2PermissionGrant @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADOAuth2PermissionGrant { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgOAuth2PermissionGrant @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADMSIdentityProvider { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $ClientId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $Type, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Name, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $ClientSecret ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["ClientId"]) { $params["ClientId"] = $PSBoundParameters["ClientId"] } if($null -ne $PSBoundParameters["Type"]) { $params["Type"] = $PSBoundParameters["Type"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Name"]) { $params["Name"] = $PSBoundParameters["Name"] } if($null -ne $PSBoundParameters["ClientSecret"]) { $params["ClientSecret"] = $PSBoundParameters["ClientSecret"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgIdentityProvider @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADMSDeletedDirectoryObject { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["DirectoryObjectId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgDirectoryObject @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Revoke-CompatADSignedInUserAllRefreshToken { [CmdletBinding(DefaultParameterSetName = '')] param ( ) PROCESS { $params = @{} $params["UserId"] = (Get-MgContext).Account if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Revoke-MgUserSignInSession @params $response } } function Get-CompatADContactMembership { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgContactMemberOf @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADGroup { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.Nullable`1[System.Boolean]] $MailEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.Nullable`1[System.Boolean]] $SecurityEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $MailNickName, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $DisplayName ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["Description"]) { $params["Description"] = $PSBoundParameters["Description"] } if($null -ne $PSBoundParameters["MailEnabled"]) { $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["SecurityEnabled"]) { $params["SecurityEnabled"] = $PSBoundParameters["SecurityEnabled"] } if($null -ne $PSBoundParameters["MailNickName"]) { $params["MailNickName"] = $PSBoundParameters["MailNickName"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgGroup @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADMSNamedLocationPolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IncludeUnknownCountriesAndRegions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsTrusted, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $OdataType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion]] $CountriesAndRegions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]] $IpRanges, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["IncludeUnknownCountriesAndRegions"]) { $params["IncludeUnknownCountriesAndRegions"] = $PSBoundParameters["IncludeUnknownCountriesAndRegions"] } if($null -ne $PSBoundParameters["Id"]) { $params["Id"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["IsTrusted"]) { $params["IsTrusted"] = $PSBoundParameters["IsTrusted"] } if($null -ne $PSBoundParameters["OdataType"]) { $params["OdataType"] = $PSBoundParameters["OdataType"] } if($null -ne $PSBoundParameters["CountriesAndRegions"]) { $params["CountriesAndRegions"] = $PSBoundParameters["CountriesAndRegions"] } if($null -ne $PSBoundParameters["IpRanges"]) { $params["IpRanges"] = $PSBoundParameters["IpRanges"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgIdentityConditionalAccessNamedLocation @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Confirm-CompatADDomain { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][Microsoft.Open.AzureAD.Model.CrossCloudVerificationCodeBody] $CrossCloudVerificationCode, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Name ) PROCESS { $params = @{} $keysChanged = @{Name = "DomainId"} if($null -ne $PSBoundParameters["CrossCloudVerificationCode"]) { $params["CrossCloudVerificationCode"] = $PSBoundParameters["CrossCloudVerificationCode"] } if($null -ne $PSBoundParameters["Name"]) { $params["DomainId"] = $PSBoundParameters["Name"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Confirm-MgDomain @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADServicePrincipalOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $OwnerId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{OwnerId = "DirectoryObjectId"; ObjectId = "Id"} if($null -ne $PSBoundParameters["OwnerId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ServicePrincipalId "] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgServicePrincipalOwnerByRef @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADUserAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $AppRoleAssignmentId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["AppRoleAssignmentId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["AppRoleAssignmentId"]) { $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgUserAppRoleAssignment @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADMSRoleAssignment { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["UnifiedRoleAssignmentId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgRoleManagementDirectoryRoleAssignment @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADMSIdentityProvider { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["IdentityProviderBaseId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgIdentityProvider @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADDeletedApplication { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $SearchString, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter ) PROCESS { $params = @{} $filter = "" if($null -ne $PSBoundParameters["Filter"]) { $filter += $PSBoundParameters["Filter"] } if($null -ne $PSBoundParameters["SearchString"]) { $filterValue += $PSBoundParameters["SearchString"] $filter += "`$filter=startswith(displayName,'$filterValue')" } if($null -ne $PSBoundParameters["Top"]) { $topValue = $PSBoundParameters["Top"] $filter += "`$top=`$topValue" } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $filter += "`$top=999" } } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $apiResponse = Invoke-GraphRequest -Uri "/v1.0/directory/deleteditems/microsoft.graph.application?$filter" $response = $apiResponse.Value | Select-Object -Property id, appId, displayName $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADExtensionProperty { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsSyncedFromOnPremises ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["IsSyncedFromOnPremises"]) { $params["IsSyncedFromOnPremises"] = $PSBoundParameters["IsSyncedFromOnPremises"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDirectoryObjectAvailableExtensionProperty @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Select-CompatADGroupIdsGroupIsMemberOf { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["GroupIdsForMembershipCheck"]) { $params["GroupIdsForMembershipCheck"] = $PSBoundParameters["GroupIdsForMembershipCheck"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgGroupMemberOf @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADDeviceRegisteredUser { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $UserId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"; UserId = "DirectoryObjectId"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DeviceId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["UserId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["UserId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgDeviceRegisteredUserByRef @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADMSAdministrativeUnit { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Description"]) { $params["Description"] = $PSBoundParameters["Description"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if($null -ne $PSBoundParameters["Id"]) { $params["AdministrativeUnitId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgDirectoryAdministrativeUnit @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADMSGroup { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Visibility, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $MailEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsAssignableToRole, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $GroupTypes, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $SecurityEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $MailNickname, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["Visibility"]) { $params["Visibility"] = $PSBoundParameters["Visibility"] } if($null -ne $PSBoundParameters["Id"]) { $params["GroupId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["MailEnabled"]) { $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["IsAssignableToRole"]) { $params["IsAssignableToRole"] = $PSBoundParameters["IsAssignableToRole"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["GroupTypes"]) { $params["GroupTypes"] = $PSBoundParameters["GroupTypes"] } if($null -ne $PSBoundParameters["SecurityEnabled"]) { $params["SecurityEnabled"] = $PSBoundParameters["SecurityEnabled"] } if($null -ne $PSBoundParameters["MailNickname"]) { $params["MailNickname"] = $PSBoundParameters["MailNickname"] } if($null -ne $PSBoundParameters["Description"]) { $params["Description"] = $PSBoundParameters["Description"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgGroup @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Add-CompatADMSLifecyclePolicyGroup { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $GroupId ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["Id"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["GroupId"]) { $params["GroupId"] = $PSBoundParameters["GroupId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgGroupLifecyclePolicy @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADUserAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["AppRoleAssignmentId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUserAppRoleAssignment @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADMSAdministrativeUnit { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["AdministrativeUnitId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgDirectoryAdministrativeUnit @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADMSDeletedGroup { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $SearchString, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["Id"]) { $params["DirectoryObjectId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($null -ne $PSBoundParameters["SearchString"]) { $params["SearchString"] = $PSBoundParameters["SearchString"] } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDirectoryDeletedItem @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADMSAuthorizationPolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $AllowedToSignUpEmailBasedSubscriptions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $BlockMsolPowerShell, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.DefaultUserRolePermissions] $DefaultUserRolePermissions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $AllowedToUseSSPR, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $AllowEmailVerifiedUsersToJoinOrganization, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["Description"]) { $params["Description"] = $PSBoundParameters["Description"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["AllowedToSignUpEmailBasedSubscriptions"]) { $params["AllowedToSignUpEmailBasedSubscriptions"] = $PSBoundParameters["AllowedToSignUpEmailBasedSubscriptions"] } if($null -ne $PSBoundParameters["BlockMsolPowerShell"]) { $params["BlockMsolPowerShell"] = $PSBoundParameters["BlockMsolPowerShell"] } if($null -ne $PSBoundParameters["DefaultUserRolePermissions"]) { $params["DefaultUserRolePermissions"] = $PSBoundParameters["DefaultUserRolePermissions"] } if($null -ne $PSBoundParameters["AllowedToUseSSPR"]) { $params["AllowedToUseSSPR"] = $PSBoundParameters["AllowedToUseSSPR"] } if($null -ne $PSBoundParameters["AllowEmailVerifiedUsersToJoinOrganization"]) { $params["AllowEmailVerifiedUsersToJoinOrganization"] = $PSBoundParameters["AllowEmailVerifiedUsersToJoinOrganization"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgPolicyAuthorizationPolicy @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADGroupOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $OwnerId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{OwnerId = "DirectoryObjectId"; ObjectId = "Id"} if($null -ne $PSBoundParameters["OwnerId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["GroupId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgGroupOwnerByRef @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADMSRoleDefinition { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgRoleManagementDirectoryRoleDefinition @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADApplicationPasswordCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $KeyId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["KeyId"]) { $params["KeyId"] = $PSBoundParameters["KeyId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgApplicationPassword @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADServicePrincipalOwnedObject { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgServicePrincipalOwnedObject @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADMSRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $SearchString, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["Id"]) { $params["UnifiedRoleAssignmentId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($null -ne $PSBoundParameters["SearchString"]) { $params["SearchString"] = $PSBoundParameters["SearchString"] } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgRoleManagementDirectoryRoleAssignment @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADUserOwnedObject { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUserOwnedObject @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADMSLifecyclePolicyGroup { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $GroupId ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["GroupLifecyclePolicyId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["GroupId"]) { $params["GroupId"] = $PSBoundParameters["GroupId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgGroupFromLifecyclePolicy @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADDomain { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Name ) PROCESS { $params = @{} $keysChanged = @{Name = "DomainId"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Name"]) { $params["DomainId"] = $PSBoundParameters["Name"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgDomain @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADContact { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["OrgContactId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgContact @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADMSGroupLifecyclePolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $AlternateNotificationEmails, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ManagedGroupTypes, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Int32]] $GroupLifetimeInDays ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["AlternateNotificationEmails"]) { $params["AlternateNotificationEmails"] = $PSBoundParameters["AlternateNotificationEmails"] } if($null -ne $PSBoundParameters["Id"]) { $params["GroupLifecyclePolicyId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["ManagedGroupTypes"]) { $params["ManagedGroupTypes"] = $PSBoundParameters["ManagedGroupTypes"] } if($null -ne $PSBoundParameters["GroupLifetimeInDays"]) { $params["GroupLifetimeInDays"] = $PSBoundParameters["GroupLifetimeInDays"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgGroupLifecyclePolicy @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADGroupAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["AppRoleAssignmentId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgGroupAppRoleAssignment @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADMSApplication { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $SearchString, [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{SearchString = "Filter"; ObjectId = "Id"} if($null -ne $PSBoundParameters["SearchString"]) { $TmpValue = $PSBoundParameters["SearchString"] $Value = "displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')" $params["Filter"] = $Value } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgApplication @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADApplication { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AddIn]] $AddIns, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $SignInAudience, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $Oauth2AllowImplicitFlow, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $ReplyUrls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsDisabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $AllowGuestsSignIn, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $KnownClientApplications, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $PublisherDomain, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $OrgRestrictions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.AzureAD.Model.OptionalClaims] $OptionalClaims, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.AzureAD.Model.ParentalControlSettings] $ParentalControlSettings, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $Oauth2AllowUrlPathMatching, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential]] $KeyCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $WwwHomepage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $IdentifierUris, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $GroupMembershipClaims, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.OAuth2Permission]] $Oauth2Permissions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $LogoutUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ErrorUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $SamlMetadataUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsDeviceOnlyAuthSupported, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PreAuthorizedApplication]] $PreAuthorizedApplications, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $Oauth2RequirePostResponse, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $AllowPassthroughUsers, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.RequiredResourceAccess]] $RequiredResourceAccess, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $PublicClient, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $AvailableToOtherTenants, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $RecordConsentConditions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $AppLogoUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential]] $PasswordCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Homepage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AppRole]] $AppRoles, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.AzureAD.Model.InformationalUrl] $InformationalUrls ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["AddIns"]) { $params["AddIns"] = $PSBoundParameters["AddIns"] } if($null -ne $PSBoundParameters["SignInAudience"]) { $params["SignInAudience"] = $PSBoundParameters["SignInAudience"] } if($null -ne $PSBoundParameters["Oauth2AllowImplicitFlow"]) { $params["Oauth2AllowImplicitFlow"] = $PSBoundParameters["Oauth2AllowImplicitFlow"] } if($null -ne $PSBoundParameters["ReplyUrls"]) { $params["ReplyUrls"] = $PSBoundParameters["ReplyUrls"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if($null -ne $PSBoundParameters["IsDisabled"]) { $params["IsDisabled"] = $PSBoundParameters["IsDisabled"] } if($null -ne $PSBoundParameters["AllowGuestsSignIn"]) { $params["AllowGuestsSignIn"] = $PSBoundParameters["AllowGuestsSignIn"] } if($null -ne $PSBoundParameters["KnownClientApplications"]) { $params["KnownClientApplications"] = $PSBoundParameters["KnownClientApplications"] } if($null -ne $PSBoundParameters["PublisherDomain"]) { $params["PublisherDomain"] = $PSBoundParameters["PublisherDomain"] } if($null -ne $PSBoundParameters["OrgRestrictions"]) { $params["OrgRestrictions"] = $PSBoundParameters["OrgRestrictions"] } if($null -ne $PSBoundParameters["OptionalClaims"]) { $params["OptionalClaims"] = $PSBoundParameters["OptionalClaims"] } if($null -ne $PSBoundParameters["ParentalControlSettings"]) { $params["ParentalControlSettings"] = $PSBoundParameters["ParentalControlSettings"] } if($null -ne $PSBoundParameters["Oauth2AllowUrlPathMatching"]) { $params["Oauth2AllowUrlPathMatching"] = $PSBoundParameters["Oauth2AllowUrlPathMatching"] } if($null -ne $PSBoundParameters["KeyCredentials"]) { $params["KeyCredentials"] = $PSBoundParameters["KeyCredentials"] } if($null -ne $PSBoundParameters["WwwHomepage"]) { $params["WwwHomepage"] = $PSBoundParameters["WwwHomepage"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["IdentifierUris"]) { $params["IdentifierUris"] = $PSBoundParameters["IdentifierUris"] } if($null -ne $PSBoundParameters["GroupMembershipClaims"]) { $params["GroupMembershipClaims"] = $PSBoundParameters["GroupMembershipClaims"] } if($null -ne $PSBoundParameters["Oauth2Permissions"]) { $params["Oauth2Permissions"] = $PSBoundParameters["Oauth2Permissions"] } if($null -ne $PSBoundParameters["LogoutUrl"]) { $params["LogoutUrl"] = $PSBoundParameters["LogoutUrl"] } if($null -ne $PSBoundParameters["ErrorUrl"]) { $params["ErrorUrl"] = $PSBoundParameters["ErrorUrl"] } if($null -ne $PSBoundParameters["SamlMetadataUrl"]) { $params["SamlMetadataUrl"] = $PSBoundParameters["SamlMetadataUrl"] } if($null -ne $PSBoundParameters["IsDeviceOnlyAuthSupported"]) { $params["IsDeviceOnlyAuthSupported"] = $PSBoundParameters["IsDeviceOnlyAuthSupported"] } if($null -ne $PSBoundParameters["PreAuthorizedApplications"]) { $params["PreAuthorizedApplications"] = $PSBoundParameters["PreAuthorizedApplications"] } if($null -ne $PSBoundParameters["Oauth2RequirePostResponse"]) { $params["Oauth2RequirePostResponse"] = $PSBoundParameters["Oauth2RequirePostResponse"] } if($null -ne $PSBoundParameters["AllowPassthroughUsers"]) { $params["AllowPassthroughUsers"] = $PSBoundParameters["AllowPassthroughUsers"] } if($null -ne $PSBoundParameters["RequiredResourceAccess"]) { $params["RequiredResourceAccess"] = $PSBoundParameters["RequiredResourceAccess"] } if($null -ne $PSBoundParameters["PublicClient"]) { $params["PublicClient"] = $PSBoundParameters["PublicClient"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["AvailableToOtherTenants"]) { $params["AvailableToOtherTenants"] = $PSBoundParameters["AvailableToOtherTenants"] } if($null -ne $PSBoundParameters["RecordConsentConditions"]) { $params["RecordConsentConditions"] = $PSBoundParameters["RecordConsentConditions"] } if($null -ne $PSBoundParameters["AppLogoUrl"]) { $params["AppLogoUrl"] = $PSBoundParameters["AppLogoUrl"] } if($null -ne $PSBoundParameters["PasswordCredentials"]) { $params["PasswordCredentials"] = $PSBoundParameters["PasswordCredentials"] } if($null -ne $PSBoundParameters["Homepage"]) { $params["Homepage"] = $PSBoundParameters["Homepage"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["AppRoles"]) { $params["AppRoles"] = $PSBoundParameters["AppRoles"] } if($null -ne $PSBoundParameters["InformationalUrls"]) { $params["InformationalUrls"] = $PSBoundParameters["InformationalUrls"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgApplication @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADMSRoleDefinition { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $SearchString, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["Id"]) { $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($null -ne $PSBoundParameters["SearchString"]) { $params["SearchString"] = $PSBoundParameters["SearchString"] } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgRoleManagementDirectoryRoleDefinition @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADMSPermissionGrantConditionSet { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ConditionSetType, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $PolicyId ) $params = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["PermissionGrantConditionSetId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["ConditionSetType"]) { $conditionalSet = $PSBoundParameters["ConditionSetType"] } if($null -ne $PSBoundParameters["PolicyId"]) { $params["PermissionGrantPolicyId"] = $PSBoundParameters["PolicyId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") if("$conditionalSet" -eq "includes"){ $response = Get-MgPolicyPermissionGrantPolicyInclude @params } elseif("$conditionalSet" -eq "excludes"){ $response = Get-MgPolicyPermissionGrantPolicyExclude @params } else{ Write-Error("Message: Resource not found for the segment '$conditionalSet'.") return } $response } function Remove-CompatADGroupMember { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $MemberId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"; MemberId = "DirectoryObjectId"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["GroupId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["MemberId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgGroupMemberByRef @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADServicePrincipalCreatedObject { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgServicePrincipalCreatedObject @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADApplicationKeyCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) (Get-MgApplication -ApplicationId $PSBoundParameters["ObjectId"]).KeyCredentials } function Get-CompatADServicePrincipalOwner { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgServicePrincipalOwner @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADUserThumbnailPhoto { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $FileName, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $FilePath, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Boolean] $View ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["UserId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["FileName"]) { $params["FileName"] = $PSBoundParameters["FileName"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["FilePath"]) { $params["FilePath"] = $PSBoundParameters["FilePath"] } if($null -ne $PSBoundParameters["View"]) { $params["View"] = $PSBoundParameters["View"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUserPhoto @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADServicePrincipalKeyCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) (Get-MgServicePrincipal ServicePrincipalId $PSBoundParameters["ObjectId"]).KeyCredentials } function Remove-CompatADDevice { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DeviceId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgDevice @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADUserExtension { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ExtensionId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUserExtension @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADUserCreatedObject { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUserCreatedObject @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADMSNamedLocationPolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IncludeUnknownCountriesAndRegions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $PolicyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsTrusted, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $OdataType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion]] $CountriesAndRegions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]] $IpRanges, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["IncludeUnknownCountriesAndRegions"]) { $params["IncludeUnknownCountriesAndRegions"] = $PSBoundParameters["IncludeUnknownCountriesAndRegions"] } if($null -ne $PSBoundParameters["Id"]) { $params["NamedLocationId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["PolicyId"]) { $params["PolicyId"] = $PSBoundParameters["PolicyId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["IsTrusted"]) { $params["IsTrusted"] = $PSBoundParameters["IsTrusted"] } if($null -ne $PSBoundParameters["OdataType"]) { $params["OdataType"] = $PSBoundParameters["OdataType"] } if($null -ne $PSBoundParameters["CountriesAndRegions"]) { $params["CountriesAndRegions"] = $PSBoundParameters["CountriesAndRegions"] } if($null -ne $PSBoundParameters["IpRanges"]) { $params["IpRanges"] = $PSBoundParameters["IpRanges"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgIdentityConditionalAccessNamedLocation @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADMSRoleDefinition { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsEnabled, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Version, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $ResourceScopes, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission]] $RolePermissions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $TemplateId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["IsEnabled"]) { $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] } if($null -ne $PSBoundParameters["Id"]) { $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Version"]) { $params["Version"] = $PSBoundParameters["Version"] } if($null -ne $PSBoundParameters["ResourceScopes"]) { $params["ResourceScopes"] = $PSBoundParameters["ResourceScopes"] } if($null -ne $PSBoundParameters["Description"]) { $params["Description"] = $PSBoundParameters["Description"] } if($null -ne $PSBoundParameters["RolePermissions"]) { $params["RolePermissions"] = $PSBoundParameters["RolePermissions"] } if($null -ne $PSBoundParameters["TemplateId"]) { $params["TemplateId"] = $PSBoundParameters["TemplateId"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgRoleManagementDirectoryRoleDefinition @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADContactManager { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["OrgContactId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgContactManager @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADMSPermissionGrantConditionSet { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $Permissions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $ClientApplicationTenantIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $ClientApplicationsFromVerifiedPublisherOnly, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ConditionSetType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $ClientApplicationIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ResourceApplication, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $ClientApplicationPublisherIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $PermissionClassification, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $PolicyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $PermissionType ) PROCESS { $params = @{} if($null -ne $PSBoundParameters["ClientApplicationTenantIds"]) { $params["ClientApplicationTenantIds"] = $PSBoundParameters["ClientApplicationTenantIds"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["ClientApplicationsFromVerifiedPublisherOnly"]) { $params["ClientApplicationsFromVerifiedPublisherOnly"] = $PSBoundParameters["ClientApplicationsFromVerifiedPublisherOnly"] } if($null -ne $PSBoundParameters["ClientApplicationPublisherIds"]) { $params["ClientApplicationPublisherIds"] = $PSBoundParameters["ClientApplicationPublisherIds"] } if($null -ne $PSBoundParameters["PermissionType"]) { $params["PermissionType"] = $PSBoundParameters["PermissionType"] } if($null -ne $PSBoundParameters["ConditionSetType"]) { $conditionalSet = $PSBoundParameters["ConditionSetType"] } if($null -ne $PSBoundParameters["Permissions"]) { $params["Permissions"] = $PSBoundParameters["Permissions"] } if($null -ne $PSBoundParameters["ClientApplicationIds"]) { $params["ClientApplicationIds"] = $PSBoundParameters["ClientApplicationIds"] } if($null -ne $PSBoundParameters["Id"]) { $params["PermissionGrantConditionSetId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["ResourceApplication"]) { $params["ResourceApplication"] = $PSBoundParameters["ResourceApplication"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["PermissionClassification"]) { $params["PermissionClassification"] = $PSBoundParameters["PermissionClassification"] } if($null -ne $PSBoundParameters["PolicyId"]) { $params["PermissionGrantPolicyId"] = $PSBoundParameters["PolicyId"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") if("$conditionalSet" -eq "includes"){ $response = Update-MgPolicyPermissionGrantPolicyInclude @params } elseif("$conditionalSet" -eq "excludes"){ $response = Update-MgPolicyPermissionGrantPolicyExclude @params } else{ Write-Error("Message: Resource not found for the segment '$conditionalSet'.") return } $response } } function Get-CompatADApplicationOwner { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgApplicationOwner @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADMSScopedRoleMembership { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ScopedRoleMembershipId ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["ScopedRoleMembershipId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["ScopedRoleMembershipId"]) { $params["ScopedRoleMembershipId"] = $PSBoundParameters["ScopedRoleMembershipId"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgUserScopedRoleMemberOf @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADMSApplication { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgApplication @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADUserExtension { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ExtensionName, [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionNameValues, [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ExtensionValue ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ExtensionName"]) { $params["ExtensionName"] = $PSBoundParameters["ExtensionName"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ExtensionId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["ExtensionNameValues"]) { $params["ExtensionNameValues"] = $PSBoundParameters["ExtensionNameValues"] } if($null -ne $PSBoundParameters["ExtensionValue"]) { $params["ExtensionValue"] = $PSBoundParameters["ExtensionValue"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgUserExtension @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADMSLifecyclePolicyGroup { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["GroupLifecyclePolicyId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgGroupLifecyclePolicy @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADUserManager { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["UserId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUserManager @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADServiceAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $ResourceId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $PrincipalId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ResourceId"]) { $params["ResourceId"] = $PSBoundParameters["ResourceId"] } if($null -ne $PSBoundParameters["Id"]) { $params["ServicePrincipalId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["PrincipalId"]) { $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgServicePrincipalAppRoleAssignment @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Add-CompatADApplicationOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $RefObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["RefObjectId"]) { $params["RefObjectId"] = $PSBoundParameters["RefObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgApplicationOwnerByRef @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADMSGroup { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["GroupId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgGroup @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADApplication { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgApplication @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADGroupAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $ResourceId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $PrincipalId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ResourceId"]) { $params["ResourceId"] = $PSBoundParameters["ResourceId"] } if($null -ne $PSBoundParameters["Id"]) { $params["GroupId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["GroupId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["PrincipalId"]) { $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgGroupAppRoleAssignment @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Add-CompatADDeviceRegisteredUser { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $RefObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"; RefObjectId = "BodyParameter"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DeviceId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["RefObjectId"]) { $TmpValue = $PSBoundParameters["RefObjectId"] $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} $params["BodyParameter"] = $Value } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgDeviceRegisteredUserByRef @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADTrustedCertificateAuthority { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][Microsoft.Open.AzureAD.Model.CertificateAuthorityInformation] $CertificateAuthorityInformation ) PROCESS { $params = @{} $params["Uri"] = "/v1.0/organization/6bb43237-958e-4721-8eaf-8515a3739156/certificateBasedAuthConfiguration" $params["Method"] = "POST" if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } $certNotFound = $true $modifiedCert = $PSBoundParameters["CertificateAuthorityInformation"] $previusCerts = @() Get-CompatADTrustedCertificateAuthority | ForEach-Object { if(($_.TrustedIssuer -eq $modifiedCert.TrustedIssuer) -and ($_.TrustedIssuerSki -eq $modifiedCert.TrustedIssuerSki)){ $previusCerts += $modifiedCert $certNotFound = $false } else{ $previusCerts += $_ } } if($certNotFound){ Throw [System.Management.Automation.PSArgumentException] "Provided certificate authority not found on the server. Please make sure you have provided the correct information in trustedIssuer and trustedIssuerSki fields." } $body = @{ certificateAuthorities = @() } $previusCerts | ForEach-Object { $isRoot = $false if("RootAuthority" -eq $_.AuthorityType){ $isRoot = $true } $cert = @{ isRootAuthority = $isRoot certificateRevocationListUrl = $_.CrlDistributionPoint deltaCertificateRevocationListUrl = $_.DeltaCrlDistributionPoint certificate = [convert]::tobase64string($_.TrustedCertificate) } $body.certificateAuthorities += $cert } $params["Body"] = ConvertTo-Json $body Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") Invoke-GraphRequest @params } } function Remove-CompatADOAuth2PermissionGrant { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["OAuth2PermissionGrantId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgOAuth2PermissionGrant @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADUserOwnedDevice { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUserOwnedDevice @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADGroup { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["GroupId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgGroup @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADUserLicense { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][Microsoft.Open.AzureAD.Model.AssignedLicenses] $AssignedLicenses ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["UserId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["AssignedLicenses"]) { $params["AssignedLicenses"] = $PSBoundParameters["AssignedLicenses"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Set-MgUserLicense @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADMSApplicationVerifiedPublisher { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $AppObjectId ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["AppObjectId"]) { $params["AppObjectId"] = $PSBoundParameters["AppObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Clear-MgApplicationVerifiedPublisher @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADMSPermissionGrantConditionSet { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $Permissions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $ClientApplicationTenantIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $ClientApplicationsFromVerifiedPublisherOnly, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ConditionSetType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $ClientApplicationIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ResourceApplication, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $ClientApplicationPublisherIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $PermissionClassification, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $PolicyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $PermissionType ) PROCESS { $params = @{} if($null -ne $PSBoundParameters["PermissionType"]) { $params["PermissionType"] = $PSBoundParameters["PermissionType"] } if($null -ne $PSBoundParameters["PermissionClassification"]) { $params["PermissionClassification"] = $PSBoundParameters["PermissionClassification"] } if($null -ne $PSBoundParameters["ResourceApplication"]) { $params["ResourceApplication"] = $PSBoundParameters["ResourceApplication"] } if($null -ne $PSBoundParameters["Permissions"]) { $params["Permissions"] = $PSBoundParameters["Permissions"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ClientApplicationTenantIds"]) { $params["ClientApplicationTenantIds"] = $PSBoundParameters["ClientApplicationTenantIds"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["PolicyId"]) { $params["PermissionGrantPolicyId"] = $PSBoundParameters["PolicyId"] } if($null -ne $PSBoundParameters["ConditionSetType"]) { $conditionalSet = $PSBoundParameters["ConditionSetType"] } if($null -ne $PSBoundParameters["ClientApplicationsFromVerifiedPublisherOnly"]) { $params["ClientApplicationsFromVerifiedPublisherOnly"] = $PSBoundParameters["ClientApplicationsFromVerifiedPublisherOnly"] } if($null -ne $PSBoundParameters["ClientApplicationPublisherIds"]) { $params["ClientApplicationPublisherIds"] = $PSBoundParameters["ClientApplicationPublisherIds"] } if($null -ne $PSBoundParameters["ClientApplicationIds"]) { $params["ClientApplicationIds"] = $PSBoundParameters["ClientApplicationIds"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") if("$conditionalSet" -eq "includes"){ $response = New-MgPolicyPermissionGrantPolicyInclude @params } elseif("$conditionalSet" -eq "excludes"){ $response = New-MgPolicyPermissionGrantPolicyExclude @params } else{ Write-Error("Message: Resource not found for the segment '$conditionalSet'.") return } $response } } function Remove-CompatADUserExtension { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Collections.Generic.List`1[System.String]] $ExtensionNames, [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ExtensionName ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ExtensionId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["ExtensionNames"]) { $params["ExtensionNames"] = $PSBoundParameters["ExtensionNames"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["ExtensionName"]) { $params["ExtensionName"] = $PSBoundParameters["ExtensionName"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgUserExtension @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADMSApplicationKey { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][Microsoft.Open.MSGraph.Model.KeyCredential] $KeyCredential, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.PasswordCredential] $PasswordCredential, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $Proof ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["KeyCredential"]) { $params["KeyCredential"] = $PSBoundParameters["KeyCredential"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["PasswordCredential"]) { $params["PasswordCredential"] = $PSBoundParameters["PasswordCredential"] } if($null -ne $PSBoundParameters["Proof"]) { $params["Proof"] = $PSBoundParameters["Proof"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Add-MgApplicationKey @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADServicePrincipalMembership { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgServicePrincipalTransitiveMemberOf @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADMSApplicationPassword { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][Microsoft.Open.MSGraph.Model.PasswordCredential] $PasswordCredential ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["PasswordCredential"]) { $params["PasswordCredential"] = $PSBoundParameters["PasswordCredential"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Add-MgApplicationPassword @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADDomainVerificationDnsRecord { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Name ) PROCESS { $params = @{} $keysChanged = @{Name = "DomainId"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Name"]) { $params["DomainId"] = $PSBoundParameters["Name"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDomainVerificationDnsRecord @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADGroupAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $AppRoleAssignmentId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["AppRoleAssignmentId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["AppRoleAssignmentId"]) { $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgGroupAppRoleAssignment @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADApplicationPasswordCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) (Get-MgApplication -ApplicationId $PSBoundParameters["ObjectId"]).PasswordCredentials } function New-CompatADDevice { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.Nullable`1[System.Boolean]] $AccountEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $DevicePhysicalIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Int32]] $DeviceObjectVersion, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.DateTime]] $ApproximateLastLogonTimeStamp, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ProfileType, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId]] $AlternativeSecurityIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $DeviceOSVersion, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $DeviceOSType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DeviceTrustType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsManaged, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $SystemLabels, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DeviceMetadata, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $DeviceId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsCompliant ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["AccountEnabled"]) { $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] } if($null -ne $PSBoundParameters["DevicePhysicalIds"]) { $params["DevicePhysicalIds"] = $PSBoundParameters["DevicePhysicalIds"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["DeviceObjectVersion"]) { $params["DeviceObjectVersion"] = $PSBoundParameters["DeviceObjectVersion"] } if($null -ne $PSBoundParameters["ApproximateLastLogonTimeStamp"]) { $params["ApproximateLastLogonTimeStamp"] = $PSBoundParameters["ApproximateLastLogonTimeStamp"] } if($null -ne $PSBoundParameters["ProfileType"]) { $params["ProfileType"] = $PSBoundParameters["ProfileType"] } if($null -ne $PSBoundParameters["AlternativeSecurityIds"]) { $params["AlternativeSecurityIds"] = $PSBoundParameters["AlternativeSecurityIds"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["DeviceOSVersion"]) { $params["DeviceOSVersion"] = $PSBoundParameters["DeviceOSVersion"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if($null -ne $PSBoundParameters["DeviceOSType"]) { $params["DeviceOSType"] = $PSBoundParameters["DeviceOSType"] } if($null -ne $PSBoundParameters["DeviceTrustType"]) { $params["DeviceTrustType"] = $PSBoundParameters["DeviceTrustType"] } if($null -ne $PSBoundParameters["IsManaged"]) { $params["IsManaged"] = $PSBoundParameters["IsManaged"] } if($null -ne $PSBoundParameters["SystemLabels"]) { $params["SystemLabels"] = $PSBoundParameters["SystemLabels"] } if($null -ne $PSBoundParameters["DeviceMetadata"]) { $params["DeviceMetadata"] = $PSBoundParameters["DeviceMetadata"] } if($null -ne $PSBoundParameters["DeviceId"]) { $params["DeviceId"] = $PSBoundParameters["DeviceId"] } if($null -ne $PSBoundParameters["IsCompliant"]) { $params["IsCompliant"] = $PSBoundParameters["IsCompliant"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgDevice @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADDirectoryRoleTemplate { [CmdletBinding(DefaultParameterSetName = '')] param ( ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDirectoryRoleTemplate @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADUserPassword { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Security.SecureString] $Password, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Boolean] $ForceChangePasswordNextLogin, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Boolean] $EnforceChangePasswordPolicy ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["UserId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Password"]) { $params["Password"] = $PSBoundParameters["Password"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["ForceChangePasswordNextLogin"]) { $params["ForceChangePasswordNextLogin"] = $PSBoundParameters["ForceChangePasswordNextLogin"] } if($null -ne $PSBoundParameters["EnforceChangePasswordPolicy"]) { $params["EnforceChangePasswordPolicy"] = $PSBoundParameters["EnforceChangePasswordPolicy"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgUserPassword @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADGroupOwner { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["GroupId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgGroupOwner @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADMSPermissionGrantPolicy { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgPolicyPermissionGrantPolicy @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADMSApplicationExtensionProperty { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ExtensionPropertyId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["ExtensionPropertyId"]) { $params["ExtensionPropertyId"] = $PSBoundParameters["ExtensionPropertyId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgApplicationExtensionProperty @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADMSApplicationExtensionProperty { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DataType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Name, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $TargetObjects ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["DataType"]) { $params["DataType"] = $PSBoundParameters["DataType"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Name"]) { $params["Name"] = $PSBoundParameters["Name"] } if($null -ne $PSBoundParameters["TargetObjects"]) { $params["TargetObjects"] = $PSBoundParameters["TargetObjects"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgApplicationExtensionProperty @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADDomainServiceConfigurationRecord { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Name ) PROCESS { $params = @{} $keysChanged = @{Name = "DomainId"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Name"]) { $params["DomainId"] = $PSBoundParameters["Name"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDomainServiceConfigurationRecord @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Restore-CompatADMSDeletedDirectoryObject { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["DirectoryObjectId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Restore-MgDirectoryDeletedItem @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADMSPermissionGrantPolicy { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgPolicyPermissionGrantPolicy @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADMSConditionalAccessPolicy { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $PolicyId ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["PolicyId"]) { $params["PolicyId"] = $PSBoundParameters["PolicyId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgIdentityConditionalAccessPolicy @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADUserRegisteredDevice { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUserRegisteredDevice @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADContract { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["ContractId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgContract @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADMSApplicationLogo { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Byte[]] $Content ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["Content"]) { $params["Content"] = $PSBoundParameters["Content"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Set-MgApplicationLogo @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Add-CompatADMSScopedRoleMembership { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $AdministrativeUnitId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.MsRoleMemberInfo] $RoleMemberInfo, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $RoleId ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["AdministrativeUnitId"]) { $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] } if($null -ne $PSBoundParameters["Id"]) { $params["DirectoryRoleId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["RoleMemberInfo"]) { $params["RoleMemberInfo"] = $PSBoundParameters["RoleMemberInfo"] } if($null -ne $PSBoundParameters["RoleId"]) { $params["RoleId"] = $PSBoundParameters["RoleId"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgDirectoryRoleScopedMember @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADMSRoleDefinition { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.Nullable`1[System.Boolean]] $IsEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Version, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $ResourceScopes, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission]] $RolePermissions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $TemplateId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $DisplayName ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["IsEnabled"]) { $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] } if($null -ne $PSBoundParameters["Description"]) { $params["Description"] = $PSBoundParameters["Description"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Version"]) { $params["Version"] = $PSBoundParameters["Version"] } if($null -ne $PSBoundParameters["ResourceScopes"]) { $params["ResourceScopes"] = $PSBoundParameters["ResourceScopes"] } if($null -ne $PSBoundParameters["RolePermissions"]) { $params["RolePermissions"] = $PSBoundParameters["RolePermissions"] } if($null -ne $PSBoundParameters["TemplateId"]) { $params["TemplateId"] = $PSBoundParameters["TemplateId"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgRoleManagementDirectoryRoleDefinition @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADTrustedCertificateAuthority { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][Microsoft.Open.AzureAD.Model.CertificateAuthorityInformation] $CertificateAuthorityInformation ) PROCESS { $params = @{} $params["Uri"] = "/v1.0/organization/6bb43237-958e-4721-8eaf-8515a3739156/certificateBasedAuthConfiguration" $params["Method"] = "POST" if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } $newCert = $PSBoundParameters["CertificateAuthorityInformation"] $previusCerts = @() Get-CompatADTrustedCertificateAuthority | ForEach-Object { $previusCerts += $_ if(($_.TrustedIssuer -eq $newCert.TrustedIssuer) -and ($_.TrustedIssuerSki -eq $newCert.TrustedIssuerSki)){ Throw [System.Management.Automation.PSArgumentException] "A certificate already exists on the server with associated trustedIssuer and trustedIssuerSki fields." } } $previusCerts += $newCert $body = @{ certificateAuthorities = @() } $previusCerts | ForEach-Object { $isRoot = $false if("RootAuthority" -eq $_.AuthorityType){ $isRoot = $true } $cert = @{ isRootAuthority = $isRoot certificateRevocationListUrl = $_.CrlDistributionPoint deltaCertificateRevocationListUrl = $_.DeltaCrlDistributionPoint certificate = [convert]::tobase64string($_.TrustedCertificate) } $body.certificateAuthorities += $cert } $params["Body"] = ConvertTo-Json $body Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") Invoke-GraphRequest @params } } function Set-CompatADUser { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $PostalCode, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $MailNickName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $ShowInAddressList, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Department, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Mobile, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $JobTitle, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ConsentProvidedForMinor, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $PhysicalDeliveryOfficeName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $OtherMails, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $PasswordPolicies, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsCompromised, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName]] $SignInNames, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $PreferredLanguage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $UserState, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ImmutableId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $City, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $AgeGroup, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionProperty, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $UsageLocation, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $State, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $AccountEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Country, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $UserPrincipalName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $GivenName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.AzureAD.Model.PasswordProfile] $PasswordProfile, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $UserType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $StreetAddress, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $CompanyName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $FacsimileTelephoneNumber, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Surname, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $TelephoneNumber, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $CreationType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $UserStateChangedOn ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["PostalCode"]) { $params["PostalCode"] = $PSBoundParameters["PostalCode"] } if($null -ne $PSBoundParameters["MailNickName"]) { $params["MailNickName"] = $PSBoundParameters["MailNickName"] } if($null -ne $PSBoundParameters["ShowInAddressList"]) { $params["ShowInAddressList"] = $PSBoundParameters["ShowInAddressList"] } if($null -ne $PSBoundParameters["Department"]) { $params["Department"] = $PSBoundParameters["Department"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if($null -ne $PSBoundParameters["Mobile"]) { $params["Mobile"] = $PSBoundParameters["Mobile"] } if($null -ne $PSBoundParameters["JobTitle"]) { $params["JobTitle"] = $PSBoundParameters["JobTitle"] } if($null -ne $PSBoundParameters["ConsentProvidedForMinor"]) { $params["ConsentProvidedForMinor"] = $PSBoundParameters["ConsentProvidedForMinor"] } if($null -ne $PSBoundParameters["PhysicalDeliveryOfficeName"]) { $params["PhysicalDeliveryOfficeName"] = $PSBoundParameters["PhysicalDeliveryOfficeName"] } if($null -ne $PSBoundParameters["OtherMails"]) { $params["OtherMails"] = $PSBoundParameters["OtherMails"] } if($null -ne $PSBoundParameters["PasswordPolicies"]) { $params["PasswordPolicies"] = $PSBoundParameters["PasswordPolicies"] } if($null -ne $PSBoundParameters["IsCompromised"]) { $params["IsCompromised"] = $PSBoundParameters["IsCompromised"] } if($null -ne $PSBoundParameters["SignInNames"]) { $params["SignInNames"] = $PSBoundParameters["SignInNames"] } if($null -ne $PSBoundParameters["PreferredLanguage"]) { $params["PreferredLanguage"] = $PSBoundParameters["PreferredLanguage"] } if($null -ne $PSBoundParameters["UserState"]) { $params["UserState"] = $PSBoundParameters["UserState"] } if($null -ne $PSBoundParameters["ImmutableId"]) { $params["ImmutableId"] = $PSBoundParameters["ImmutableId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["City"]) { $params["City"] = $PSBoundParameters["City"] } if($null -ne $PSBoundParameters["AgeGroup"]) { $params["AgeGroup"] = $PSBoundParameters["AgeGroup"] } if($null -ne $PSBoundParameters["ExtensionProperty"]) { $params["ExtensionProperty"] = $PSBoundParameters["ExtensionProperty"] } if($null -ne $PSBoundParameters["UsageLocation"]) { $params["UsageLocation"] = $PSBoundParameters["UsageLocation"] } if($null -ne $PSBoundParameters["State"]) { $params["State"] = $PSBoundParameters["State"] } if($null -ne $PSBoundParameters["AccountEnabled"]) { $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] } if($null -ne $PSBoundParameters["Country"]) { $params["Country"] = $PSBoundParameters["Country"] } if($null -ne $PSBoundParameters["UserPrincipalName"]) { $params["UserPrincipalName"] = $PSBoundParameters["UserPrincipalName"] } if($null -ne $PSBoundParameters["GivenName"]) { $params["GivenName"] = $PSBoundParameters["GivenName"] } if($null -ne $PSBoundParameters["PasswordProfile"]) { $params["PasswordProfile"] = $PSBoundParameters["PasswordProfile"] } if($null -ne $PSBoundParameters["UserType"]) { $params["UserType"] = $PSBoundParameters["UserType"] } if($null -ne $PSBoundParameters["StreetAddress"]) { $params["StreetAddress"] = $PSBoundParameters["StreetAddress"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["UserId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["CompanyName"]) { $params["CompanyName"] = $PSBoundParameters["CompanyName"] } if($null -ne $PSBoundParameters["FacsimileTelephoneNumber"]) { $params["FacsimileTelephoneNumber"] = $PSBoundParameters["FacsimileTelephoneNumber"] } if($null -ne $PSBoundParameters["Surname"]) { $params["Surname"] = $PSBoundParameters["Surname"] } if($null -ne $PSBoundParameters["TelephoneNumber"]) { $params["TelephoneNumber"] = $PSBoundParameters["TelephoneNumber"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["CreationType"]) { $params["CreationType"] = $PSBoundParameters["CreationType"] } if($null -ne $PSBoundParameters["UserStateChangedOn"]) { $params["UserStateChangedOn"] = $PSBoundParameters["UserStateChangedOn"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgUser @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADUserDirectReport { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUserDirectReport @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADDirectoryRoleMember { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $MemberId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryRoleId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["MemberId"]) { $params["MemberId"] = $PSBoundParameters["MemberId"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgDirectoryRoleScopedMember @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADApplicationOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $OwnerId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{OwnerId = "DirectoryObjectId"; ObjectId = "Id"} if($null -ne $PSBoundParameters["OwnerId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgApplicationOwnerByRef @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADDomain { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsDefault, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $SupportedServices, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Name, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsDefaultForCloudRedirections ) PROCESS { $params = @{} $keysChanged = @{Name = "DomainId"} if($null -ne $PSBoundParameters["IsDefault"]) { $params["IsDefault"] = $PSBoundParameters["IsDefault"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["SupportedServices"]) { $params["SupportedServices"] = $PSBoundParameters["SupportedServices"] } if($null -ne $PSBoundParameters["Name"]) { $params["DomainId"] = $PSBoundParameters["Name"] } if($null -ne $PSBoundParameters["IsDefaultForCloudRedirections"]) { $params["IsDefaultForCloudRedirections"] = $PSBoundParameters["IsDefaultForCloudRedirections"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgDomain @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADMSNamedLocationPolicy { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $PolicyId ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["PolicyId"]) { $params["PolicyId"] = $PSBoundParameters["PolicyId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgIdentityConditionalAccessNamedLocation @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADMSApplication { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.ApiApplication] $Api, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.OptionalClaims] $OptionalClaims, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $Tags, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.WebApplication] $Web, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsFallbackPublicClient, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess]] $RequiredResourceAccess, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.PublicClientApplication] $PublicClient, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsDeviceOnlyAuthSupported, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $TokenEncryptionKeyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $IdentifierUris, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.ParentalControlSettings] $ParentalControlSettings, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $GroupMembershipClaims, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn]] $AddIns, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole]] $AppRoles, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential]] $PasswordCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $SignInAudience, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.InformationalUrl] $InformationalUrl ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["Api"]) { $params["Api"] = $PSBoundParameters["Api"] } if($null -ne $PSBoundParameters["OptionalClaims"]) { $params["OptionalClaims"] = $PSBoundParameters["OptionalClaims"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if($null -ne $PSBoundParameters["Tags"]) { $params["Tags"] = $PSBoundParameters["Tags"] } if($null -ne $PSBoundParameters["Web"]) { $params["Web"] = $PSBoundParameters["Web"] } if($null -ne $PSBoundParameters["IsFallbackPublicClient"]) { $params["IsFallbackPublicClient"] = $PSBoundParameters["IsFallbackPublicClient"] } if($null -ne $PSBoundParameters["RequiredResourceAccess"]) { $params["RequiredResourceAccess"] = $PSBoundParameters["RequiredResourceAccess"] } if($null -ne $PSBoundParameters["PublicClient"]) { $params["PublicClient"] = $PSBoundParameters["PublicClient"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["IsDeviceOnlyAuthSupported"]) { $params["IsDeviceOnlyAuthSupported"] = $PSBoundParameters["IsDeviceOnlyAuthSupported"] } if($null -ne $PSBoundParameters["KeyCredentials"]) { $params["KeyCredentials"] = $PSBoundParameters["KeyCredentials"] } if($null -ne $PSBoundParameters["TokenEncryptionKeyId"]) { $params["TokenEncryptionKeyId"] = $PSBoundParameters["TokenEncryptionKeyId"] } if($null -ne $PSBoundParameters["IdentifierUris"]) { $params["IdentifierUris"] = $PSBoundParameters["IdentifierUris"] } if($null -ne $PSBoundParameters["ParentalControlSettings"]) { $params["ParentalControlSettings"] = $PSBoundParameters["ParentalControlSettings"] } if($null -ne $PSBoundParameters["GroupMembershipClaims"]) { $params["GroupMembershipClaims"] = $PSBoundParameters["GroupMembershipClaims"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["AddIns"]) { $params["AddIns"] = $PSBoundParameters["AddIns"] } if($null -ne $PSBoundParameters["AppRoles"]) { $params["AppRoles"] = $PSBoundParameters["AppRoles"] } if($null -ne $PSBoundParameters["PasswordCredentials"]) { $params["PasswordCredentials"] = $PSBoundParameters["PasswordCredentials"] } if($null -ne $PSBoundParameters["SignInAudience"]) { $params["SignInAudience"] = $PSBoundParameters["SignInAudience"] } if($null -ne $PSBoundParameters["InformationalUrl"]) { $params["InformationalUrl"] = $PSBoundParameters["InformationalUrl"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgApplication @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADMSApplicationOwner { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgApplicationOwner @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADApplication { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AddIn]] $AddIns, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $SignInAudience, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $Oauth2AllowImplicitFlow, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $ReplyUrls, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsDisabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $AllowGuestsSignIn, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $KnownClientApplications, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $PublisherDomain, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $OrgRestrictions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.AzureAD.Model.ParentalControlSettings] $ParentalControlSettings, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.AzureAD.Model.OptionalClaims] $OptionalClaims, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $Oauth2AllowUrlPathMatching, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential]] $KeyCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $WwwHomepage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $IdentifierUris, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $GroupMembershipClaims, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.OAuth2Permission]] $Oauth2Permissions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $LogoutUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ErrorUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $SamlMetadataUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsDeviceOnlyAuthSupported, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PreAuthorizedApplication]] $PreAuthorizedApplications, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $Oauth2RequirePostResponse, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $AllowPassthroughUsers, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.RequiredResourceAccess]] $RequiredResourceAccess, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $PublicClient, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $AvailableToOtherTenants, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $RecordConsentConditions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $AppLogoUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential]] $PasswordCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Homepage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AppRole]] $AppRoles, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.AzureAD.Model.InformationalUrl] $InformationalUrls ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["AddIns"]) { $params["AddIns"] = $PSBoundParameters["AddIns"] } if($null -ne $PSBoundParameters["SignInAudience"]) { $params["SignInAudience"] = $PSBoundParameters["SignInAudience"] } if($null -ne $PSBoundParameters["Oauth2AllowImplicitFlow"]) { $params["Oauth2AllowImplicitFlow"] = $PSBoundParameters["Oauth2AllowImplicitFlow"] } if($null -ne $PSBoundParameters["ReplyUrls"]) { $params["ReplyUrls"] = $PSBoundParameters["ReplyUrls"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if($null -ne $PSBoundParameters["IsDisabled"]) { $params["IsDisabled"] = $PSBoundParameters["IsDisabled"] } if($null -ne $PSBoundParameters["AllowGuestsSignIn"]) { $params["AllowGuestsSignIn"] = $PSBoundParameters["AllowGuestsSignIn"] } if($null -ne $PSBoundParameters["KnownClientApplications"]) { $params["KnownClientApplications"] = $PSBoundParameters["KnownClientApplications"] } if($null -ne $PSBoundParameters["PublisherDomain"]) { $params["PublisherDomain"] = $PSBoundParameters["PublisherDomain"] } if($null -ne $PSBoundParameters["OrgRestrictions"]) { $params["OrgRestrictions"] = $PSBoundParameters["OrgRestrictions"] } if($null -ne $PSBoundParameters["ParentalControlSettings"]) { $params["ParentalControlSettings"] = $PSBoundParameters["ParentalControlSettings"] } if($null -ne $PSBoundParameters["OptionalClaims"]) { $params["OptionalClaims"] = $PSBoundParameters["OptionalClaims"] } if($null -ne $PSBoundParameters["Oauth2AllowUrlPathMatching"]) { $params["Oauth2AllowUrlPathMatching"] = $PSBoundParameters["Oauth2AllowUrlPathMatching"] } if($null -ne $PSBoundParameters["KeyCredentials"]) { $params["KeyCredentials"] = $PSBoundParameters["KeyCredentials"] } if($null -ne $PSBoundParameters["WwwHomepage"]) { $params["WwwHomepage"] = $PSBoundParameters["WwwHomepage"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["IdentifierUris"]) { $params["IdentifierUris"] = $PSBoundParameters["IdentifierUris"] } if($null -ne $PSBoundParameters["GroupMembershipClaims"]) { $params["GroupMembershipClaims"] = $PSBoundParameters["GroupMembershipClaims"] } if($null -ne $PSBoundParameters["Oauth2Permissions"]) { $params["Oauth2Permissions"] = $PSBoundParameters["Oauth2Permissions"] } if($null -ne $PSBoundParameters["LogoutUrl"]) { $params["LogoutUrl"] = $PSBoundParameters["LogoutUrl"] } if($null -ne $PSBoundParameters["ErrorUrl"]) { $params["ErrorUrl"] = $PSBoundParameters["ErrorUrl"] } if($null -ne $PSBoundParameters["SamlMetadataUrl"]) { $params["SamlMetadataUrl"] = $PSBoundParameters["SamlMetadataUrl"] } if($null -ne $PSBoundParameters["IsDeviceOnlyAuthSupported"]) { $params["IsDeviceOnlyAuthSupported"] = $PSBoundParameters["IsDeviceOnlyAuthSupported"] } if($null -ne $PSBoundParameters["PreAuthorizedApplications"]) { $params["PreAuthorizedApplications"] = $PSBoundParameters["PreAuthorizedApplications"] } if($null -ne $PSBoundParameters["Oauth2RequirePostResponse"]) { $params["Oauth2RequirePostResponse"] = $PSBoundParameters["Oauth2RequirePostResponse"] } if($null -ne $PSBoundParameters["AllowPassthroughUsers"]) { $params["AllowPassthroughUsers"] = $PSBoundParameters["AllowPassthroughUsers"] } if($null -ne $PSBoundParameters["RequiredResourceAccess"]) { $params["RequiredResourceAccess"] = $PSBoundParameters["RequiredResourceAccess"] } if($null -ne $PSBoundParameters["PublicClient"]) { $params["PublicClient"] = $PSBoundParameters["PublicClient"] } if($null -ne $PSBoundParameters["AvailableToOtherTenants"]) { $params["AvailableToOtherTenants"] = $PSBoundParameters["AvailableToOtherTenants"] } if($null -ne $PSBoundParameters["RecordConsentConditions"]) { $params["RecordConsentConditions"] = $PSBoundParameters["RecordConsentConditions"] } if($null -ne $PSBoundParameters["AppLogoUrl"]) { $params["AppLogoUrl"] = $PSBoundParameters["AppLogoUrl"] } if($null -ne $PSBoundParameters["PasswordCredentials"]) { $params["PasswordCredentials"] = $PSBoundParameters["PasswordCredentials"] } if($null -ne $PSBoundParameters["Homepage"]) { $params["Homepage"] = $PSBoundParameters["Homepage"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["AppRoles"]) { $params["AppRoles"] = $PSBoundParameters["AppRoles"] } if($null -ne $PSBoundParameters["InformationalUrls"]) { $params["InformationalUrls"] = $PSBoundParameters["InformationalUrls"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgApplication @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADDevice { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $SearchString, [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{SearchString = "Filter"; ObjectId = "Id"} if($null -ne $PSBoundParameters["SearchString"]) { $TmpValue = $PSBoundParameters["SearchString"] $Value = "displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')" $params["Filter"] = $Value } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DeviceId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDevice @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADUser { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $SearchString, [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{SearchString = "Filter"; ObjectId = "Id"} if($null -ne $PSBoundParameters["SearchString"]) { $TmpValue = $PSBoundParameters["SearchString"] $Value = "userPrincipalName eq '$TmpValue' or (state eq '$TmpValue' or (mailNickName eq '$TmpValue' or (mail eq '$TmpValue' or (jobTitle eq '$TmpValue' or (displayName eq '$TmpValue' or (startswith(displayName,'$TmpValue') or (department eq '$TmpValue' or (country eq '$TmpValue' or city eq '$TmpValue'))))))))" $params["Filter"] = $Value } if($null -ne $PSBoundParameters["ObjectId"]) { $params["UserId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUser @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADServicePrincipalPasswordCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.DateTime]] $EndDate, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Value, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.DateTime]] $StartDate, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $CustomKeyIdentifier ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["EndDate"]) { $params["EndDate"] = $PSBoundParameters["EndDate"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Value"]) { $params["Value"] = $PSBoundParameters["Value"] } if($null -ne $PSBoundParameters["StartDate"]) { $params["StartDate"] = $PSBoundParameters["StartDate"] } if($null -ne $PSBoundParameters["CustomKeyIdentifier"]) { $params["CustomKeyIdentifier"] = $PSBoundParameters["CustomKeyIdentifier"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Add-MgServicePrincipalPassword @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADMSApplicationExtensionProperty { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgApplicationExtensionProperty @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADMSGroupLifecyclePolicy { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["GroupLifecyclePolicyId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgGroupLifecyclePolicy @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADCurrentSessionInfo { [CmdletBinding(DefaultParameterSetName = '')] param ( ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Confirm"]) { $params["Confirm"] = $PSBoundParameters["Confirm"] } if($null -ne $PSBoundParameters["WhatIf"]) { $params["WhatIf"] = $PSBoundParameters["WhatIf"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgContext @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADMSGroup { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $SearchString, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{SearchString = "Filter"} if($null -ne $PSBoundParameters["Id"]) { $params["GroupId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($null -ne $PSBoundParameters["SearchString"]) { $TmpValue = $PSBoundParameters["SearchString"] $Value = "mailNickName eq '$TmpValue' or (mail eq '$TmpValue' or (displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')))" $params["Filter"] = $Value } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgGroup @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADDeviceRegisteredOwner { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DeviceId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDeviceRegisteredOwner @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADMSNamedLocationPolicy { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $PolicyId ) PROCESS { $params = @{} $keysChanged = @{PolicyId = "NamedLocationId"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["PolicyId"]) { $params["NamedLocationId"] = $PSBoundParameters["PolicyId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgIdentityConditionalAccessNamedLocation @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADMSAdministrativeUnit { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $DisplayName ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Description"]) { $params["Description"] = $PSBoundParameters["Description"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgDirectoryAdministrativeUnit @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADDeletedApplication { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgDirectoryDeletedItem @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Select-CompatADGroupIdsContactIsMemberOf { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["GroupIdsForMembershipCheck"]) { $params["GroupIdsForMembershipCheck"] = $PSBoundParameters["GroupIdsForMembershipCheck"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgContactMemberOf @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Add-CompatADMSAdministrativeUnitMember { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $RefObjectId ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["AdministrativeUnitId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["RefObjectId"]) { $params["RefObjectId"] = $PSBoundParameters["RefObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgDirectoryAdministrativeUnitMemberByRef @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADServicePrincipalPasswordCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $KeyId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["KeyId"]) { $params["KeyId"] = $PSBoundParameters["KeyId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgServicePrincipalPassword @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADObjectByObjectId { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $Types, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.Collections.Generic.List`1[System.String]] $ObjectIds ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Types"]) { $params["Types"] = $PSBoundParameters["Types"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectIds"]) { $params["ObjectIds"] = $PSBoundParameters["ObjectIds"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDirectoryObjectById @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADContact { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["OrgContactId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgContact @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADServiceAppRoleAssignedTo { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["AppRoleAssignmentId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgServicePrincipalAppRoleAssignedTo @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADDeviceRegisteredOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $OwnerId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{OwnerId = "DirectoryObjectId"; ObjectId = "Id"} if($null -ne $PSBoundParameters["OwnerId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DeviceId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgDeviceRegisteredOwnerByRef @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADMSPermissionGrantPolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Description"]) { $params["Description"] = $PSBoundParameters["Description"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["Id"] = $PSBoundParameters["Id"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgPolicyPermissionGrantPolicy @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADServicePrincipal { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $AccountEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $Tags, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $AlternativeNames, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $AppId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ErrorUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential]] $KeyCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $ReplyUrls, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $LogoutUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $SamlMetadataUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ServicePrincipalType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Homepage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $AppRoleAssignmentRequired, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential]] $PasswordCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $PublisherName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $ServicePrincipalNames ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["AccountEnabled"]) { $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] } if($null -ne $PSBoundParameters["Tags"]) { $params["Tags"] = $PSBoundParameters["Tags"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if($null -ne $PSBoundParameters["AlternativeNames"]) { $params["AlternativeNames"] = $PSBoundParameters["AlternativeNames"] } if($null -ne $PSBoundParameters["AppId"]) { $params["AppId"] = $PSBoundParameters["AppId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["ErrorUrl"]) { $params["ErrorUrl"] = $PSBoundParameters["ErrorUrl"] } if($null -ne $PSBoundParameters["KeyCredentials"]) { $params["KeyCredentials"] = $PSBoundParameters["KeyCredentials"] } if($null -ne $PSBoundParameters["ReplyUrls"]) { $params["ReplyUrls"] = $PSBoundParameters["ReplyUrls"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["LogoutUrl"]) { $params["LogoutUrl"] = $PSBoundParameters["LogoutUrl"] } if($null -ne $PSBoundParameters["SamlMetadataUrl"]) { $params["SamlMetadataUrl"] = $PSBoundParameters["SamlMetadataUrl"] } if($null -ne $PSBoundParameters["ServicePrincipalType"]) { $params["ServicePrincipalType"] = $PSBoundParameters["ServicePrincipalType"] } if($null -ne $PSBoundParameters["Homepage"]) { $params["Homepage"] = $PSBoundParameters["Homepage"] } if($null -ne $PSBoundParameters["AppRoleAssignmentRequired"]) { $params["AppRoleAssignmentRequired"] = $PSBoundParameters["AppRoleAssignmentRequired"] } if($null -ne $PSBoundParameters["PasswordCredentials"]) { $params["PasswordCredentials"] = $PSBoundParameters["PasswordCredentials"] } if($null -ne $PSBoundParameters["PublisherName"]) { $params["PublisherName"] = $PSBoundParameters["PublisherName"] } if($null -ne $PSBoundParameters["ServicePrincipalNames"]) { $params["ServicePrincipalNames"] = $PSBoundParameters["ServicePrincipalNames"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgServicePrincipal @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADMSPermissionGrantConditionSet { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ConditionSetType, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $PolicyId ) PROCESS { $params = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ConditionSetType"]) { $conditionalSet = $PSBoundParameters["ConditionSetType"] } if($null -ne $PSBoundParameters["PolicyId"]) { $params["PermissionGrantPolicyId"] = $PSBoundParameters["PolicyId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["PermissionGrantConditionSetId"] = $PSBoundParameters["Id"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") if("$conditionalSet" -eq "includes"){ $response = Remove-MgPolicyPermissionGrantPolicyInclude @params } elseif("$conditionalSet" -eq "excludes"){ $response = Remove-MgPolicyPermissionGrantPolicyExclude @params } else{ Write-Error("Message: Resource not found for the segment '$conditionalSet'.") return } $response } } function Get-CompatADServicePrincipalPasswordCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) (Get-MgServicePrincipal ServicePrincipalId $PSBoundParameters["ObjectId"]).PasswordCredentials } function Get-CompatADDirectoryRoleMember { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryRoleId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDirectoryRoleMember @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADMSGroupLifecyclePolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $AlternateNotificationEmails, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $ManagedGroupTypes, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.Nullable`1[System.Int32]] $GroupLifetimeInDays ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["AlternateNotificationEmails"]) { $params["AlternateNotificationEmails"] = $PSBoundParameters["AlternateNotificationEmails"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ManagedGroupTypes"]) { $params["ManagedGroupTypes"] = $PSBoundParameters["ManagedGroupTypes"] } if($null -ne $PSBoundParameters["GroupLifetimeInDays"]) { $params["GroupLifetimeInDays"] = $PSBoundParameters["GroupLifetimeInDays"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgGroupLifecyclePolicy @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADMSScopedRoleMembership { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ScopedRoleMembershipId ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["ScopedRoleMembershipId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["ScopedRoleMembershipId"]) { $params["ScopedRoleMembershipId"] = $PSBoundParameters["ScopedRoleMembershipId"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUserScopedRoleMemberOf @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADMSConditionalAccessPolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls] $SessionControls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $State, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls] $GrantControls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet] $Conditions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["Id"]) { $params["Id"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["SessionControls"]) { $params["SessionControls"] = $PSBoundParameters["SessionControls"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["State"]) { $params["State"] = $PSBoundParameters["State"] } if($null -ne $PSBoundParameters["GrantControls"]) { $params["GrantControls"] = $PSBoundParameters["GrantControls"] } if($null -ne $PSBoundParameters["Conditions"]) { $params["Conditions"] = $PSBoundParameters["Conditions"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgIdentityConditionalAccessPolicy @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADUserManager { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["UserId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgUserManagerByRef @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADServicePrincipal { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $AccountEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $Tags, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $AlternativeNames, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $AppId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ErrorUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential]] $KeyCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $ReplyUrls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $LogoutUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $SamlMetadataUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ServicePrincipalType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Homepage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $AppRoleAssignmentRequired, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential]] $PasswordCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $PublisherName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $ServicePrincipalNames ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["AccountEnabled"]) { $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] } if($null -ne $PSBoundParameters["Tags"]) { $params["Tags"] = $PSBoundParameters["Tags"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if($null -ne $PSBoundParameters["AlternativeNames"]) { $params["AlternativeNames"] = $PSBoundParameters["AlternativeNames"] } if($null -ne $PSBoundParameters["AppId"]) { $params["AppId"] = $PSBoundParameters["AppId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["ErrorUrl"]) { $params["ErrorUrl"] = $PSBoundParameters["ErrorUrl"] } if($null -ne $PSBoundParameters["KeyCredentials"]) { $params["KeyCredentials"] = $PSBoundParameters["KeyCredentials"] } if($null -ne $PSBoundParameters["ReplyUrls"]) { $params["ReplyUrls"] = $PSBoundParameters["ReplyUrls"] } if($null -ne $PSBoundParameters["LogoutUrl"]) { $params["LogoutUrl"] = $PSBoundParameters["LogoutUrl"] } if($null -ne $PSBoundParameters["SamlMetadataUrl"]) { $params["SamlMetadataUrl"] = $PSBoundParameters["SamlMetadataUrl"] } if($null -ne $PSBoundParameters["ServicePrincipalType"]) { $params["ServicePrincipalType"] = $PSBoundParameters["ServicePrincipalType"] } if($null -ne $PSBoundParameters["Homepage"]) { $params["Homepage"] = $PSBoundParameters["Homepage"] } if($null -ne $PSBoundParameters["AppRoleAssignmentRequired"]) { $params["AppRoleAssignmentRequired"] = $PSBoundParameters["AppRoleAssignmentRequired"] } if($null -ne $PSBoundParameters["PasswordCredentials"]) { $params["PasswordCredentials"] = $PSBoundParameters["PasswordCredentials"] } if($null -ne $PSBoundParameters["PublisherName"]) { $params["PublisherName"] = $PSBoundParameters["PublisherName"] } if($null -ne $PSBoundParameters["ServicePrincipalNames"]) { $params["ServicePrincipalNames"] = $PSBoundParameters["ServicePrincipalNames"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgServicePrincipal @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADDirectoryRole { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryRoleId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDirectoryRole @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADServicePrincipal { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $SearchString, [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{SearchString = "Filter"; ObjectId = "Id"} if($null -ne $PSBoundParameters["SearchString"]) { $TmpValue = $PSBoundParameters["SearchString"] $Value = "publisherName eq '$TmpValue' or (displayName eq '$TmpValue' or startswith(displayName,'$TmpValue'))" $params["Filter"] = $Value } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgServicePrincipal @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADUserManager { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $RefObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"; RefObjectId = "BodyParameter"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["UserId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["RefObjectId"]) { $TmpValue = $PSBoundParameters["RefObjectId"] $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/users/$TmpValue"} $params["BodyParameter"] = $Value } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Set-MgUserManagerByRef @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADTenantDetail { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $MarketingNotificationEmails, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $TechnicalNotificationMails, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.AzureAD.Model.PrivacyProfile] $PrivacyProfile, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $SecurityComplianceNotificationMails, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $SecurityComplianceNotificationPhones ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["MarketingNotificationEmails"]) { $params["MarketingNotificationEmails"] = $PSBoundParameters["MarketingNotificationEmails"] } if($null -ne $PSBoundParameters["TechnicalNotificationMails"]) { $params["TechnicalNotificationMails"] = $PSBoundParameters["TechnicalNotificationMails"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["PrivacyProfile"]) { $params["PrivacyProfile"] = $PSBoundParameters["PrivacyProfile"] } if($null -ne $PSBoundParameters["SecurityComplianceNotificationMails"]) { $params["SecurityComplianceNotificationMails"] = $PSBoundParameters["SecurityComplianceNotificationMails"] } if($null -ne $PSBoundParameters["SecurityComplianceNotificationPhones"]) { $params["SecurityComplianceNotificationPhones"] = $PSBoundParameters["SecurityComplianceNotificationPhones"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgOrganization @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADApplicationExtensionProperty { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DataType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Name, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $TargetObjects ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["DataType"]) { $params["DataType"] = $PSBoundParameters["DataType"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Name"]) { $params["Name"] = $PSBoundParameters["Name"] } if($null -ne $PSBoundParameters["TargetObjects"]) { $params["TargetObjects"] = $PSBoundParameters["TargetObjects"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgApplicationExtensionProperty @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADUserAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $ResourceId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $PrincipalId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ResourceId"]) { $params["ResourceId"] = $PSBoundParameters["ResourceId"] } if($null -ne $PSBoundParameters["Id"]) { $params["UserId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["UserId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["PrincipalId"]) { $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgUserAppRoleAssignment @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADMSDeletedDirectoryObject { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["DirectoryObjectId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDirectoryDeletedItem @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADApplicationLogo { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $FileName, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $FilePath, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Boolean] $View ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["FileName"]) { $params["FileName"] = $PSBoundParameters["FileName"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["FilePath"]) { $params["FilePath"] = $PSBoundParameters["FilePath"] } if($null -ne $PSBoundParameters["View"]) { $params["View"] = $PSBoundParameters["View"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgApplicationLogo @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADDevice { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $AccountEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Int32]] $DeviceObjectVersion, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.DateTime]] $ApproximateLastLogonTimeStamp, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DeviceTrustType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ProfileType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId]] $AlternativeSecurityIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DeviceOSVersion, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DeviceOSType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $DevicePhysicalIds, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsManaged, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $SystemLabels, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DeviceMetadata, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DeviceId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsCompliant ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["AccountEnabled"]) { $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["DeviceObjectVersion"]) { $params["DeviceObjectVersion"] = $PSBoundParameters["DeviceObjectVersion"] } if($null -ne $PSBoundParameters["ApproximateLastLogonTimeStamp"]) { $params["ApproximateLastLogonTimeStamp"] = $PSBoundParameters["ApproximateLastLogonTimeStamp"] } if($null -ne $PSBoundParameters["DeviceTrustType"]) { $params["DeviceTrustType"] = $PSBoundParameters["DeviceTrustType"] } if($null -ne $PSBoundParameters["ProfileType"]) { $params["ProfileType"] = $PSBoundParameters["ProfileType"] } if($null -ne $PSBoundParameters["AlternativeSecurityIds"]) { $params["AlternativeSecurityIds"] = $PSBoundParameters["AlternativeSecurityIds"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["DeviceOSVersion"]) { $params["DeviceOSVersion"] = $PSBoundParameters["DeviceOSVersion"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if($null -ne $PSBoundParameters["DeviceOSType"]) { $params["DeviceOSType"] = $PSBoundParameters["DeviceOSType"] } if($null -ne $PSBoundParameters["DevicePhysicalIds"]) { $params["DevicePhysicalIds"] = $PSBoundParameters["DevicePhysicalIds"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DeviceId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["IsManaged"]) { $params["IsManaged"] = $PSBoundParameters["IsManaged"] } if($null -ne $PSBoundParameters["SystemLabels"]) { $params["SystemLabels"] = $PSBoundParameters["SystemLabels"] } if($null -ne $PSBoundParameters["DeviceMetadata"]) { $params["DeviceMetadata"] = $PSBoundParameters["DeviceMetadata"] } if($null -ne $PSBoundParameters["DeviceId"]) { $params["DeviceId"] = $PSBoundParameters["DeviceId"] } if($null -ne $PSBoundParameters["IsCompliant"]) { $params["IsCompliant"] = $PSBoundParameters["IsCompliant"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgDevice @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Set-CompatADMSPermissionGrantPolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Description"]) { $params["Description"] = $PSBoundParameters["Description"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if($null -ne $PSBoundParameters["Id"]) { $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgPolicyPermissionGrantPolicy @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADMSApplication { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.ApiApplication] $Api, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.OptionalClaims] $OptionalClaims, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $Tags, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.WebApplication] $Web, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsFallbackPublicClient, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess]] $RequiredResourceAccess, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.PublicClientApplication] $PublicClient, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsDeviceOnlyAuthSupported, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $TokenEncryptionKeyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $IdentifierUris, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.ParentalControlSettings] $ParentalControlSettings, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $GroupMembershipClaims, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn]] $AddIns, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole]] $AppRoles, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential]] $PasswordCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $SignInAudience, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.InformationalUrl] $InformationalUrl ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["Api"]) { $params["Api"] = $PSBoundParameters["Api"] } if($null -ne $PSBoundParameters["OptionalClaims"]) { $params["OptionalClaims"] = $PSBoundParameters["OptionalClaims"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if($null -ne $PSBoundParameters["Tags"]) { $params["Tags"] = $PSBoundParameters["Tags"] } if($null -ne $PSBoundParameters["Web"]) { $params["Web"] = $PSBoundParameters["Web"] } if($null -ne $PSBoundParameters["IsFallbackPublicClient"]) { $params["IsFallbackPublicClient"] = $PSBoundParameters["IsFallbackPublicClient"] } if($null -ne $PSBoundParameters["RequiredResourceAccess"]) { $params["RequiredResourceAccess"] = $PSBoundParameters["RequiredResourceAccess"] } if($null -ne $PSBoundParameters["PublicClient"]) { $params["PublicClient"] = $PSBoundParameters["PublicClient"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["IsDeviceOnlyAuthSupported"]) { $params["IsDeviceOnlyAuthSupported"] = $PSBoundParameters["IsDeviceOnlyAuthSupported"] } if($null -ne $PSBoundParameters["KeyCredentials"]) { $params["KeyCredentials"] = $PSBoundParameters["KeyCredentials"] } if($null -ne $PSBoundParameters["TokenEncryptionKeyId"]) { $params["TokenEncryptionKeyId"] = $PSBoundParameters["TokenEncryptionKeyId"] } if($null -ne $PSBoundParameters["IdentifierUris"]) { $params["IdentifierUris"] = $PSBoundParameters["IdentifierUris"] } if($null -ne $PSBoundParameters["ParentalControlSettings"]) { $params["ParentalControlSettings"] = $PSBoundParameters["ParentalControlSettings"] } if($null -ne $PSBoundParameters["GroupMembershipClaims"]) { $params["GroupMembershipClaims"] = $PSBoundParameters["GroupMembershipClaims"] } if($null -ne $PSBoundParameters["AddIns"]) { $params["AddIns"] = $PSBoundParameters["AddIns"] } if($null -ne $PSBoundParameters["AppRoles"]) { $params["AppRoles"] = $PSBoundParameters["AppRoles"] } if($null -ne $PSBoundParameters["PasswordCredentials"]) { $params["PasswordCredentials"] = $PSBoundParameters["PasswordCredentials"] } if($null -ne $PSBoundParameters["SignInAudience"]) { $params["SignInAudience"] = $PSBoundParameters["SignInAudience"] } if($null -ne $PSBoundParameters["InformationalUrl"]) { $params["InformationalUrl"] = $PSBoundParameters["InformationalUrl"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgApplication @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADSubscribedSku { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["SubscribedSkuId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgSubscribedSku @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADMSApplicationPassword { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $KeyId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["KeyId"]) { $params["KeyId"] = $PSBoundParameters["KeyId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgApplicationPassword @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADMSAdministrativeUnitMember { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($null -ne $PSBoundParameters["Id"]) { $params["AdministrativeUnitId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDirectoryAdministrativeUnitMember @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADUserMembership { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUserMemberOf @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADMSApplicationOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $OwnerId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{OwnerId = "DirectoryObjectId"; ObjectId = "Id"} if($null -ne $PSBoundParameters["OwnerId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgApplicationOwnerByRef @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADApplicationKeyCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[Microsoft.Open.AzureAD.Graph.PowerShell.Custom.KeyUsage]] $Usage, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[Microsoft.Open.AzureAD.Graph.PowerShell.Custom.KeyType]] $Type, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.DateTime]] $EndDate, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Value, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.DateTime]] $StartDate, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $CustomKeyIdentifier ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["Usage"]) { $params["Usage"] = $PSBoundParameters["Usage"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["Type"]) { $params["Type"] = $PSBoundParameters["Type"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["EndDate"]) { $params["EndDate"] = $PSBoundParameters["EndDate"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Value"]) { $params["Value"] = $PSBoundParameters["Value"] } if($null -ne $PSBoundParameters["StartDate"]) { $params["StartDate"] = $PSBoundParameters["StartDate"] } if($null -ne $PSBoundParameters["CustomKeyIdentifier"]) { $params["CustomKeyIdentifier"] = $PSBoundParameters["CustomKeyIdentifier"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Add-MgApplicationKey @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Enable-CompatADDirectoryRole { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $RoleTemplateId ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["RoleTemplateId"]) { $params["RoleTemplateId"] = $PSBoundParameters["RoleTemplateId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgDirectoryRole @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADMSAdministrativeUnit { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["Id"]) { $params["AdministrativeUnitId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDirectoryAdministrativeUnit @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Remove-CompatADServicePrincipal { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgServicePrincipal @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Restore-CompatADDeletedApplication { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $IdentifierUris ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["IdentifierUris"]) { $params["IdentifierUris"] = $PSBoundParameters["IdentifierUris"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Restore-MgDirectoryDeletedItem @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADMSInvitation { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.User] $InvitedUser, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.InvitedUserMessageInfo] $InvitedUserMessageInfo, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $InvitedUserType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $SendInvitationMessage, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $InvitedUserEmailAddress, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $InvitedUserDisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $InviteRedirectUrl ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["InvitedUser"]) { $params["InvitedUser"] = $PSBoundParameters["InvitedUser"] } if($null -ne $PSBoundParameters["InvitedUserMessageInfo"]) { $params["InvitedUserMessageInfo"] = $PSBoundParameters["InvitedUserMessageInfo"] } if($null -ne $PSBoundParameters["InvitedUserType"]) { $params["InvitedUserType"] = $PSBoundParameters["InvitedUserType"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["SendInvitationMessage"]) { $params["SendInvitationMessage"] = $PSBoundParameters["SendInvitationMessage"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["InvitedUserEmailAddress"]) { $params["InvitedUserEmailAddress"] = $PSBoundParameters["InvitedUserEmailAddress"] } if($null -ne $PSBoundParameters["InvitedUserDisplayName"]) { $params["InvitedUserDisplayName"] = $PSBoundParameters["InvitedUserDisplayName"] } if($null -ne $PSBoundParameters["InviteRedirectUrl"]) { $params["InviteRedirectUrl"] = $PSBoundParameters["InviteRedirectUrl"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgInvitation @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADTenantDetail { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgOrganization @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function New-CompatADApplicationPasswordCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.DateTime]] $EndDate, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Value, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.DateTime]] $StartDate, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $CustomKeyIdentifier ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["EndDate"]) { $params["EndDate"] = $PSBoundParameters["EndDate"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Value"]) { $params["Value"] = $PSBoundParameters["Value"] } if($null -ne $PSBoundParameters["StartDate"]) { $params["StartDate"] = $PSBoundParameters["StartDate"] } if($null -ne $PSBoundParameters["CustomKeyIdentifier"]) { $params["CustomKeyIdentifier"] = $PSBoundParameters["CustomKeyIdentifier"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Add-MgApplicationPassword @params $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } } $response } } function Get-CompatADUnsupportedCommand { Throw [System.NotSupportedException] "This commands is currently not supported by the Microsoft Graph Compatibility Adapter." } function Set-CompatADAlias { Set-Alias -Name Get-AzureADMSIdentityProvider -Value Get-CompatADMSIdentityProvider -Scope Global -Force Set-Alias -Name Get-AzureADServicePrincipalOAuth2PermissionGrant -Value Get-CompatADServicePrincipalOAuth2PermissionGrant -Scope Global -Force Set-Alias -Name Get-AzureADApplicationExtensionProperty -Value Get-CompatADApplicationExtensionProperty -Scope Global -Force Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-CompatADApplicationServiceEndpoint -Scope Global -Force Set-Alias -Name Get-AzureADMSGroupPermissionGrant -Value Get-CompatADMSGroupPermissionGrant -Scope Global -Force Set-Alias -Name Set-AzureADMSIdentityProvider -Value Set-CompatADMSIdentityProvider -Scope Global -Force Set-Alias -Name Add-AzureADGroupOwner -Value Add-CompatADGroupOwner -Scope Global -Force Set-Alias -Name Revoke-AzureADUserAllRefreshToken -Value Revoke-CompatADUserAllRefreshToken -Scope Global -Force Set-Alias -Name Get-AzureADGroup -Value Get-CompatADGroup -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationExtensionProperty -Value Remove-CompatADApplicationExtensionProperty -Scope Global -Force Set-Alias -Name New-AzureADUser -Value New-CompatADUser -Scope Global -Force Set-Alias -Name Remove-AzureADMSGroupLifecyclePolicy -Value Remove-CompatADMSGroupLifecyclePolicy -Scope Global -Force Set-Alias -Name Get-AzureADDomain -Value Get-CompatADDomain -Scope Global -Force Set-Alias -Name New-AzureADDomain -Value New-CompatADDomain -Scope Global -Force Set-Alias -Name Reset-AzureADMSLifeCycleGroup -Value Reset-CompatADMSLifeCycleGroup -Scope Global -Force Set-Alias -Name Get-AzureADGroupMember -Value Get-CompatADGroupMember -Scope Global -Force Set-Alias -Name Remove-AzureADTrustedCertificateAuthority -Value Remove-CompatADTrustedCertificateAuthority -Scope Global -Force Set-Alias -Name Get-AzureADServiceAppRoleAssignment -Value Get-CompatADServiceAppRoleAssignment -Scope Global -Force Set-Alias -Name New-AzureADMSGroup -Value New-CompatADMSGroup -Scope Global -Force Set-Alias -Name New-AzureADMSRoleAssignment -Value New-CompatADMSRoleAssignment -Scope Global -Force Set-Alias -Name Select-AzureADGroupIdsUserIsMemberOf -Value Select-CompatADGroupIdsUserIsMemberOf -Scope Global -Force Set-Alias -Name Get-AzureADTrustedCertificateAuthority -Value Get-CompatADTrustedCertificateAuthority -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationKeyCredential -Value Remove-CompatADApplicationKeyCredential -Scope Global -Force Set-Alias -Name Get-AzureADUserLicenseDetail -Value Get-CompatADUserLicenseDetail -Scope Global -Force Set-Alias -Name Add-AzureADServicePrincipalOwner -Value Add-CompatADServicePrincipalOwner -Scope Global -Force Set-Alias -Name Remove-AzureADMSApplicationKey -Value Remove-CompatADMSApplicationKey -Scope Global -Force Set-Alias -Name Add-AzureADMSApplicationOwner -Value Add-CompatADMSApplicationOwner -Scope Global -Force Set-Alias -Name Get-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Get-CompatADMSServicePrincipalDelegatedPermissionClassification -Scope Global -Force Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Remove-CompatADServicePrincipalKeyCredential -Scope Global -Force Set-Alias -Name Remove-AzureADUser -Value Remove-CompatADUser -Scope Global -Force Set-Alias -Name Update-AzureADSignedInUserPassword -Value Update-CompatADSignedInUserPassword -Scope Global -Force Set-Alias -Name Add-AzureADDeviceRegisteredOwner -Value Add-CompatADDeviceRegisteredOwner -Scope Global -Force Set-Alias -Name Set-AzureADUserThumbnailPhoto -Value Set-CompatADUserThumbnailPhoto -Scope Global -Force Set-Alias -Name Get-AzureADApplication -Value Get-CompatADApplication -Scope Global -Force Set-Alias -Name Set-AzureADMSApplicationVerifiedPublisher -Value Set-CompatADMSApplicationVerifiedPublisher -Scope Global -Force Set-Alias -Name Get-AzureADDeviceRegisteredUser -Value Get-CompatADDeviceRegisteredUser -Scope Global -Force Set-Alias -Name Add-AzureADDirectoryRoleMember -Value Add-CompatADDirectoryRoleMember -Scope Global -Force Set-Alias -Name Remove-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Remove-CompatADMSServicePrincipalDelegatedPermissionClassification -Scope Global -Force Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-CompatADMSAuthorizationPolicy -Scope Global -Force Set-Alias -Name Select-AzureADGroupIdsServicePrincipalIsMemberOf -Value Select-CompatADGroupIdsServicePrincipalIsMemberOf -Scope Global -Force Set-Alias -Name Set-AzureADGroup -Value Set-CompatADGroup -Scope Global -Force Set-Alias -Name Set-AzureADApplicationLogo -Value Set-CompatADApplicationLogo -Scope Global -Force Set-Alias -Name Get-AzureADContactDirectReport -Value Get-CompatADContactDirectReport -Scope Global -Force Set-Alias -Name Add-AzureADGroupMember -Value Add-CompatADGroupMember -Scope Global -Force Set-Alias -Name Remove-AzureADMSConditionalAccessPolicy -Value Remove-CompatADMSConditionalAccessPolicy -Scope Global -Force Set-Alias -Name Add-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Add-CompatADMSServicePrincipalDelegatedPermissionClassification -Scope Global -Force Set-Alias -Name Remove-AzureADServiceAppRoleAssignment -Value Remove-CompatADServiceAppRoleAssignment -Scope Global -Force Set-Alias -Name Get-AzureADDomainNameReference -Value Get-CompatADDomainNameReference -Scope Global -Force Set-Alias -Name Set-AzureADMSConditionalAccessPolicy -Value Set-CompatADMSConditionalAccessPolicy -Scope Global -Force Set-Alias -Name Remove-AzureADMSAdministrativeUnitMember -Value Remove-CompatADMSAdministrativeUnitMember -Scope Global -Force Set-Alias -Name Get-AzureADUserOAuth2PermissionGrant -Value Get-CompatADUserOAuth2PermissionGrant -Scope Global -Force Set-Alias -Name Get-AzureADOAuth2PermissionGrant -Value Get-CompatADOAuth2PermissionGrant -Scope Global -Force Set-Alias -Name New-AzureADMSIdentityProvider -Value New-CompatADMSIdentityProvider -Scope Global -Force Set-Alias -Name Remove-AzureADMSDeletedDirectoryObject -Value Remove-CompatADMSDeletedDirectoryObject -Scope Global -Force Set-Alias -Name Revoke-AzureADSignedInUserAllRefreshToken -Value Revoke-CompatADSignedInUserAllRefreshToken -Scope Global -Force Set-Alias -Name Get-AzureADContactMembership -Value Get-CompatADContactMembership -Scope Global -Force Set-Alias -Name New-AzureADGroup -Value New-CompatADGroup -Scope Global -Force Set-Alias -Name New-AzureADMSNamedLocationPolicy -Value New-CompatADMSNamedLocationPolicy -Scope Global -Force Set-Alias -Name Confirm-AzureADDomain -Value Confirm-CompatADDomain -Scope Global -Force Set-Alias -Name Remove-AzureADServicePrincipalOwner -Value Remove-CompatADServicePrincipalOwner -Scope Global -Force Set-Alias -Name Remove-AzureADUserAppRoleAssignment -Value Remove-CompatADUserAppRoleAssignment -Scope Global -Force Set-Alias -Name Remove-AzureADMSRoleAssignment -Value Remove-CompatADMSRoleAssignment -Scope Global -Force Set-Alias -Name Remove-AzureADMSIdentityProvider -Value Remove-CompatADMSIdentityProvider -Scope Global -Force Set-Alias -Name Get-AzureADDeletedApplication -Value Get-CompatADDeletedApplication -Scope Global -Force Set-Alias -Name Get-AzureADExtensionProperty -Value Get-CompatADExtensionProperty -Scope Global -Force Set-Alias -Name Select-AzureADGroupIdsGroupIsMemberOf -Value Select-CompatADGroupIdsGroupIsMemberOf -Scope Global -Force Set-Alias -Name Remove-AzureADDeviceRegisteredUser -Value Remove-CompatADDeviceRegisteredUser -Scope Global -Force Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Set-CompatADMSAdministrativeUnit -Scope Global -Force Set-Alias -Name Set-AzureADMSGroup -Value Set-CompatADMSGroup -Scope Global -Force Set-Alias -Name Add-AzureADMSLifecyclePolicyGroup -Value Add-CompatADMSLifecyclePolicyGroup -Scope Global -Force Set-Alias -Name Get-AzureADUserAppRoleAssignment -Value Get-CompatADUserAppRoleAssignment -Scope Global -Force Set-Alias -Name Remove-AzureADMSAdministrativeUnit -Value Remove-CompatADMSAdministrativeUnit -Scope Global -Force Set-Alias -Name Get-AzureADMSDeletedGroup -Value Get-CompatADMSDeletedGroup -Scope Global -Force Set-Alias -Name Set-AzureADMSAuthorizationPolicy -Value Set-CompatADMSAuthorizationPolicy -Scope Global -Force Set-Alias -Name Remove-AzureADGroupOwner -Value Remove-CompatADGroupOwner -Scope Global -Force Set-Alias -Name Remove-AzureADMSRoleDefinition -Value Remove-CompatADMSRoleDefinition -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationPasswordCredential -Value Remove-CompatADApplicationPasswordCredential -Scope Global -Force Set-Alias -Name Get-AzureADServicePrincipalOwnedObject -Value Get-CompatADServicePrincipalOwnedObject -Scope Global -Force Set-Alias -Name Get-AzureADMSRoleAssignment -Value Get-CompatADMSRoleAssignment -Scope Global -Force Set-Alias -Name Get-AzureADUserOwnedObject -Value Get-CompatADUserOwnedObject -Scope Global -Force Set-Alias -Name Remove-AzureADMSLifecyclePolicyGroup -Value Remove-CompatADMSLifecyclePolicyGroup -Scope Global -Force Set-Alias -Name Remove-AzureADDomain -Value Remove-CompatADDomain -Scope Global -Force Set-Alias -Name Get-AzureADContact -Value Get-CompatADContact -Scope Global -Force Set-Alias -Name Set-AzureADMSGroupLifecyclePolicy -Value Set-CompatADMSGroupLifecyclePolicy -Scope Global -Force Set-Alias -Name Get-AzureADGroupAppRoleAssignment -Value Get-CompatADGroupAppRoleAssignment -Scope Global -Force Set-Alias -Name Get-AzureADMSApplication -Value Get-CompatADMSApplication -Scope Global -Force Set-Alias -Name Set-AzureADApplication -Value Set-CompatADApplication -Scope Global -Force Set-Alias -Name Get-AzureADMSRoleDefinition -Value Get-CompatADMSRoleDefinition -Scope Global -Force Set-Alias -Name Get-AzureADMSPermissionGrantConditionSet -Value Get-CompatADMSPermissionGrantConditionSet -Scope Global -Force Set-Alias -Name Remove-AzureADGroupMember -Value Remove-CompatADGroupMember -Scope Global -Force Set-Alias -Name Get-AzureADServicePrincipalCreatedObject -Value Get-CompatADServicePrincipalCreatedObject -Scope Global -Force Set-Alias -Name Get-AzureADApplicationKeyCredential -Value Get-CompatADApplicationKeyCredential -Scope Global -Force Set-Alias -Name Get-AzureADServicePrincipalOwner -Value Get-CompatADServicePrincipalOwner -Scope Global -Force Set-Alias -Name Get-AzureADUserThumbnailPhoto -Value Get-CompatADUserThumbnailPhoto -Scope Global -Force Set-Alias -Name Get-AzureADServicePrincipalKeyCredential -Value Get-CompatADServicePrincipalKeyCredential -Scope Global -Force Set-Alias -Name Remove-AzureADDevice -Value Remove-CompatADDevice -Scope Global -Force Set-Alias -Name Get-AzureADUserExtension -Value Get-CompatADUserExtension -Scope Global -Force Set-Alias -Name Get-AzureADUserCreatedObject -Value Get-CompatADUserCreatedObject -Scope Global -Force Set-Alias -Name Set-AzureADMSNamedLocationPolicy -Value Set-CompatADMSNamedLocationPolicy -Scope Global -Force Set-Alias -Name Set-AzureADMSRoleDefinition -Value Set-CompatADMSRoleDefinition -Scope Global -Force Set-Alias -Name Get-AzureADContactManager -Value Get-CompatADContactManager -Scope Global -Force Set-Alias -Name Set-AzureADMSPermissionGrantConditionSet -Value Set-CompatADMSPermissionGrantConditionSet -Scope Global -Force Set-Alias -Name Get-AzureADApplicationOwner -Value Get-CompatADApplicationOwner -Scope Global -Force Set-Alias -Name Remove-AzureADMSScopedRoleMembership -Value Remove-CompatADMSScopedRoleMembership -Scope Global -Force Set-Alias -Name Remove-AzureADMSApplication -Value Remove-CompatADMSApplication -Scope Global -Force Set-Alias -Name Set-AzureADUserExtension -Value Set-CompatADUserExtension -Scope Global -Force Set-Alias -Name Get-AzureADMSLifecyclePolicyGroup -Value Get-CompatADMSLifecyclePolicyGroup -Scope Global -Force Set-Alias -Name Get-AzureADUserManager -Value Get-CompatADUserManager -Scope Global -Force Set-Alias -Name New-AzureADServiceAppRoleAssignment -Value New-CompatADServiceAppRoleAssignment -Scope Global -Force Set-Alias -Name Add-AzureADApplicationOwner -Value Add-CompatADApplicationOwner -Scope Global -Force Set-Alias -Name Remove-AzureADMSGroup -Value Remove-CompatADMSGroup -Scope Global -Force Set-Alias -Name Remove-AzureADApplication -Value Remove-CompatADApplication -Scope Global -Force Set-Alias -Name New-AzureADGroupAppRoleAssignment -Value New-CompatADGroupAppRoleAssignment -Scope Global -Force Set-Alias -Name Add-AzureADDeviceRegisteredUser -Value Add-CompatADDeviceRegisteredUser -Scope Global -Force Set-Alias -Name Set-AzureADTrustedCertificateAuthority -Value Set-CompatADTrustedCertificateAuthority -Scope Global -Force Set-Alias -Name Remove-AzureADOAuth2PermissionGrant -Value Remove-CompatADOAuth2PermissionGrant -Scope Global -Force Set-Alias -Name Get-AzureADUserOwnedDevice -Value Get-CompatADUserOwnedDevice -Scope Global -Force Set-Alias -Name Remove-AzureADGroup -Value Remove-CompatADGroup -Scope Global -Force Set-Alias -Name Set-AzureADUserLicense -Value Set-CompatADUserLicense -Scope Global -Force Set-Alias -Name Remove-AzureADMSApplicationVerifiedPublisher -Value Remove-CompatADMSApplicationVerifiedPublisher -Scope Global -Force Set-Alias -Name New-AzureADMSPermissionGrantConditionSet -Value New-CompatADMSPermissionGrantConditionSet -Scope Global -Force Set-Alias -Name Remove-AzureADUserExtension -Value Remove-CompatADUserExtension -Scope Global -Force Set-Alias -Name New-AzureADMSApplicationKey -Value New-CompatADMSApplicationKey -Scope Global -Force Set-Alias -Name Get-AzureADServicePrincipalMembership -Value Get-CompatADServicePrincipalMembership -Scope Global -Force Set-Alias -Name New-AzureADMSApplicationPassword -Value New-CompatADMSApplicationPassword -Scope Global -Force Set-Alias -Name Get-AzureADDomainVerificationDnsRecord -Value Get-CompatADDomainVerificationDnsRecord -Scope Global -Force Set-Alias -Name Remove-AzureADGroupAppRoleAssignment -Value Remove-CompatADGroupAppRoleAssignment -Scope Global -Force Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-CompatADApplicationPasswordCredential -Scope Global -Force Set-Alias -Name New-AzureADDevice -Value New-CompatADDevice -Scope Global -Force Set-Alias -Name Get-AzureADDirectoryRoleTemplate -Value Get-CompatADDirectoryRoleTemplate -Scope Global -Force Set-Alias -Name Set-AzureADUserPassword -Value Set-CompatADUserPassword -Scope Global -Force Set-Alias -Name Get-AzureADGroupOwner -Value Get-CompatADGroupOwner -Scope Global -Force Set-Alias -Name Get-AzureADMSPermissionGrantPolicy -Value Get-CompatADMSPermissionGrantPolicy -Scope Global -Force Set-Alias -Name Remove-AzureADMSApplicationExtensionProperty -Value Remove-CompatADMSApplicationExtensionProperty -Scope Global -Force Set-Alias -Name New-AzureADMSApplicationExtensionProperty -Value New-CompatADMSApplicationExtensionProperty -Scope Global -Force Set-Alias -Name Get-AzureADDomainServiceConfigurationRecord -Value Get-CompatADDomainServiceConfigurationRecord -Scope Global -Force Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Restore-CompatADMSDeletedDirectoryObject -Scope Global -Force Set-Alias -Name Remove-AzureADMSPermissionGrantPolicy -Value Remove-CompatADMSPermissionGrantPolicy -Scope Global -Force Set-Alias -Name Get-AzureADMSConditionalAccessPolicy -Value Get-CompatADMSConditionalAccessPolicy -Scope Global -Force Set-Alias -Name Get-AzureADUserRegisteredDevice -Value Get-CompatADUserRegisteredDevice -Scope Global -Force Set-Alias -Name Get-AzureADContract -Value Get-CompatADContract -Scope Global -Force Set-Alias -Name Set-AzureADMSApplicationLogo -Value Set-CompatADMSApplicationLogo -Scope Global -Force Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Add-CompatADMSScopedRoleMembership -Scope Global -Force Set-Alias -Name New-AzureADMSRoleDefinition -Value New-CompatADMSRoleDefinition -Scope Global -Force Set-Alias -Name New-AzureADTrustedCertificateAuthority -Value New-CompatADTrustedCertificateAuthority -Scope Global -Force Set-Alias -Name Set-AzureADUser -Value Set-CompatADUser -Scope Global -Force Set-Alias -Name Get-AzureADUserDirectReport -Value Get-CompatADUserDirectReport -Scope Global -Force Set-Alias -Name Remove-AzureADDirectoryRoleMember -Value Remove-CompatADDirectoryRoleMember -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationOwner -Value Remove-CompatADApplicationOwner -Scope Global -Force Set-Alias -Name Set-AzureADDomain -Value Set-CompatADDomain -Scope Global -Force Set-Alias -Name Remove-AzureADMSNamedLocationPolicy -Value Remove-CompatADMSNamedLocationPolicy -Scope Global -Force Set-Alias -Name Set-AzureADMSApplication -Value Set-CompatADMSApplication -Scope Global -Force Set-Alias -Name Get-AzureADMSApplicationOwner -Value Get-CompatADMSApplicationOwner -Scope Global -Force Set-Alias -Name New-AzureADApplication -Value New-CompatADApplication -Scope Global -Force Set-Alias -Name Get-AzureADDevice -Value Get-CompatADDevice -Scope Global -Force Set-Alias -Name Get-AzureADUser -Value Get-CompatADUser -Scope Global -Force Set-Alias -Name New-AzureADServicePrincipalPasswordCredential -Value New-CompatADServicePrincipalPasswordCredential -Scope Global -Force Set-Alias -Name Get-AzureADMSApplicationExtensionProperty -Value Get-CompatADMSApplicationExtensionProperty -Scope Global -Force Set-Alias -Name Get-AzureADMSGroupLifecyclePolicy -Value Get-CompatADMSGroupLifecyclePolicy -Scope Global -Force Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-CompatADCurrentSessionInfo -Scope Global -Force Set-Alias -Name Get-AzureADMSGroup -Value Get-CompatADMSGroup -Scope Global -Force Set-Alias -Name Get-AzureADDeviceRegisteredOwner -Value Get-CompatADDeviceRegisteredOwner -Scope Global -Force Set-Alias -Name Get-AzureADMSNamedLocationPolicy -Value Get-CompatADMSNamedLocationPolicy -Scope Global -Force Set-Alias -Name New-AzureADMSAdministrativeUnit -Value New-CompatADMSAdministrativeUnit -Scope Global -Force Set-Alias -Name Remove-AzureADDeletedApplication -Value Remove-CompatADDeletedApplication -Scope Global -Force Set-Alias -Name Select-AzureADGroupIdsContactIsMemberOf -Value Select-CompatADGroupIdsContactIsMemberOf -Scope Global -Force Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Add-CompatADMSAdministrativeUnitMember -Scope Global -Force Set-Alias -Name Remove-AzureADServicePrincipalPasswordCredential -Value Remove-CompatADServicePrincipalPasswordCredential -Scope Global -Force Set-Alias -Name Get-AzureADObjectByObjectId -Value Get-CompatADObjectByObjectId -Scope Global -Force Set-Alias -Name Remove-AzureADContact -Value Remove-CompatADContact -Scope Global -Force Set-Alias -Name Get-AzureADServiceAppRoleAssignedTo -Value Get-CompatADServiceAppRoleAssignedTo -Scope Global -Force Set-Alias -Name Remove-AzureADDeviceRegisteredOwner -Value Remove-CompatADDeviceRegisteredOwner -Scope Global -Force Set-Alias -Name New-AzureADMSPermissionGrantPolicy -Value New-CompatADMSPermissionGrantPolicy -Scope Global -Force Set-Alias -Name Set-AzureADServicePrincipal -Value Set-CompatADServicePrincipal -Scope Global -Force Set-Alias -Name Remove-AzureADMSPermissionGrantConditionSet -Value Remove-CompatADMSPermissionGrantConditionSet -Scope Global -Force Set-Alias -Name Get-AzureADServicePrincipalPasswordCredential -Value Get-CompatADServicePrincipalPasswordCredential -Scope Global -Force Set-Alias -Name Get-AzureADDirectoryRoleMember -Value Get-CompatADDirectoryRoleMember -Scope Global -Force Set-Alias -Name New-AzureADMSGroupLifecyclePolicy -Value New-CompatADMSGroupLifecyclePolicy -Scope Global -Force Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-CompatADMSScopedRoleMembership -Scope Global -Force Set-Alias -Name New-AzureADMSConditionalAccessPolicy -Value New-CompatADMSConditionalAccessPolicy -Scope Global -Force Set-Alias -Name Remove-AzureADUserManager -Value Remove-CompatADUserManager -Scope Global -Force Set-Alias -Name New-AzureADServicePrincipal -Value New-CompatADServicePrincipal -Scope Global -Force Set-Alias -Name Get-AzureADDirectoryRole -Value Get-CompatADDirectoryRole -Scope Global -Force Set-Alias -Name Get-AzureADServicePrincipal -Value Get-CompatADServicePrincipal -Scope Global -Force Set-Alias -Name Set-AzureADUserManager -Value Set-CompatADUserManager -Scope Global -Force Set-Alias -Name Set-AzureADTenantDetail -Value Set-CompatADTenantDetail -Scope Global -Force Set-Alias -Name New-AzureADApplicationExtensionProperty -Value New-CompatADApplicationExtensionProperty -Scope Global -Force Set-Alias -Name New-AzureADUserAppRoleAssignment -Value New-CompatADUserAppRoleAssignment -Scope Global -Force Set-Alias -Name Get-AzureADMSDeletedDirectoryObject -Value Get-CompatADMSDeletedDirectoryObject -Scope Global -Force Set-Alias -Name Get-AzureADApplicationLogo -Value Get-CompatADApplicationLogo -Scope Global -Force Set-Alias -Name Set-AzureADDevice -Value Set-CompatADDevice -Scope Global -Force Set-Alias -Name Set-AzureADMSPermissionGrantPolicy -Value Set-CompatADMSPermissionGrantPolicy -Scope Global -Force Set-Alias -Name New-AzureADMSApplication -Value New-CompatADMSApplication -Scope Global -Force Set-Alias -Name Get-AzureADSubscribedSku -Value Get-CompatADSubscribedSku -Scope Global -Force Set-Alias -Name Remove-AzureADMSApplicationPassword -Value Remove-CompatADMSApplicationPassword -Scope Global -Force Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-CompatADMSAdministrativeUnitMember -Scope Global -Force Set-Alias -Name Get-AzureADUserMembership -Value Get-CompatADUserMembership -Scope Global -Force Set-Alias -Name Remove-AzureADMSApplicationOwner -Value Remove-CompatADMSApplicationOwner -Scope Global -Force Set-Alias -Name New-AzureADApplicationKeyCredential -Value New-CompatADApplicationKeyCredential -Scope Global -Force Set-Alias -Name Enable-AzureADDirectoryRole -Value Enable-CompatADDirectoryRole -Scope Global -Force Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-CompatADMSAdministrativeUnit -Scope Global -Force Set-Alias -Name Remove-AzureADServicePrincipal -Value Remove-CompatADServicePrincipal -Scope Global -Force Set-Alias -Name Restore-AzureADDeletedApplication -Value Restore-CompatADDeletedApplication -Scope Global -Force Set-Alias -Name New-AzureADMSInvitation -Value New-CompatADMSInvitation -Scope Global -Force Set-Alias -Name Get-AzureADTenantDetail -Value Get-CompatADTenantDetail -Scope Global -Force Set-Alias -Name New-AzureADApplicationPasswordCredential -Value New-CompatADApplicationPasswordCredential -Scope Global -Force Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-CompatADUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-CompatADUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-CompatADUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-CompatADUnsupportedCommand -Scope Global -Force Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-CompatADUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-CompatADUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-CompatADUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-CompatADUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-CompatADUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-CompatADUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-CompatADUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-CompatADUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-CompatADUnsupportedCommand -Scope Global -Force Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-CompatADUnsupportedCommand -Scope Global -Force Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-CompatADUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-CompatADUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-CompatADUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-CompatADUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-CompatADUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-CompatADUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-CompatADUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADContactManager -Value Get-CompatADUnsupportedCommand -Scope Global -Force } # ------------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ function Test-CompatADScript { param ( $Script ) $errorFound = $false If($false -eq (Test-Path $Script)){ Write-Error "Cannot find the script" } $tokens = [System.Management.Automation.PSParser]::Tokenize((Get-Content $Script), [ref]$null) $commands = $tokens | Where-Object -FilterScript {$_.Type -EQ 'Command'} foreach($cmd in $commands) { if($MISSING_CMDS.Contains($cmd.Content)) { $errorFound = $true Write-Warning "Command $($cmd.Content) is not supported" } } if($errorFound){ Write-Warning "Script contains commands that are not supported by the compatibility adapter." } } Export-ModuleMember -Function @( 'Get-CompatADMSIdentityProvider','Get-CompatADServicePrincipalOAuth2PermissionGrant','Get-CompatADApplicationExtensionProperty','Get-CompatADApplicationServiceEndpoint','Get-CompatADMSGroupPermissionGrant','Set-CompatADMSIdentityProvider','Add-CompatADGroupOwner','Revoke-CompatADUserAllRefreshToken','Get-CompatADGroup','Remove-CompatADApplicationExtensionProperty','New-CompatADUser','Remove-CompatADMSGroupLifecyclePolicy','Get-CompatADDomain','New-CompatADDomain','Reset-CompatADMSLifeCycleGroup','Get-CompatADGroupMember','Remove-CompatADTrustedCertificateAuthority','Get-CompatADServiceAppRoleAssignment','New-CompatADMSGroup','New-CompatADMSRoleAssignment','Select-CompatADGroupIdsUserIsMemberOf','Get-CompatADTrustedCertificateAuthority','Remove-CompatADApplicationKeyCredential','Get-CompatADUserLicenseDetail','Add-CompatADServicePrincipalOwner','Remove-CompatADMSApplicationKey','Add-CompatADMSApplicationOwner','Get-CompatADMSServicePrincipalDelegatedPermissionClassification','Remove-CompatADServicePrincipalKeyCredential','Remove-CompatADUser','Update-CompatADSignedInUserPassword','Add-CompatADDeviceRegisteredOwner','Set-CompatADUserThumbnailPhoto','Get-CompatADApplication','Set-CompatADMSApplicationVerifiedPublisher','Get-CompatADDeviceRegisteredUser','Add-CompatADDirectoryRoleMember','Remove-CompatADMSServicePrincipalDelegatedPermissionClassification','Get-CompatADMSAuthorizationPolicy','Select-CompatADGroupIdsServicePrincipalIsMemberOf','Set-CompatADGroup','Set-CompatADApplicationLogo','Get-CompatADContactDirectReport','Add-CompatADGroupMember','Remove-CompatADMSConditionalAccessPolicy','Add-CompatADMSServicePrincipalDelegatedPermissionClassification','Remove-CompatADServiceAppRoleAssignment','Get-CompatADDomainNameReference','Set-CompatADMSConditionalAccessPolicy','Remove-CompatADMSAdministrativeUnitMember','Get-CompatADUserOAuth2PermissionGrant','Get-CompatADOAuth2PermissionGrant','New-CompatADMSIdentityProvider','Remove-CompatADMSDeletedDirectoryObject','Revoke-CompatADSignedInUserAllRefreshToken','Get-CompatADContactMembership','New-CompatADGroup','New-CompatADMSNamedLocationPolicy','Confirm-CompatADDomain','Remove-CompatADServicePrincipalOwner','Remove-CompatADUserAppRoleAssignment','Remove-CompatADMSRoleAssignment','Remove-CompatADMSIdentityProvider','Get-CompatADDeletedApplication','Get-CompatADExtensionProperty','Select-CompatADGroupIdsGroupIsMemberOf','Remove-CompatADDeviceRegisteredUser','Set-CompatADMSAdministrativeUnit','Set-CompatADMSGroup','Add-CompatADMSLifecyclePolicyGroup','Get-CompatADUserAppRoleAssignment','Remove-CompatADMSAdministrativeUnit','Get-CompatADMSDeletedGroup','Set-CompatADMSAuthorizationPolicy','Remove-CompatADGroupOwner','Remove-CompatADMSRoleDefinition','Remove-CompatADApplicationPasswordCredential','Get-CompatADServicePrincipalOwnedObject','Get-CompatADMSRoleAssignment','Get-CompatADUserOwnedObject','Remove-CompatADMSLifecyclePolicyGroup','Remove-CompatADDomain','Get-CompatADContact','Set-CompatADMSGroupLifecyclePolicy','Get-CompatADGroupAppRoleAssignment','Get-CompatADMSApplication','Set-CompatADApplication','Get-CompatADMSRoleDefinition','Get-CompatADMSPermissionGrantConditionSet','Remove-CompatADGroupMember','Get-CompatADServicePrincipalCreatedObject','Get-CompatADApplicationKeyCredential','Get-CompatADServicePrincipalOwner','Get-CompatADUserThumbnailPhoto','Get-CompatADServicePrincipalKeyCredential','Remove-CompatADDevice','Get-CompatADUserExtension','Get-CompatADUserCreatedObject','Set-CompatADMSNamedLocationPolicy','Set-CompatADMSRoleDefinition','Get-CompatADContactManager','Set-CompatADMSPermissionGrantConditionSet','Get-CompatADApplicationOwner','Remove-CompatADMSScopedRoleMembership','Remove-CompatADMSApplication','Set-CompatADUserExtension','Get-CompatADMSLifecyclePolicyGroup','Get-CompatADUserManager','New-CompatADServiceAppRoleAssignment','Add-CompatADApplicationOwner','Remove-CompatADMSGroup','Remove-CompatADApplication','New-CompatADGroupAppRoleAssignment','Add-CompatADDeviceRegisteredUser','Set-CompatADTrustedCertificateAuthority','Remove-CompatADOAuth2PermissionGrant','Get-CompatADUserOwnedDevice','Remove-CompatADGroup','Set-CompatADUserLicense','Remove-CompatADMSApplicationVerifiedPublisher','New-CompatADMSPermissionGrantConditionSet','Remove-CompatADUserExtension','New-CompatADMSApplicationKey','Get-CompatADServicePrincipalMembership','New-CompatADMSApplicationPassword','Get-CompatADDomainVerificationDnsRecord','Remove-CompatADGroupAppRoleAssignment','Get-CompatADApplicationPasswordCredential','New-CompatADDevice','Get-CompatADDirectoryRoleTemplate','Set-CompatADUserPassword','Get-CompatADGroupOwner','Get-CompatADMSPermissionGrantPolicy','Remove-CompatADMSApplicationExtensionProperty','New-CompatADMSApplicationExtensionProperty','Get-CompatADDomainServiceConfigurationRecord','Restore-CompatADMSDeletedDirectoryObject','Remove-CompatADMSPermissionGrantPolicy','Get-CompatADMSConditionalAccessPolicy','Get-CompatADUserRegisteredDevice','Get-CompatADContract','Set-CompatADMSApplicationLogo','Add-CompatADMSScopedRoleMembership','New-CompatADMSRoleDefinition','New-CompatADTrustedCertificateAuthority','Set-CompatADUser','Get-CompatADUserDirectReport','Remove-CompatADDirectoryRoleMember','Remove-CompatADApplicationOwner','Set-CompatADDomain','Remove-CompatADMSNamedLocationPolicy','Set-CompatADMSApplication','Get-CompatADMSApplicationOwner','New-CompatADApplication','Get-CompatADDevice','Get-CompatADUser','New-CompatADServicePrincipalPasswordCredential','Get-CompatADMSApplicationExtensionProperty','Get-CompatADMSGroupLifecyclePolicy','Get-CompatADCurrentSessionInfo','Get-CompatADMSGroup','Get-CompatADDeviceRegisteredOwner','Get-CompatADMSNamedLocationPolicy','New-CompatADMSAdministrativeUnit','Remove-CompatADDeletedApplication','Select-CompatADGroupIdsContactIsMemberOf','Add-CompatADMSAdministrativeUnitMember','Remove-CompatADServicePrincipalPasswordCredential','Get-CompatADObjectByObjectId','Remove-CompatADContact','Get-CompatADServiceAppRoleAssignedTo','Remove-CompatADDeviceRegisteredOwner','New-CompatADMSPermissionGrantPolicy','Set-CompatADServicePrincipal','Remove-CompatADMSPermissionGrantConditionSet','Get-CompatADServicePrincipalPasswordCredential','Get-CompatADDirectoryRoleMember','New-CompatADMSGroupLifecyclePolicy','Get-CompatADMSScopedRoleMembership','New-CompatADMSConditionalAccessPolicy','Remove-CompatADUserManager','New-CompatADServicePrincipal','Get-CompatADDirectoryRole','Get-CompatADServicePrincipal','Set-CompatADUserManager','Set-CompatADTenantDetail','New-CompatADApplicationExtensionProperty','New-CompatADUserAppRoleAssignment','Get-CompatADMSDeletedDirectoryObject','Get-CompatADApplicationLogo','Set-CompatADDevice','Set-CompatADMSPermissionGrantPolicy','New-CompatADMSApplication','Get-CompatADSubscribedSku','Remove-CompatADMSApplicationPassword','Get-CompatADMSAdministrativeUnitMember','Get-CompatADUserMembership','Remove-CompatADMSApplicationOwner','New-CompatADApplicationKeyCredential','Enable-CompatADDirectoryRole','Get-CompatADMSAdministrativeUnit','Remove-CompatADServicePrincipal','Restore-CompatADDeletedApplication','New-CompatADMSInvitation','Get-CompatADTenantDetail','New-CompatADApplicationPasswordCredential','Test-CompatADScript','Get-CompatADUnsupportedCommand','Set-CompatADAlias' ) Set-Variable -name MISSING_CMDS -value @('Set-AzureADApplicationProxyApplicationSingleSignOn','Set-AzureADApplicationProxyConnector','Get-AzureADApplicationProxyConnectorGroupMember','New-AzureADServicePrincipalKeyCredential','Set-AzureADApplicationProxyApplication','Get-AzureADApplicationProxyApplication','Get-AzureADDeviceConfiguration','Get-AzureADApplicationProxyConnectorMemberOf','Set-AzureADApplicationProxyApplicationCustomDomainCertificate','Remove-AzureADApplicationProxyConnectorGroup','Get-AzureADContactThumbnailPhoto','Get-AzureADApplicationProxyConnectorGroup','New-AzureADApplicationProxyApplication','New-AzureADApplicationProxyConnectorGroup','Get-AzureADApplicationProxyConnector','Set-AzureADApplicationProxyConnectorGroup','Set-AzureADApplicationProxyApplicationConnectorGroup','Remove-AzureADApplicationProxyApplication','Remove-AzureADApplicationProxyApplicationConnectorGroup','Get-AzureADApplicationProxyApplicationConnectorGroup','Remove-AzureADContactManager') -Scope Global -Option ReadOnly -Force # SIG # Begin signature block # MIInpQYJKoZIhvcNAQcCoIInljCCJ5ICAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAPwYxZemab/H38 # 8eUClSCi+ltnnuLkwAOGlUVnnxjJWaCCDYUwggYDMIID66ADAgECAhMzAAADTU6R # phoosHiPAAAAAANNMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjMwMzE2MTg0MzI4WhcNMjQwMzE0MTg0MzI4WjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB # AQDUKPcKGVa6cboGQU03ONbUKyl4WpH6Q2Xo9cP3RhXTOa6C6THltd2RfnjlUQG+ # Mwoy93iGmGKEMF/jyO2XdiwMP427j90C/PMY/d5vY31sx+udtbif7GCJ7jJ1vLzd # j28zV4r0FGG6yEv+tUNelTIsFmmSb0FUiJtU4r5sfCThvg8dI/F9Hh6xMZoVti+k # bVla+hlG8bf4s00VTw4uAZhjGTFCYFRytKJ3/mteg2qnwvHDOgV7QSdV5dWdd0+x # zcuG0qgd3oCCAjH8ZmjmowkHUe4dUmbcZfXsgWlOfc6DG7JS+DeJak1DvabamYqH # g1AUeZ0+skpkwrKwXTFwBRltAgMBAAGjggGCMIIBfjAfBgNVHSUEGDAWBgorBgEE # AYI3TAgBBggrBgEFBQcDAzAdBgNVHQ4EFgQUId2Img2Sp05U6XI04jli2KohL+8w # VAYDVR0RBE0wS6RJMEcxLTArBgNVBAsTJE1pY3Jvc29mdCBJcmVsYW5kIE9wZXJh # dGlvbnMgTGltaXRlZDEWMBQGA1UEBRMNMjMwMDEyKzUwMDUxNzAfBgNVHSMEGDAW # gBRIbmTlUAXTgqoXNzcitW2oynUClTBUBgNVHR8ETTBLMEmgR6BFhkNodHRwOi8v # d3d3Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2NybC9NaWNDb2RTaWdQQ0EyMDExXzIw # MTEtMDctMDguY3JsMGEGCCsGAQUFBwEBBFUwUzBRBggrBgEFBQcwAoZFaHR0cDov # L3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9jZXJ0cy9NaWNDb2RTaWdQQ0EyMDEx # XzIwMTEtMDctMDguY3J0MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQELBQADggIB # ACMET8WuzLrDwexuTUZe9v2xrW8WGUPRQVmyJ1b/BzKYBZ5aU4Qvh5LzZe9jOExD # YUlKb/Y73lqIIfUcEO/6W3b+7t1P9m9M1xPrZv5cfnSCguooPDq4rQe/iCdNDwHT # 6XYW6yetxTJMOo4tUDbSS0YiZr7Mab2wkjgNFa0jRFheS9daTS1oJ/z5bNlGinxq # 2v8azSP/GcH/t8eTrHQfcax3WbPELoGHIbryrSUaOCphsnCNUqUN5FbEMlat5MuY # 94rGMJnq1IEd6S8ngK6C8E9SWpGEO3NDa0NlAViorpGfI0NYIbdynyOB846aWAjN # fgThIcdzdWFvAl/6ktWXLETn8u/lYQyWGmul3yz+w06puIPD9p4KPiWBkCesKDHv # XLrT3BbLZ8dKqSOV8DtzLFAfc9qAsNiG8EoathluJBsbyFbpebadKlErFidAX8KE # usk8htHqiSkNxydamL/tKfx3V/vDAoQE59ysv4r3pE+zdyfMairvkFNNw7cPn1kH # Gcww9dFSY2QwAxhMzmoM0G+M+YvBnBu5wjfxNrMRilRbxM6Cj9hKFh0YTwba6M7z # ntHHpX3d+nabjFm/TnMRROOgIXJzYbzKKaO2g1kWeyG2QtvIR147zlrbQD4X10Ab # rRg9CpwW7xYxywezj+iNAc+QmFzR94dzJkEPUSCJPsTFMIIHejCCBWKgAwIBAgIK # YQ6Q0gAAAAAAAzANBgkqhkiG9w0BAQsFADCBiDELMAkGA1UEBhMCVVMxEzARBgNV # BAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jv # c29mdCBDb3Jwb3JhdGlvbjEyMDAGA1UEAxMpTWljcm9zb2Z0IFJvb3QgQ2VydGlm # aWNhdGUgQXV0aG9yaXR5IDIwMTEwHhcNMTEwNzA4MjA1OTA5WhcNMjYwNzA4MjEw # OTA5WjB+MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UE # BxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSgwJgYD # VQQDEx9NaWNyb3NvZnQgQ29kZSBTaWduaW5nIFBDQSAyMDExMIICIjANBgkqhkiG # 9w0BAQEFAAOCAg8AMIICCgKCAgEAq/D6chAcLq3YbqqCEE00uvK2WCGfQhsqa+la # UKq4BjgaBEm6f8MMHt03a8YS2AvwOMKZBrDIOdUBFDFC04kNeWSHfpRgJGyvnkmc # 6Whe0t+bU7IKLMOv2akrrnoJr9eWWcpgGgXpZnboMlImEi/nqwhQz7NEt13YxC4D # dato88tt8zpcoRb0RrrgOGSsbmQ1eKagYw8t00CT+OPeBw3VXHmlSSnnDb6gE3e+ # lD3v++MrWhAfTVYoonpy4BI6t0le2O3tQ5GD2Xuye4Yb2T6xjF3oiU+EGvKhL1nk # kDstrjNYxbc+/jLTswM9sbKvkjh+0p2ALPVOVpEhNSXDOW5kf1O6nA+tGSOEy/S6 # A4aN91/w0FK/jJSHvMAhdCVfGCi2zCcoOCWYOUo2z3yxkq4cI6epZuxhH2rhKEmd # X4jiJV3TIUs+UsS1Vz8kA/DRelsv1SPjcF0PUUZ3s/gA4bysAoJf28AVs70b1FVL # 5zmhD+kjSbwYuER8ReTBw3J64HLnJN+/RpnF78IcV9uDjexNSTCnq47f7Fufr/zd # sGbiwZeBe+3W7UvnSSmnEyimp31ngOaKYnhfsi+E11ecXL93KCjx7W3DKI8sj0A3 # T8HhhUSJxAlMxdSlQy90lfdu+HggWCwTXWCVmj5PM4TasIgX3p5O9JawvEagbJjS # 4NaIjAsCAwEAAaOCAe0wggHpMBAGCSsGAQQBgjcVAQQDAgEAMB0GA1UdDgQWBBRI # bmTlUAXTgqoXNzcitW2oynUClTAZBgkrBgEEAYI3FAIEDB4KAFMAdQBiAEMAQTAL # BgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBRyLToCMZBD # uRQFTuHqp8cx0SOJNDBaBgNVHR8EUzBRME+gTaBLhklodHRwOi8vY3JsLm1pY3Jv # c29mdC5jb20vcGtpL2NybC9wcm9kdWN0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFf # MDNfMjIuY3JsMF4GCCsGAQUFBwEBBFIwUDBOBggrBgEFBQcwAoZCaHR0cDovL3d3 # dy5taWNyb3NvZnQuY29tL3BraS9jZXJ0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFf # MDNfMjIuY3J0MIGfBgNVHSAEgZcwgZQwgZEGCSsGAQQBgjcuAzCBgzA/BggrBgEF # BQcCARYzaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9kb2NzL3ByaW1h # cnljcHMuaHRtMEAGCCsGAQUFBwICMDQeMiAdAEwAZQBnAGEAbABfAHAAbwBsAGkA # YwB5AF8AcwB0AGEAdABlAG0AZQBuAHQALiAdMA0GCSqGSIb3DQEBCwUAA4ICAQBn # 8oalmOBUeRou09h0ZyKbC5YR4WOSmUKWfdJ5DJDBZV8uLD74w3LRbYP+vj/oCso7 # v0epo/Np22O/IjWll11lhJB9i0ZQVdgMknzSGksc8zxCi1LQsP1r4z4HLimb5j0b # pdS1HXeUOeLpZMlEPXh6I/MTfaaQdION9MsmAkYqwooQu6SpBQyb7Wj6aC6VoCo/ # KmtYSWMfCWluWpiW5IP0wI/zRive/DvQvTXvbiWu5a8n7dDd8w6vmSiXmE0OPQvy # CInWH8MyGOLwxS3OW560STkKxgrCxq2u5bLZ2xWIUUVYODJxJxp/sfQn+N4sOiBp # mLJZiWhub6e3dMNABQamASooPoI/E01mC8CzTfXhj38cbxV9Rad25UAqZaPDXVJi # hsMdYzaXht/a8/jyFqGaJ+HNpZfQ7l1jQeNbB5yHPgZ3BtEGsXUfFL5hYbXw3MYb # BL7fQccOKO7eZS/sl/ahXJbYANahRr1Z85elCUtIEJmAH9AAKcWxm6U/RXceNcbS # oqKfenoi+kiVH6v7RyOA9Z74v2u3S5fi63V4GuzqN5l5GEv/1rMjaHXmr/r8i+sL # gOppO6/8MO0ETI7f33VtY5E90Z1WTk+/gFcioXgRMiF670EKsT/7qMykXcGhiJtX # cVZOSEXAQsmbdlsKgEhr/Xmfwb1tbWrJUnMTDXpQzTGCGXYwghlyAgEBMIGVMH4x # CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRt # b25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01p # Y3Jvc29mdCBDb2RlIFNpZ25pbmcgUENBIDIwMTECEzMAAANNTpGmGiiweI8AAAAA # A00wDQYJYIZIAWUDBAIBBQCgga4wGQYJKoZIhvcNAQkDMQwGCisGAQQBgjcCAQQw # HAYKKwYBBAGCNwIBCzEOMAwGCisGAQQBgjcCARUwLwYJKoZIhvcNAQkEMSIEINj4 # otN6kt2F4gDHawyWXC64Cx3vB+NxFRTz0Kqotz8fMEIGCisGAQQBgjcCAQwxNDAy # oBSAEgBNAGkAYwByAG8AcwBvAGYAdKEagBhodHRwOi8vd3d3Lm1pY3Jvc29mdC5j # b20wDQYJKoZIhvcNAQEBBQAEggEAbTjNIn/ZRWqDVkbXpLH4H1Oe6Vd6U7p3soHN # GMFX/2IYWR1GbtIR9R28MGt1Yj1/t5NOruC8AtUD4r3bxaWtbbvZi5JxABVzHvLF # 4Nlj2gZPp4xzpHU+Uz9gpSA0K0H9aUnErteUrGdio/QMX0ncAiKqOKGbTcP0qxjf # 6NTxbaSVpAmJqFXCiUU+wCHgGM7BZVgjGor/ZsJwUyBAqty8ILSFLnKt8htPPpeF # ecbCLtlahcXXbzVj7gRIgIsEUle5TYUfXUVkRhOpm7PNxxVsaJuKELw7Ad2xFBoA # yiShtgti1ovC0Zx9pI2wOmancKP4joYJHQOr8VWEImZl07CvYqGCFwAwghb8Bgor # BgEEAYI3AwMBMYIW7DCCFugGCSqGSIb3DQEHAqCCFtkwghbVAgEDMQ8wDQYJYIZI # AWUDBAIBBQAwggFRBgsqhkiG9w0BCRABBKCCAUAEggE8MIIBOAIBAQYKKwYBBAGE # WQoDATAxMA0GCWCGSAFlAwQCAQUABCDF8VLq/q5nL/+zL9DrLlJ0Ol2Uu0xWnw2o # GJu9AKcbBAIGZItjGQJHGBMyMDIzMDYyODE1NDQ1Mi41NTlaMASAAgH0oIHQpIHN # MIHKMQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMH # UmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSUwIwYDVQQL # ExxNaWNyb3NvZnQgQW1lcmljYSBPcGVyYXRpb25zMSYwJAYDVQQLEx1UaGFsZXMg # VFNTIEVTTjo0OUJDLUUzN0EtMjMzQzElMCMGA1UEAxMcTWljcm9zb2Z0IFRpbWUt # U3RhbXAgU2VydmljZaCCEVcwggcMMIIE9KADAgECAhMzAAABwFWkjcNkFcVLAAEA # AAHAMA0GCSqGSIb3DQEBCwUAMHwxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNo # aW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29y # cG9yYXRpb24xJjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEw # MB4XDTIyMTEwNDE5MDEyNVoXDTI0MDIwMjE5MDEyNVowgcoxCzAJBgNVBAYTAlVT # MRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQK # ExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xJTAjBgNVBAsTHE1pY3Jvc29mdCBBbWVy # aWNhIE9wZXJhdGlvbnMxJjAkBgNVBAsTHVRoYWxlcyBUU1MgRVNOOjQ5QkMtRTM3 # QS0yMzNDMSUwIwYDVQQDExxNaWNyb3NvZnQgVGltZS1TdGFtcCBTZXJ2aWNlMIIC # IjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAvO1g+2NhhmBQvlGlCTOMaFw3 # jbIhUdDTqkaQhRpdHVb+huU/0HNhLmoRYvrp7z5vIoL1MPAkVBFWJIkrcG7sSred # nyZwreY207C9n8XivL9ZBOQeiUeL/TMlJ6VinrcafbhdnkNO5JDlPozC9dGySiub # ryds5GKtu69D1wNat9DIQl6alFO6pncZK4RIzfv+KzkM7RkY3vHphV0C8EFUpF+l # ysaGJXFf9QsUUHwj9XKWHfc9BfhLoCReXUzvgrspdFmVnA9ATYXmidSjrshf8A+E # 0/FpTdhXPI9XXqsZDHBqr7DlYoSCU3lvrVDRu1p5pHHf7s3kM16HpK6arDtY3ai1 # soASmEpv3C2N/y5MDBApDd4SpSkLMa7+6es/daeS7zdH1qdCa2RoJPM6Eh/6YmBf # ofhfLQofKPJl34ALlZWK5AzVtFRNOXacoj6MAG2dT8Rc5fpKCH1E3n7Zje0dK24Q # VfSv/YOxw52ECaMLlW5PhHT3ZINNaCmRgcHCTClOKzC2FOr03YBc2zPOW6bIVdXl # oPmBMVaE+thXqPmANBw0YsncaOkVggjDb5O5VqOp98MklHpJoJI6pk5zAlx8/OtC # 7FutrdtYNUC6ykXzMAPFuYkWGgx/W7A0itKW8WzYzwO3bAhprwznouGZmRiw2k8p # en80BzqzdyPvbzTxQsMCAwEAAaOCATYwggEyMB0GA1UdDgQWBBQARMZ480jwpK3P # 6quVWUEJ0c30hTAfBgNVHSMEGDAWgBSfpxVdAF5iXYP05dJlpxtTNRnpcjBfBgNV # HR8EWDBWMFSgUqBQhk5odHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2Ny # bC9NaWNyb3NvZnQlMjBUaW1lLVN0YW1wJTIwUENBJTIwMjAxMCgxKS5jcmwwbAYI # KwYBBQUHAQEEYDBeMFwGCCsGAQUFBzAChlBodHRwOi8vd3d3Lm1pY3Jvc29mdC5j # b20vcGtpb3BzL2NlcnRzL01pY3Jvc29mdCUyMFRpbWUtU3RhbXAlMjBQQ0ElMjAy # MDEwKDEpLmNydDAMBgNVHRMBAf8EAjAAMBMGA1UdJQQMMAoGCCsGAQUFBwMIMA0G # CSqGSIb3DQEBCwUAA4ICAQCtTh0EQn16kKQyCeVk9Vc10m6L0EwLRo3ATRouP7Yd # 2hWeEB2Y4ZF4CJKe9qfXWGJKzV7tMUm6DAsBKYH/nT+8ybI8uJiHGnfnVi6Sh7gF # jnTpfh1j1T90H/uLeoFjpOn/+eoCoJmorW5Gb2ezlTlo5I0kNAubxtCxqbLizuPN # Pob8kRAKQgv+4/CC1JmiUFG0uKINlKj9SsHcrWeBBQHX62nNgziIwT44JqHrA02I # 6cmQAi9BZcsf57OOLpRYlzoPH3x/+ldSySXAmyLq2uSbWtQuD84I/0ZgS/B5L3ew # qTdiE1KbKX89MW5JqCK/yI/mAIQammAlHPqU9eZZTMPOHQs0XrpCijlk+qyo2JaH # iySww6nuPqXzU3sEj3VW00YiVSayKEu1IrRzzX3La8qe6OqLTvK/6gu5XdKq7TT8 # 52nB6IP0QM+Budtr4Fbx4/svpKHGpK9/zBuaHHDXX5AoSksh/kSDYKfefQIhIfQJ # JzoE3X+MimMJrgrwZXltb6j1IL0HY3qCpa03Ghgi0ITzqfkw3Man3G8kB1Ql+SeN # ciPUj73Kn2veJenGLtT8JkUM9RUi0woO0iuY4tJnYuS+SeqavXUOWqUYVY19FIr1 # PLqpmWkbrO5xKjkyOHoAmLxjNbKjOnkAwft+1G00kulKqzqPbm+Sn+47JsGQFhNG # bTCCB3EwggVZoAMCAQICEzMAAAAVxedrngKbSZkAAAAAABUwDQYJKoZIhvcNAQEL # BQAwgYgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQH # EwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xMjAwBgNV # BAMTKU1pY3Jvc29mdCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAyMDEwMB4X # DTIxMDkzMDE4MjIyNVoXDTMwMDkzMDE4MzIyNVowfDELMAkGA1UEBhMCVVMxEzAR # BgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1p # Y3Jvc29mdCBDb3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3Rh # bXAgUENBIDIwMTAwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDk4aZM # 57RyIQt5osvXJHm9DtWC0/3unAcH0qlsTnXIyjVX9gF/bErg4r25PhdgM/9cT8dm # 95VTcVrifkpa/rg2Z4VGIwy1jRPPdzLAEBjoYH1qUoNEt6aORmsHFPPFdvWGUNzB # RMhxXFExN6AKOG6N7dcP2CZTfDlhAnrEqv1yaa8dq6z2Nr41JmTamDu6GnszrYBb # fowQHJ1S/rboYiXcag/PXfT+jlPP1uyFVk3v3byNpOORj7I5LFGc6XBpDco2LXCO # Mcg1KL3jtIckw+DJj361VI/c+gVVmG1oO5pGve2krnopN6zL64NF50ZuyjLVwIYw # XE8s4mKyzbnijYjklqwBSru+cakXW2dg3viSkR4dPf0gz3N9QZpGdc3EXzTdEonW # /aUgfX782Z5F37ZyL9t9X4C626p+Nuw2TPYrbqgSUei/BQOj0XOmTTd0lBw0gg/w # EPK3Rxjtp+iZfD9M269ewvPV2HM9Q07BMzlMjgK8QmguEOqEUUbi0b1qGFphAXPK # Z6Je1yh2AuIzGHLXpyDwwvoSCtdjbwzJNmSLW6CmgyFdXzB0kZSU2LlQ+QuJYfM2 # BjUYhEfb3BvR/bLUHMVr9lxSUV0S2yW6r1AFemzFER1y7435UsSFF5PAPBXbGjfH # CBUYP3irRbb1Hode2o+eFnJpxq57t7c+auIurQIDAQABo4IB3TCCAdkwEgYJKwYB # BAGCNxUBBAUCAwEAATAjBgkrBgEEAYI3FQIEFgQUKqdS/mTEmr6CkTxGNSnPEP8v # BO4wHQYDVR0OBBYEFJ+nFV0AXmJdg/Tl0mWnG1M1GelyMFwGA1UdIARVMFMwUQYM # KwYBBAGCN0yDfQEBMEEwPwYIKwYBBQUHAgEWM2h0dHA6Ly93d3cubWljcm9zb2Z0 # LmNvbS9wa2lvcHMvRG9jcy9SZXBvc2l0b3J5Lmh0bTATBgNVHSUEDDAKBggrBgEF # BQcDCDAZBgkrBgEEAYI3FAIEDB4KAFMAdQBiAEMAQTALBgNVHQ8EBAMCAYYwDwYD # VR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBTV9lbLj+iiXGJo0T2UkFvXzpoYxDBW # BgNVHR8ETzBNMEugSaBHhkVodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpL2Ny # bC9wcm9kdWN0cy9NaWNSb29DZXJBdXRfMjAxMC0wNi0yMy5jcmwwWgYIKwYBBQUH # AQEETjBMMEoGCCsGAQUFBzAChj5odHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtp # L2NlcnRzL01pY1Jvb0NlckF1dF8yMDEwLTA2LTIzLmNydDANBgkqhkiG9w0BAQsF # AAOCAgEAnVV9/Cqt4SwfZwExJFvhnnJL/Klv6lwUtj5OR2R4sQaTlz0xM7U518Jx # Nj/aZGx80HU5bbsPMeTCj/ts0aGUGCLu6WZnOlNN3Zi6th542DYunKmCVgADsAW+ # iehp4LoJ7nvfam++Kctu2D9IdQHZGN5tggz1bSNU5HhTdSRXud2f8449xvNo32X2 # pFaq95W2KFUn0CS9QKC/GbYSEhFdPSfgQJY4rPf5KYnDvBewVIVCs/wMnosZiefw # C2qBwoEZQhlSdYo2wh3DYXMuLGt7bj8sCXgU6ZGyqVvfSaN0DLzskYDSPeZKPmY7 # T7uG+jIa2Zb0j/aRAfbOxnT99kxybxCrdTDFNLB62FD+CljdQDzHVG2dY3RILLFO # Ry3BFARxv2T5JL5zbcqOCb2zAVdJVGTZc9d/HltEAY5aGZFrDZ+kKNxnGSgkujhL # mm77IVRrakURR6nxt67I6IleT53S0Ex2tVdUCbFpAUR+fKFhbHP+CrvsQWY9af3L # wUFJfn6Tvsv4O+S3Fb+0zj6lMVGEvL8CwYKiexcdFYmNcP7ntdAoGokLjzbaukz5 # m/8K6TT4JDVnK+ANuOaMmdbhIurwJ0I9JZTmdHRbatGePu1+oDEzfbzL6Xu/OHBE # 0ZDxyKs6ijoIYn/ZcGNTTY3ugm2lBRDBcQZqELQdVTNYs6FwZvKhggLOMIICNwIB # ATCB+KGB0KSBzTCByjELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24x # EDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlv # bjElMCMGA1UECxMcTWljcm9zb2Z0IEFtZXJpY2EgT3BlcmF0aW9uczEmMCQGA1UE # CxMdVGhhbGVzIFRTUyBFU046NDlCQy1FMzdBLTIzM0MxJTAjBgNVBAMTHE1pY3Jv # c29mdCBUaW1lLVN0YW1wIFNlcnZpY2WiIwoBATAHBgUrDgMCGgMVABAQ7ExF19Kk # wVL1E3Ad8k0Peb6doIGDMIGApH4wfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldh # c2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBD # b3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIw # MTAwDQYJKoZIhvcNAQEFBQACBQDoRlrwMCIYDzIwMjMwNjI4MTUwODMyWhgPMjAy # MzA2MjkxNTA4MzJaMHcwPQYKKwYBBAGEWQoEATEvMC0wCgIFAOhGWvACAQAwCgIB # AAICFPACAf8wBwIBAAICEVkwCgIFAOhHrHACAQAwNgYKKwYBBAGEWQoEAjEoMCYw # DAYKKwYBBAGEWQoDAqAKMAgCAQACAwehIKEKMAgCAQACAwGGoDANBgkqhkiG9w0B # AQUFAAOBgQBIo+O2vjRVEFeEBu8w5GjtT1Ejtt68iyIRTuzwncX0TPmw2D2n+Kbr # nuGiIksbOBh1TckrROQKKah0gd6jpVwTPsy+mCofo1Nw5uIcaFpwGPQROrDnYbLC # +5hiW3bUuxONFkm3VGGldzUkgLYZKjrq1X+sY1JMBk7X6rmoGb2cVTGCBA0wggQJ # AgEBMIGTMHwxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYD # VQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xJjAk # BgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwAhMzAAABwFWkjcNk # FcVLAAEAAAHAMA0GCWCGSAFlAwQCAQUAoIIBSjAaBgkqhkiG9w0BCQMxDQYLKoZI # hvcNAQkQAQQwLwYJKoZIhvcNAQkEMSIEIKpj4GXKFH91YCP3wQFolvJFwb2iIQUx # p7Kov+78REs4MIH6BgsqhkiG9w0BCRACLzGB6jCB5zCB5DCBvQQgWvFYolIIXME0 # zK/W6XsCkkYX7lYNb9yA8JxwY04Pk08wgZgwgYCkfjB8MQswCQYDVQQGEwJVUzET # MBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMV # TWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYDVQQDEx1NaWNyb3NvZnQgVGltZS1T # dGFtcCBQQ0EgMjAxMAITMwAAAcBVpI3DZBXFSwABAAABwDAiBCCFGFhHFnV+U8BA # bByhoCPIgwN7MKJOch9YX7sjxFLTsTANBgkqhkiG9w0BAQsFAASCAgCT1LzNYQO8 # l3lMYtCrW1Waq/aqG2wQKmQWIgSfjQgEPYbCBERy4WuQraulVggLf/bgTgGnUoPV # 8N2nr2t8jl3N9IokPAdstdSudXdMS9gmtfisT+sVB8h+jLPmM0IKz7bnEHESqnSd # WQr5vYoFmhQLdMEhlPYuBzngYk8Ttu8/ItkwFd4qScbmwcfOyfzk6wHZX24yJtsq # op3tTQLbA3W9QedLL//s0zVJiqgDr0LxS772kmrQIqhFPxEutKG0bsdfDjf9gf0H # ZMnUEw1ad1fU22TSaXbcScksePnBtvNGMEBOPmH8Gfi8vKZUqKHbDMRITktTFN9M # TfOX3wUkZW2MMD+8hv9/rYYnhW4mkaGdbJjLAHSpKSXLVrPy2w5hPcaCNoMU7gpB # Lz8EuHMs7IyypAQDJCByF98TacKu8by7s4KkR0L+FChEj2O6yA/frdSR5MrSORC1 # NbTJ8tqEN5z8iJKaDTUaD3lwelyj6kU6aQ1v1Gx3eYgvlgQ8+gg7HPwuQvw+kS5V # Dk6FhAyHXWHMsdWvYkkMtOq4qRMDVWmg+HMAosHmRapSSn/lF2Mw3mmAJo01uKan # SWKTKl3rz/0p6Yep2ckjiP/UpJEk3vYlW1B64aHaMx0Bj/rHENcVc70fhbCETla9 # 6+QXvHApligIZ8zqrr9LnRJfZOFiSxXB8g== # SIG # End signature block |