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 # MIInwgYJKoZIhvcNAQcCoIInszCCJ68CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAPwYxZemab/H38 # 8eUClSCi+ltnnuLkwAOGlUVnnxjJWaCCDXYwggX0MIID3KADAgECAhMzAAADTrU8 # esGEb+srAAAAAANOMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjMwMzE2MTg0MzI5WhcNMjQwMzE0MTg0MzI5WjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB # AQDdCKiNI6IBFWuvJUmf6WdOJqZmIwYs5G7AJD5UbcL6tsC+EBPDbr36pFGo1bsU # p53nRyFYnncoMg8FK0d8jLlw0lgexDDr7gicf2zOBFWqfv/nSLwzJFNP5W03DF/1 # 1oZ12rSFqGlm+O46cRjTDFBpMRCZZGddZlRBjivby0eI1VgTD1TvAdfBYQe82fhm # WQkYR/lWmAK+vW/1+bO7jHaxXTNCxLIBW07F8PBjUcwFxxyfbe2mHB4h1L4U0Ofa # +HX/aREQ7SqYZz59sXM2ySOfvYyIjnqSO80NGBaz5DvzIG88J0+BNhOu2jl6Dfcq # jYQs1H/PMSQIK6E7lXDXSpXzAgMBAAGjggFzMIIBbzAfBgNVHSUEGDAWBgorBgEE # AYI3TAgBBggrBgEFBQcDAzAdBgNVHQ4EFgQUnMc7Zn/ukKBsBiWkwdNfsN5pdwAw # RQYDVR0RBD4wPKQ6MDgxHjAcBgNVBAsTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEW # MBQGA1UEBRMNMjMwMDEyKzUwMDUxNjAfBgNVHSMEGDAWgBRIbmTlUAXTgqoXNzci # tW2oynUClTBUBgNVHR8ETTBLMEmgR6BFhkNodHRwOi8vd3d3Lm1pY3Jvc29mdC5j # b20vcGtpb3BzL2NybC9NaWNDb2RTaWdQQ0EyMDExXzIwMTEtMDctMDguY3JsMGEG # CCsGAQUFBwEBBFUwUzBRBggrBgEFBQcwAoZFaHR0cDovL3d3dy5taWNyb3NvZnQu # Y29tL3BraW9wcy9jZXJ0cy9NaWNDb2RTaWdQQ0EyMDExXzIwMTEtMDctMDguY3J0 # MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQELBQADggIBAD21v9pHoLdBSNlFAjmk # mx4XxOZAPsVxxXbDyQv1+kGDe9XpgBnT1lXnx7JDpFMKBwAyIwdInmvhK9pGBa31 # TyeL3p7R2s0L8SABPPRJHAEk4NHpBXxHjm4TKjezAbSqqbgsy10Y7KApy+9UrKa2 # kGmsuASsk95PVm5vem7OmTs42vm0BJUU+JPQLg8Y/sdj3TtSfLYYZAaJwTAIgi7d # hzn5hatLo7Dhz+4T+MrFd+6LUa2U3zr97QwzDthx+RP9/RZnur4inzSQsG5DCVIM # pA1l2NWEA3KAca0tI2l6hQNYsaKL1kefdfHCrPxEry8onJjyGGv9YKoLv6AOO7Oh # JEmbQlz/xksYG2N/JSOJ+QqYpGTEuYFYVWain7He6jgb41JbpOGKDdE/b+V2q/gX # UgFe2gdwTpCDsvh8SMRoq1/BNXcr7iTAU38Vgr83iVtPYmFhZOVM0ULp/kKTVoir # IpP2KCxT4OekOctt8grYnhJ16QMjmMv5o53hjNFXOxigkQWYzUO+6w50g0FAeFa8 # 5ugCCB6lXEk21FFB1FdIHpjSQf+LP/W2OV/HfhC3uTPgKbRtXo83TZYEudooyZ/A # Vu08sibZ3MkGOJORLERNwKm2G7oqdOv4Qj8Z0JrGgMzj46NFKAxkLSpE5oHQYP1H # tPx1lPfD7iNSbJsP6LiUHXH1MIIHejCCBWKgAwIBAgIKYQ6Q0gAAAAAAAzANBgkq # hkiG9w0BAQsFADCBiDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24x # EDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlv # bjEyMDAGA1UEAxMpTWljcm9zb2Z0IFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5 # IDIwMTEwHhcNMTEwNzA4MjA1OTA5WhcNMjYwNzA4MjEwOTA5WjB+MQswCQYDVQQG # EwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwG # A1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSgwJgYDVQQDEx9NaWNyb3NvZnQg # Q29kZSBTaWduaW5nIFBDQSAyMDExMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC # CgKCAgEAq/D6chAcLq3YbqqCEE00uvK2WCGfQhsqa+laUKq4BjgaBEm6f8MMHt03 # a8YS2AvwOMKZBrDIOdUBFDFC04kNeWSHfpRgJGyvnkmc6Whe0t+bU7IKLMOv2akr # rnoJr9eWWcpgGgXpZnboMlImEi/nqwhQz7NEt13YxC4Ddato88tt8zpcoRb0Rrrg # OGSsbmQ1eKagYw8t00CT+OPeBw3VXHmlSSnnDb6gE3e+lD3v++MrWhAfTVYoonpy # 4BI6t0le2O3tQ5GD2Xuye4Yb2T6xjF3oiU+EGvKhL1nkkDstrjNYxbc+/jLTswM9 # sbKvkjh+0p2ALPVOVpEhNSXDOW5kf1O6nA+tGSOEy/S6A4aN91/w0FK/jJSHvMAh # dCVfGCi2zCcoOCWYOUo2z3yxkq4cI6epZuxhH2rhKEmdX4jiJV3TIUs+UsS1Vz8k # A/DRelsv1SPjcF0PUUZ3s/gA4bysAoJf28AVs70b1FVL5zmhD+kjSbwYuER8ReTB # w3J64HLnJN+/RpnF78IcV9uDjexNSTCnq47f7Fufr/zdsGbiwZeBe+3W7UvnSSmn # Eyimp31ngOaKYnhfsi+E11ecXL93KCjx7W3DKI8sj0A3T8HhhUSJxAlMxdSlQy90 # lfdu+HggWCwTXWCVmj5PM4TasIgX3p5O9JawvEagbJjS4NaIjAsCAwEAAaOCAe0w # ggHpMBAGCSsGAQQBgjcVAQQDAgEAMB0GA1UdDgQWBBRIbmTlUAXTgqoXNzcitW2o # ynUClTAZBgkrBgEEAYI3FAIEDB4KAFMAdQBiAEMAQTALBgNVHQ8EBAMCAYYwDwYD # VR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBRyLToCMZBDuRQFTuHqp8cx0SOJNDBa # BgNVHR8EUzBRME+gTaBLhklodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpL2Ny # bC9wcm9kdWN0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFfMDNfMjIuY3JsMF4GCCsG # AQUFBwEBBFIwUDBOBggrBgEFBQcwAoZCaHR0cDovL3d3dy5taWNyb3NvZnQuY29t # L3BraS9jZXJ0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFfMDNfMjIuY3J0MIGfBgNV # HSAEgZcwgZQwgZEGCSsGAQQBgjcuAzCBgzA/BggrBgEFBQcCARYzaHR0cDovL3d3 # dy5taWNyb3NvZnQuY29tL3BraW9wcy9kb2NzL3ByaW1hcnljcHMuaHRtMEAGCCsG # AQUFBwICMDQeMiAdAEwAZQBnAGEAbABfAHAAbwBsAGkAYwB5AF8AcwB0AGEAdABl # AG0AZQBuAHQALiAdMA0GCSqGSIb3DQEBCwUAA4ICAQBn8oalmOBUeRou09h0ZyKb # C5YR4WOSmUKWfdJ5DJDBZV8uLD74w3LRbYP+vj/oCso7v0epo/Np22O/IjWll11l # hJB9i0ZQVdgMknzSGksc8zxCi1LQsP1r4z4HLimb5j0bpdS1HXeUOeLpZMlEPXh6 # I/MTfaaQdION9MsmAkYqwooQu6SpBQyb7Wj6aC6VoCo/KmtYSWMfCWluWpiW5IP0 # wI/zRive/DvQvTXvbiWu5a8n7dDd8w6vmSiXmE0OPQvyCInWH8MyGOLwxS3OW560 # STkKxgrCxq2u5bLZ2xWIUUVYODJxJxp/sfQn+N4sOiBpmLJZiWhub6e3dMNABQam # ASooPoI/E01mC8CzTfXhj38cbxV9Rad25UAqZaPDXVJihsMdYzaXht/a8/jyFqGa # J+HNpZfQ7l1jQeNbB5yHPgZ3BtEGsXUfFL5hYbXw3MYbBL7fQccOKO7eZS/sl/ah # XJbYANahRr1Z85elCUtIEJmAH9AAKcWxm6U/RXceNcbSoqKfenoi+kiVH6v7RyOA # 9Z74v2u3S5fi63V4GuzqN5l5GEv/1rMjaHXmr/r8i+sLgOppO6/8MO0ETI7f33Vt # Y5E90Z1WTk+/gFcioXgRMiF670EKsT/7qMykXcGhiJtXcVZOSEXAQsmbdlsKgEhr # /Xmfwb1tbWrJUnMTDXpQzTGCGaIwghmeAgEBMIGVMH4xCzAJBgNVBAYTAlVTMRMw # EQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVN # aWNyb3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNp # Z25pbmcgUENBIDIwMTECEzMAAANOtTx6wYRv6ysAAAAAA04wDQYJYIZIAWUDBAIB # BQCgga4wGQYJKoZIhvcNAQkDMQwGCisGAQQBgjcCAQQwHAYKKwYBBAGCNwIBCzEO # MAwGCisGAQQBgjcCARUwLwYJKoZIhvcNAQkEMSIEINj4otN6kt2F4gDHawyWXC64 # Cx3vB+NxFRTz0Kqotz8fMEIGCisGAQQBgjcCAQwxNDAyoBSAEgBNAGkAYwByAG8A # cwBvAGYAdKEagBhodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20wDQYJKoZIhvcNAQEB # BQAEggEAzwJQIYBmGL4x2exueVHMBGo1W4CjUp6RQTFPcroz/CnCoTLmX6+17cUn # i4OGEqba6fRPluJcS40r4wyJCYrShTI3IlargEsAvOd0BgHA8wUolo+Z3VOOc2pF # gyQ5any3ski0ssnzK6YKobjm4HC9Co4eG/BD9SkQe8g9owdwLoT2VX/Y/5Mufbjd # 7hdwWj+6K5oMXgsGwgirzMAkzB7loVf8RYiNYZFNyHx/tJdn2KUByJg4P5tfiMDV # 1RBcC/w1Tx3Of+wsGHplM9ArPwZNJVCKMsCRpPQqjWAobCI+kcnYwBbzioSf5PrK # l4yQu/e3MEFDLQJs4mWFdbkKM9lxOaGCFywwghcoBgorBgEEAYI3AwMBMYIXGDCC # FxQGCSqGSIb3DQEHAqCCFwUwghcBAgEDMQ8wDQYJYIZIAWUDBAIBBQAwggFZBgsq # hkiG9w0BCRABBKCCAUgEggFEMIIBQAIBAQYKKwYBBAGEWQoDATAxMA0GCWCGSAFl # AwQCAQUABCDgJ4LN6qGxXNlMnbrvZUjekiUkZzwiwhGY4fhYNawxvgIGZJLztJbA # GBMyMDIzMDYyNzE3MDA1Mi4zMzlaMASAAgH0oIHYpIHVMIHSMQswCQYDVQQGEwJV # UzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UE # ChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMS0wKwYDVQQLEyRNaWNyb3NvZnQgSXJl # bGFuZCBPcGVyYXRpb25zIExpbWl0ZWQxJjAkBgNVBAsTHVRoYWxlcyBUU1MgRVNO # OjA4NDItNEJFNi1DMjlBMSUwIwYDVQQDExxNaWNyb3NvZnQgVGltZS1TdGFtcCBT # ZXJ2aWNloIIRezCCBycwggUPoAMCAQICEzMAAAGybkADf26plJIAAQAAAbIwDQYJ # KoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24x # EDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlv # bjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIwMTAwHhcNMjIw # OTIwMjAyMjAxWhcNMjMxMjE0MjAyMjAxWjCB0jELMAkGA1UEBhMCVVMxEzARBgNV # BAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jv # c29mdCBDb3Jwb3JhdGlvbjEtMCsGA1UECxMkTWljcm9zb2Z0IElyZWxhbmQgT3Bl # cmF0aW9ucyBMaW1pdGVkMSYwJAYDVQQLEx1UaGFsZXMgVFNTIEVTTjowODQyLTRC # RTYtQzI5QTElMCMGA1UEAxMcTWljcm9zb2Z0IFRpbWUtU3RhbXAgU2VydmljZTCC # AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMqiZTIde/lQ4rC+Bml5f/Wu # q/xKTxrfbG23HofmQ+qZAN4GyO73PF3y9OAfpt7Qf2jcldWOGUB+HzBuwllYyP3f # x4MY8zvuAuB37FvoytnNC2DKnVrVlHOVcGUL9CnmhDNMA2/nskjIf2IoiG9J0qLY # r8duvHdQJ9Li2Pq9guySb9mvUL60ogslCO9gkh6FiEDwMrwUr8Wja6jFpUTny8tg # 0N0cnCN2w4fKkp5qZcbUYFYicLSb/6A7pHCtX6xnjqwhmJoib3vkKJyVxbuFLRhV # XxH95b0LHeNhifn3jvo2j+/4QV10jEpXVW+iC9BsTtR69xvTjU51ZgP7BR4YDEWq # 7JsylSOv5B5THTDXRf184URzFhTyb8OZQKY7mqMh7c8J8w1sEM4XDUF2UZNy829N # VCzG2tfdEXZaHxF8RmxpQYBxyhZwY1rotuIS+gfN2eq+hkAT3ipGn8/KmDwDtzAb # nfuXjApgeZqwgcYJ8pDJ+y/xU6ouzJz1Bve5TTihkiA7wQsQe6R60Zk9dPdNzw0M # K5niRzuQZAt4GI96FhjhlUWcUZOCkv/JXM/OGu/rgSplYwdmPLzzfDtXyuy/GCU5 # I4l08g6iifXypMgoYkkceOAAz4vx1x0BOnZWfI3fSwqNUvoN7ncTT+MB4Vpvf1QB # ppjBAQUuvui6eCG0MCVNAgMBAAGjggFJMIIBRTAdBgNVHQ4EFgQUmfIngFzZEZlP # kjDOVluBSDDaanEwHwYDVR0jBBgwFoAUn6cVXQBeYl2D9OXSZacbUzUZ6XIwXwYD # VR0fBFgwVjBUoFKgUIZOaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9j # cmwvTWljcm9zb2Z0JTIwVGltZS1TdGFtcCUyMFBDQSUyMDIwMTAoMSkuY3JsMGwG # CCsGAQUFBwEBBGAwXjBcBggrBgEFBQcwAoZQaHR0cDovL3d3dy5taWNyb3NvZnQu # Y29tL3BraW9wcy9jZXJ0cy9NaWNyb3NvZnQlMjBUaW1lLVN0YW1wJTIwUENBJTIw # MjAxMCgxKS5jcnQwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcD # CDAOBgNVHQ8BAf8EBAMCB4AwDQYJKoZIhvcNAQELBQADggIBANxHtu3FzIabaDbW # qswdKBlAhKXRCN+5CSMiv2TYa4i2QuWIm+99piwAhDhADfbqor1zyLi95Y6GQnvI # WUgdeC7oL1ZtZye92zYK+EIfwYZmhS+CH4infAzUvscHZF3wlrJUfPUIDGVP0lCY # Vse9mguvG0dqkY4ayQPEHOvJubgZZaOdg/N8dInd6fGeOc+0DoGzB+LieObJ2Q0A # tEt3XN3iX8Cp6+dZTX8xwE/LvhRwPpb/+nKshO7TVuvenwdTwqB/LT6CNPaElwFe # KxKrqRTPMbHeg+i+KnBLfwmhEXsMg2s1QX7JIxfvT96md0eiMjiMEO22LbOzmLMN # d3LINowAnRBAJtX+3/e390B9sMGMHp+a1V+hgs62AopBl0p/00li30DN5wEQ5If3 # 5Zk7b/T6pEx6rJUDYCti7zCbikjKTanBnOc99zGMlej5X+fC/k5ExUCrOs3/VzGR # CZt5LvVQSdWqq/QMzTEmim4sbzASK9imEkjNtZZyvC1CsUcD1voFktld4mKMjE+u # DEV3IddD+DrRk94nVzNPSuZXewfVOnXHSeqG7xM3V7fl2aL4v1OhL2+JwO1Tx3B0 # irO1O9qbNdJk355bntd1RSVKgM22KFBHnoL7Js7pRhBiaKmVTQGoOb+j1Qa7q+ci # xGo48Vh9k35BDsJS/DLoXFSPDl4mMIIHcTCCBVmgAwIBAgITMwAAABXF52ueAptJ # mQAAAAAAFTANBgkqhkiG9w0BAQsFADCBiDELMAkGA1UEBhMCVVMxEzARBgNVBAgT # Cldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29m # dCBDb3Jwb3JhdGlvbjEyMDAGA1UEAxMpTWljcm9zb2Z0IFJvb3QgQ2VydGlmaWNh # dGUgQXV0aG9yaXR5IDIwMTAwHhcNMjEwOTMwMTgyMjI1WhcNMzAwOTMwMTgzMjI1 # WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMH # UmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYDVQQD # Ex1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMDCCAiIwDQYJKoZIhvcNAQEB # BQADggIPADCCAgoCggIBAOThpkzntHIhC3miy9ckeb0O1YLT/e6cBwfSqWxOdcjK # NVf2AX9sSuDivbk+F2Az/1xPx2b3lVNxWuJ+Slr+uDZnhUYjDLWNE893MsAQGOhg # fWpSg0S3po5GawcU88V29YZQ3MFEyHFcUTE3oAo4bo3t1w/YJlN8OWECesSq/XJp # rx2rrPY2vjUmZNqYO7oaezOtgFt+jBAcnVL+tuhiJdxqD89d9P6OU8/W7IVWTe/d # vI2k45GPsjksUZzpcGkNyjYtcI4xyDUoveO0hyTD4MmPfrVUj9z6BVWYbWg7mka9 # 7aSueik3rMvrg0XnRm7KMtXAhjBcTyziYrLNueKNiOSWrAFKu75xqRdbZ2De+JKR # Hh09/SDPc31BmkZ1zcRfNN0Sidb9pSB9fvzZnkXftnIv231fgLrbqn427DZM9itu # qBJR6L8FA6PRc6ZNN3SUHDSCD/AQ8rdHGO2n6Jl8P0zbr17C89XYcz1DTsEzOUyO # ArxCaC4Q6oRRRuLRvWoYWmEBc8pnol7XKHYC4jMYctenIPDC+hIK12NvDMk2ZItb # oKaDIV1fMHSRlJTYuVD5C4lh8zYGNRiER9vcG9H9stQcxWv2XFJRXRLbJbqvUAV6 # bMURHXLvjflSxIUXk8A8FdsaN8cIFRg/eKtFtvUeh17aj54WcmnGrnu3tz5q4i6t # AgMBAAGjggHdMIIB2TASBgkrBgEEAYI3FQEEBQIDAQABMCMGCSsGAQQBgjcVAgQW # BBQqp1L+ZMSavoKRPEY1Kc8Q/y8E7jAdBgNVHQ4EFgQUn6cVXQBeYl2D9OXSZacb # UzUZ6XIwXAYDVR0gBFUwUzBRBgwrBgEEAYI3TIN9AQEwQTA/BggrBgEFBQcCARYz # aHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9Eb2NzL1JlcG9zaXRvcnku # aHRtMBMGA1UdJQQMMAoGCCsGAQUFBwMIMBkGCSsGAQQBgjcUAgQMHgoAUwB1AGIA # QwBBMAsGA1UdDwQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFNX2 # VsuP6KJcYmjRPZSQW9fOmhjEMFYGA1UdHwRPME0wS6BJoEeGRWh0dHA6Ly9jcmwu # bWljcm9zb2Z0LmNvbS9wa2kvY3JsL3Byb2R1Y3RzL01pY1Jvb0NlckF1dF8yMDEw # LTA2LTIzLmNybDBaBggrBgEFBQcBAQROMEwwSgYIKwYBBQUHMAKGPmh0dHA6Ly93 # d3cubWljcm9zb2Z0LmNvbS9wa2kvY2VydHMvTWljUm9vQ2VyQXV0XzIwMTAtMDYt # MjMuY3J0MA0GCSqGSIb3DQEBCwUAA4ICAQCdVX38Kq3hLB9nATEkW+Geckv8qW/q # XBS2Pk5HZHixBpOXPTEztTnXwnE2P9pkbHzQdTltuw8x5MKP+2zRoZQYIu7pZmc6 # U03dmLq2HnjYNi6cqYJWAAOwBb6J6Gngugnue99qb74py27YP0h1AdkY3m2CDPVt # I1TkeFN1JFe53Z/zjj3G82jfZfakVqr3lbYoVSfQJL1AoL8ZthISEV09J+BAljis # 9/kpicO8F7BUhUKz/AyeixmJ5/ALaoHCgRlCGVJ1ijbCHcNhcy4sa3tuPywJeBTp # kbKpW99Jo3QMvOyRgNI95ko+ZjtPu4b6MhrZlvSP9pEB9s7GdP32THJvEKt1MMU0 # sHrYUP4KWN1APMdUbZ1jdEgssU5HLcEUBHG/ZPkkvnNtyo4JvbMBV0lUZNlz138e # W0QBjloZkWsNn6Qo3GcZKCS6OEuabvshVGtqRRFHqfG3rsjoiV5PndLQTHa1V1QJ # sWkBRH58oWFsc/4Ku+xBZj1p/cvBQUl+fpO+y/g75LcVv7TOPqUxUYS8vwLBgqJ7 # Fx0ViY1w/ue10CgaiQuPNtq6TPmb/wrpNPgkNWcr4A245oyZ1uEi6vAnQj0llOZ0 # dFtq0Z4+7X6gMTN9vMvpe784cETRkPHIqzqKOghif9lwY1NNje6CbaUFEMFxBmoQ # tB1VM1izoXBm8qGCAtcwggJAAgEBMIIBAKGB2KSB1TCB0jELMAkGA1UEBhMCVVMx # EzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoT # FU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEtMCsGA1UECxMkTWljcm9zb2Z0IElyZWxh # bmQgT3BlcmF0aW9ucyBMaW1pdGVkMSYwJAYDVQQLEx1UaGFsZXMgVFNTIEVTTjow # ODQyLTRCRTYtQzI5QTElMCMGA1UEAxMcTWljcm9zb2Z0IFRpbWUtU3RhbXAgU2Vy # dmljZaIjCgEBMAcGBSsOAwIaAxUAjhJ+EeySRfn2KCNsjn9cF9AUSTqggYMwgYCk # fjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMH # UmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYDVQQD # Ex1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMDANBgkqhkiG9w0BAQUFAAIF # AOhFWhUwIhgPMjAyMzA2MjcyMDUyMzdaGA8yMDIzMDYyODIwNTIzN1owdzA9Bgor # BgEEAYRZCgQBMS8wLTAKAgUA6EVaFQIBADAKAgEAAgIIGQIB/zAHAgEAAgISBDAK # AgUA6EarlQIBADA2BgorBgEEAYRZCgQCMSgwJjAMBgorBgEEAYRZCgMCoAowCAIB # AAIDB6EgoQowCAIBAAIDAYagMA0GCSqGSIb3DQEBBQUAA4GBAE32B2WVBpNY8vUn # ynAAM+c6TiAr5IO1vNql4pY6WWxunGkVsS3fKTU++jHkKKAs26eF0OYNeMihAG+7 # zPfpwfzc5ZMbOUCN7CJykjeV5aBdArmoEdlReT0e8AVx239Rb77AasorUjWJubkt # 3AK3FsRYzZ0sLXb825IaHdv07wG2MYIEDTCCBAkCAQEwgZMwfDELMAkGA1UEBhMC # VVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNV # BAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRp # bWUtU3RhbXAgUENBIDIwMTACEzMAAAGybkADf26plJIAAQAAAbIwDQYJYIZIAWUD # BAIBBQCgggFKMBoGCSqGSIb3DQEJAzENBgsqhkiG9w0BCRABBDAvBgkqhkiG9w0B # CQQxIgQgmQKWN8uJFUqZtDLqf6FFVNpIMn5P70s1kl9at8N8tXMwgfoGCyqGSIb3 # DQEJEAIvMYHqMIHnMIHkMIG9BCBTeM485+E+t4PEVieUoFKX7PVyLo/nzu+htJPC # G04+NTCBmDCBgKR+MHwxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9u # MRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRp # b24xJjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwAhMzAAAB # sm5AA39uqZSSAAEAAAGyMCIEILhzljYVxWkTUTKBchk46RskyPPfxHmjSJDX5qaw # tmY7MA0GCSqGSIb3DQEBCwUABIICAKd/bxVEXJk7jR9FhJWnr6JKiqW0rNlyxHvo # T3GAzxndCLPcOTn2W52AzKMEANQGCpjrB6FZT+7u/DUqKq/uPJTN1pUJUSSypAT2 # 7NGvdVhvuOVNCTO1GDh0dQ/UHJihSHe2YWGR0sFUsEyhUCYRsvCqgNMf5t07S2fW # vmK4PiBOa77OCwn8tOi0e4C8qtXTBblb1TMp63qAnXLwNPV62X4ubajFvWq78Hn2 # QPYKzaz4h2q31g4w/qrJpx+xlu3VwsOsIPWN2JNnjBu7s9X+dYC0vMk0wVbLJ6W/ # jz3hinEh/gSf2aTgBK0JdgvnhST3jLw2O/Gy3WZSelRwAbdEsr4Tt+luj/Nvr0DK # 8hlWUeuQcRzpJJdxkQxF3+tgt5JykANpQ0fc9NydBdhateG6S+LrXbHX1JP44e/U # 2pn0ea4NixG0ZsUzeB7xzWRZ1lhN7Jf3MVBr+P7bw/CN+wdE5LjzaUmLNvfvESaI # 7v5fT/lA3oUZ6cknQJ7xYyzNmXigMrABwTrzYlBkfgJwNrx2CbrjdsOVd1W7Hqpf # oaayd4LX/LH6bIJCfx2f87WTY1KNh5frz8tcN52mbnth34CSebV4kOOLUVQgv/SK # SZ7AdgbG3nDt0Qa6HSU0xvPSOdji8omwwy7g/ERLxZQusd0sUji/4R4eedxNAHtz # vaNIjjC8 # SIG # End signature block |