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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Name"]) { $params["Name"] = $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 { 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 = @{} 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["Name"] = $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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Name"]) { $params["Name"] = $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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 = @{} if($null -ne $PSBoundParameters["CrossCloudVerificationCode"]) { $params["CrossCloudVerificationCode"] = $PSBoundParameters["CrossCloudVerificationCode"] } if($null -ne $PSBoundParameters["Name"]) { $params["Name"] = $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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Name"]) { $params["Name"] = $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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADDeviceConfiguration { [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-MgDeviceManagementDeviceConfiguration @params $response | ForEach-Object { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Name"]) { $params["Name"] = $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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Name"]) { $params["Name"] = $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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 = @{} 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["Name"] = $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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 = @{} 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-MgIdentityConditionalAccessNamedLocation @params $response | ForEach-Object { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 Get-AzureADDeviceConfiguration -Value Get-CompatADDeviceConfiguration -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-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','Get-CompatADDeviceConfiguration','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-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 # MIInzgYJKoZIhvcNAQcCoIInvzCCJ7sCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCARgSHE08g1wW0 # LMEm3XrfKQKrIeEPchZxPVa6ddhDC6CCDYUwggYDMIID66ADAgECAhMzAAADTU6R # phoosHiPAAAAAANNMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjMwMzE2MTg0MzI4WhcNMjQwMzE0MTg0MzI4WjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB # AQDUKPcKGVa6cboGQU03ONbUKyl4WpH6Q2Xo9cP3RhXTOa6C6THltd2RfnjlUQG+ # Mwoy93iGmGKEMF/jyO2XdiwMP427j90C/PMY/d5vY31sx+udtbif7GCJ7jJ1vLzd # j28zV4r0FGG6yEv+tUNelTIsFmmSb0FUiJtU4r5sfCThvg8dI/F9Hh6xMZoVti+k # bVla+hlG8bf4s00VTw4uAZhjGTFCYFRytKJ3/mteg2qnwvHDOgV7QSdV5dWdd0+x # zcuG0qgd3oCCAjH8ZmjmowkHUe4dUmbcZfXsgWlOfc6DG7JS+DeJak1DvabamYqH # g1AUeZ0+skpkwrKwXTFwBRltAgMBAAGjggGCMIIBfjAfBgNVHSUEGDAWBgorBgEE # AYI3TAgBBggrBgEFBQcDAzAdBgNVHQ4EFgQUId2Img2Sp05U6XI04jli2KohL+8w # VAYDVR0RBE0wS6RJMEcxLTArBgNVBAsTJE1pY3Jvc29mdCBJcmVsYW5kIE9wZXJh # dGlvbnMgTGltaXRlZDEWMBQGA1UEBRMNMjMwMDEyKzUwMDUxNzAfBgNVHSMEGDAW # gBRIbmTlUAXTgqoXNzcitW2oynUClTBUBgNVHR8ETTBLMEmgR6BFhkNodHRwOi8v # d3d3Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2NybC9NaWNDb2RTaWdQQ0EyMDExXzIw # MTEtMDctMDguY3JsMGEGCCsGAQUFBwEBBFUwUzBRBggrBgEFBQcwAoZFaHR0cDov # L3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9jZXJ0cy9NaWNDb2RTaWdQQ0EyMDEx # XzIwMTEtMDctMDguY3J0MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQELBQADggIB # ACMET8WuzLrDwexuTUZe9v2xrW8WGUPRQVmyJ1b/BzKYBZ5aU4Qvh5LzZe9jOExD # YUlKb/Y73lqIIfUcEO/6W3b+7t1P9m9M1xPrZv5cfnSCguooPDq4rQe/iCdNDwHT # 6XYW6yetxTJMOo4tUDbSS0YiZr7Mab2wkjgNFa0jRFheS9daTS1oJ/z5bNlGinxq # 2v8azSP/GcH/t8eTrHQfcax3WbPELoGHIbryrSUaOCphsnCNUqUN5FbEMlat5MuY # 94rGMJnq1IEd6S8ngK6C8E9SWpGEO3NDa0NlAViorpGfI0NYIbdynyOB846aWAjN # fgThIcdzdWFvAl/6ktWXLETn8u/lYQyWGmul3yz+w06puIPD9p4KPiWBkCesKDHv # XLrT3BbLZ8dKqSOV8DtzLFAfc9qAsNiG8EoathluJBsbyFbpebadKlErFidAX8KE # usk8htHqiSkNxydamL/tKfx3V/vDAoQE59ysv4r3pE+zdyfMairvkFNNw7cPn1kH # Gcww9dFSY2QwAxhMzmoM0G+M+YvBnBu5wjfxNrMRilRbxM6Cj9hKFh0YTwba6M7z # ntHHpX3d+nabjFm/TnMRROOgIXJzYbzKKaO2g1kWeyG2QtvIR147zlrbQD4X10Ab # rRg9CpwW7xYxywezj+iNAc+QmFzR94dzJkEPUSCJPsTFMIIHejCCBWKgAwIBAgIK # YQ6Q0gAAAAAAAzANBgkqhkiG9w0BAQsFADCBiDELMAkGA1UEBhMCVVMxEzARBgNV # BAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jv # c29mdCBDb3Jwb3JhdGlvbjEyMDAGA1UEAxMpTWljcm9zb2Z0IFJvb3QgQ2VydGlm # aWNhdGUgQXV0aG9yaXR5IDIwMTEwHhcNMTEwNzA4MjA1OTA5WhcNMjYwNzA4MjEw # OTA5WjB+MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UE # BxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSgwJgYD # VQQDEx9NaWNyb3NvZnQgQ29kZSBTaWduaW5nIFBDQSAyMDExMIICIjANBgkqhkiG # 9w0BAQEFAAOCAg8AMIICCgKCAgEAq/D6chAcLq3YbqqCEE00uvK2WCGfQhsqa+la # UKq4BjgaBEm6f8MMHt03a8YS2AvwOMKZBrDIOdUBFDFC04kNeWSHfpRgJGyvnkmc # 6Whe0t+bU7IKLMOv2akrrnoJr9eWWcpgGgXpZnboMlImEi/nqwhQz7NEt13YxC4D # dato88tt8zpcoRb0RrrgOGSsbmQ1eKagYw8t00CT+OPeBw3VXHmlSSnnDb6gE3e+ # lD3v++MrWhAfTVYoonpy4BI6t0le2O3tQ5GD2Xuye4Yb2T6xjF3oiU+EGvKhL1nk # kDstrjNYxbc+/jLTswM9sbKvkjh+0p2ALPVOVpEhNSXDOW5kf1O6nA+tGSOEy/S6 # A4aN91/w0FK/jJSHvMAhdCVfGCi2zCcoOCWYOUo2z3yxkq4cI6epZuxhH2rhKEmd # X4jiJV3TIUs+UsS1Vz8kA/DRelsv1SPjcF0PUUZ3s/gA4bysAoJf28AVs70b1FVL # 5zmhD+kjSbwYuER8ReTBw3J64HLnJN+/RpnF78IcV9uDjexNSTCnq47f7Fufr/zd # sGbiwZeBe+3W7UvnSSmnEyimp31ngOaKYnhfsi+E11ecXL93KCjx7W3DKI8sj0A3 # T8HhhUSJxAlMxdSlQy90lfdu+HggWCwTXWCVmj5PM4TasIgX3p5O9JawvEagbJjS # 4NaIjAsCAwEAAaOCAe0wggHpMBAGCSsGAQQBgjcVAQQDAgEAMB0GA1UdDgQWBBRI # bmTlUAXTgqoXNzcitW2oynUClTAZBgkrBgEEAYI3FAIEDB4KAFMAdQBiAEMAQTAL # BgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBRyLToCMZBD # uRQFTuHqp8cx0SOJNDBaBgNVHR8EUzBRME+gTaBLhklodHRwOi8vY3JsLm1pY3Jv # c29mdC5jb20vcGtpL2NybC9wcm9kdWN0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFf # MDNfMjIuY3JsMF4GCCsGAQUFBwEBBFIwUDBOBggrBgEFBQcwAoZCaHR0cDovL3d3 # dy5taWNyb3NvZnQuY29tL3BraS9jZXJ0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFf # MDNfMjIuY3J0MIGfBgNVHSAEgZcwgZQwgZEGCSsGAQQBgjcuAzCBgzA/BggrBgEF # BQcCARYzaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9kb2NzL3ByaW1h # cnljcHMuaHRtMEAGCCsGAQUFBwICMDQeMiAdAEwAZQBnAGEAbABfAHAAbwBsAGkA # YwB5AF8AcwB0AGEAdABlAG0AZQBuAHQALiAdMA0GCSqGSIb3DQEBCwUAA4ICAQBn # 8oalmOBUeRou09h0ZyKbC5YR4WOSmUKWfdJ5DJDBZV8uLD74w3LRbYP+vj/oCso7 # v0epo/Np22O/IjWll11lhJB9i0ZQVdgMknzSGksc8zxCi1LQsP1r4z4HLimb5j0b # pdS1HXeUOeLpZMlEPXh6I/MTfaaQdION9MsmAkYqwooQu6SpBQyb7Wj6aC6VoCo/ # KmtYSWMfCWluWpiW5IP0wI/zRive/DvQvTXvbiWu5a8n7dDd8w6vmSiXmE0OPQvy # CInWH8MyGOLwxS3OW560STkKxgrCxq2u5bLZ2xWIUUVYODJxJxp/sfQn+N4sOiBp # mLJZiWhub6e3dMNABQamASooPoI/E01mC8CzTfXhj38cbxV9Rad25UAqZaPDXVJi # hsMdYzaXht/a8/jyFqGaJ+HNpZfQ7l1jQeNbB5yHPgZ3BtEGsXUfFL5hYbXw3MYb # BL7fQccOKO7eZS/sl/ahXJbYANahRr1Z85elCUtIEJmAH9AAKcWxm6U/RXceNcbS # oqKfenoi+kiVH6v7RyOA9Z74v2u3S5fi63V4GuzqN5l5GEv/1rMjaHXmr/r8i+sL # gOppO6/8MO0ETI7f33VtY5E90Z1WTk+/gFcioXgRMiF670EKsT/7qMykXcGhiJtX # cVZOSEXAQsmbdlsKgEhr/Xmfwb1tbWrJUnMTDXpQzTGCGZ8wghmbAgEBMIGVMH4x # CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRt # b25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01p # Y3Jvc29mdCBDb2RlIFNpZ25pbmcgUENBIDIwMTECEzMAAANNTpGmGiiweI8AAAAA # A00wDQYJYIZIAWUDBAIBBQCgga4wGQYJKoZIhvcNAQkDMQwGCisGAQQBgjcCAQQw # HAYKKwYBBAGCNwIBCzEOMAwGCisGAQQBgjcCARUwLwYJKoZIhvcNAQkEMSIEIP0F # DdNoxuoZcbUrj+XQQazst2rCnBi47HpP9R8QWyfPMEIGCisGAQQBgjcCAQwxNDAy # oBSAEgBNAGkAYwByAG8AcwBvAGYAdKEagBhodHRwOi8vd3d3Lm1pY3Jvc29mdC5j # b20wDQYJKoZIhvcNAQEBBQAEggEAeZEF30Hl4CyABsMbjTZfccBcne5lGAZTim4y # O9CJSB1rx35e5MeZdBZDLkDkq4S9VbbpDWCsd8Ux1ezjSIYUOCVy0F4RP4Z/Ull1 # uFLBhltKmLQ+6D/hib36GQ2mAfVbrMxPcK3S454IFzBOof5EtS47LYy9q36zf4ts # DAMw7zWRePh94MFFMEx8SLEQzmY9d68R3FheSlH97IAlJbaHzUY5nBejUCZf+j6M # WgWCLEE1REfb8KQAqV1PrraXHCEyl2UMyRElqobym+MpNFpmm5AKkkwI+MFLRWN6 # +wD2rVLqgrpfICcjwNWxZ/vkSc6tfDiujOtkiTanWb0kHHR28aGCFykwghclBgor # BgEEAYI3AwMBMYIXFTCCFxEGCSqGSIb3DQEHAqCCFwIwghb+AgEDMQ8wDQYJYIZI # AWUDBAIBBQAwggFZBgsqhkiG9w0BCRABBKCCAUgEggFEMIIBQAIBAQYKKwYBBAGE # WQoDATAxMA0GCWCGSAFlAwQCAQUABCA0y0oxO3iCRDG5iqmciWKQ69dkXEUgsjsy # HoxKX1EXYQIGZD/TG4RBGBMyMDIzMDUwMzIwMjcwOS40NTVaMASAAgH0oIHYpIHV # MIHSMQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMH # UmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMS0wKwYDVQQL # EyRNaWNyb3NvZnQgSXJlbGFuZCBPcGVyYXRpb25zIExpbWl0ZWQxJjAkBgNVBAsT # HVRoYWxlcyBUU1MgRVNOOjg2REYtNEJCQy05MzM1MSUwIwYDVQQDExxNaWNyb3Nv # ZnQgVGltZS1TdGFtcCBTZXJ2aWNloIIReDCCBycwggUPoAMCAQICEzMAAAG3ISca # B6IqhkYAAQAAAbcwDQYJKoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxEzARBgNV # BAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jv # c29mdCBDb3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAg # UENBIDIwMTAwHhcNMjIwOTIwMjAyMjE0WhcNMjMxMjE0MjAyMjE0WjCB0jELMAkG # A1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQx # HjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEtMCsGA1UECxMkTWljcm9z # b2Z0IElyZWxhbmQgT3BlcmF0aW9ucyBMaW1pdGVkMSYwJAYDVQQLEx1UaGFsZXMg # VFNTIEVTTjo4NkRGLTRCQkMtOTMzNTElMCMGA1UEAxMcTWljcm9zb2Z0IFRpbWUt # U3RhbXAgU2VydmljZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMf9 # z1dQNBNkTBq3HJclypjQcJIlDAgpvsw4vHJe06n532RKGkcn0V7p65OeA1wOoO+8 # NsopnjPpVZ8+4s/RhdMCMNPQJXoWdkWOp/3puIEs1fzPBgTJrdmzdyUYzrAloICY # x722gmdpbNf3P0y5Z2gRO48sWIYyYeNJYch+ZfJzXqqvuvq7G8Nm8IMQi8Zayvx+ # 5dSGBM5VYHBxCEjXF9EN6Qw7A60SaXjKjojSpUmpaM4FmVec985PNdSh8hOeP2tL # 781SBan92DT19tfNHv9H0FAmE2HGRwizHkJ//mAZdS0s6bi/UwPMksAia5bpnIDB # OoaYdWkV0lVG5rN0+ltRz9zjlaH9uhdGTJ+WiNKOr7mRnlzYQA53ftSSJBqsEpTz # Cv7c673fdvltx3y48Per6vc6UR5e4kSZsH141IhxhmRR2SmEabuYKOTdO7Q/vlvA # fQxuEnJ93NL4LYV1IWw8O+xNO6gljrBpCOfOOTQgWJF+M6/IPyuYrcv79Lu7lc67 # S+U9MEu2dog0MuJIoYCMiuVaXS5+FmOJiyfiCZm0VJsJ570y9k/tEQe6aQR9MxDW # 1p2F3HWebolXj9su7zrrElNlHAEvpFhcgoMniylNTiTZzLwUj7TH83gnugw1FCEV # Vh5U9lwNMPL1IGuz/3U+RT9wZCBJYIrFJPd6k8UtAgMBAAGjggFJMIIBRTAdBgNV # HQ4EFgQUs/I5Pgw0JAVhDdYB2yPII8l4tOwwHwYDVR0jBBgwFoAUn6cVXQBeYl2D # 9OXSZacbUzUZ6XIwXwYDVR0fBFgwVjBUoFKgUIZOaHR0cDovL3d3dy5taWNyb3Nv # ZnQuY29tL3BraW9wcy9jcmwvTWljcm9zb2Z0JTIwVGltZS1TdGFtcCUyMFBDQSUy # MDIwMTAoMSkuY3JsMGwGCCsGAQUFBwEBBGAwXjBcBggrBgEFBQcwAoZQaHR0cDov # L3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9jZXJ0cy9NaWNyb3NvZnQlMjBUaW1l # LVN0YW1wJTIwUENBJTIwMjAxMCgxKS5jcnQwDAYDVR0TAQH/BAIwADAWBgNVHSUB # Af8EDDAKBggrBgEFBQcDCDAOBgNVHQ8BAf8EBAMCB4AwDQYJKoZIhvcNAQELBQAD # ggIBAA2dZMybhVxSXTbJzFgvNiMCV5/Ayn5UuzJU495YDtcefold0ehR9QBGBhHm # AMt10WYCHz2WQUyM3mQD4IsHfEL1JEwgG9tGq71ucn9dknLBHD30JvbQRhIKcvFS # nvRCCpVpilM8F/YaWXC9VibSef/PU2GWA+1zs64VFxJqHeuy8KqrQyfF20SCnd8z # RZl4YYBcjh9G0GjhJHUPAYEx0r8jSWjyi2o2WAHD6CppBtkwnZSf7A68DL4OwwBp # mFB3+vubjgNwaICS+fkGVvRnP2ZgmlfnaAas8Mx7igJqciqq0Q6An+0rHj1kxisN # dIiTzFlu5Gw2ehXpLrl59kvsmONVAJHhndpx3n/0r76TH+3WNS9UT9jbxQkE+t2t # hif6MK5krFMnkBICCR/DVcV1qw9sg6sMEo0wWSXlQYXvcQWA65eVzSkosylhIlIZ # ZLL3GHZD1LQtAjp2A5F7C3Iw4Nt7C7aDCfpFxom3ZulRnFJollPHb3unj9hA9xvR # iKnWMAMpS4MZAoiV4O29zWKZdUzygp7gD4WjKK115KCJ0ovEcf92AnwMAXMnNs1o # 0LCszg+uDmiQZs5eR7jzdKzVfF1z7bfDYNPAJvm5pSQdby3wIOsN/stYjM+EkaPt # Uzr8OyMwrG+jpFMbsB4cfN6tvIeGtrtklMJFtnF68CcZZ5IAMIIHcTCCBVmgAwIB # AgITMwAAABXF52ueAptJmQAAAAAAFTANBgkqhkiG9w0BAQsFADCBiDELMAkGA1UE # BhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAc # BgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEyMDAGA1UEAxMpTWljcm9zb2Z0 # IFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTAwHhcNMjEwOTMwMTgyMjI1 # WhcNMzAwOTMwMTgzMjI1WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGlu # Z3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBv # cmF0aW9uMSYwJAYDVQQDEx1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMDCC # AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAOThpkzntHIhC3miy9ckeb0O # 1YLT/e6cBwfSqWxOdcjKNVf2AX9sSuDivbk+F2Az/1xPx2b3lVNxWuJ+Slr+uDZn # hUYjDLWNE893MsAQGOhgfWpSg0S3po5GawcU88V29YZQ3MFEyHFcUTE3oAo4bo3t # 1w/YJlN8OWECesSq/XJprx2rrPY2vjUmZNqYO7oaezOtgFt+jBAcnVL+tuhiJdxq # D89d9P6OU8/W7IVWTe/dvI2k45GPsjksUZzpcGkNyjYtcI4xyDUoveO0hyTD4MmP # frVUj9z6BVWYbWg7mka97aSueik3rMvrg0XnRm7KMtXAhjBcTyziYrLNueKNiOSW # rAFKu75xqRdbZ2De+JKRHh09/SDPc31BmkZ1zcRfNN0Sidb9pSB9fvzZnkXftnIv # 231fgLrbqn427DZM9ituqBJR6L8FA6PRc6ZNN3SUHDSCD/AQ8rdHGO2n6Jl8P0zb # r17C89XYcz1DTsEzOUyOArxCaC4Q6oRRRuLRvWoYWmEBc8pnol7XKHYC4jMYcten # IPDC+hIK12NvDMk2ZItboKaDIV1fMHSRlJTYuVD5C4lh8zYGNRiER9vcG9H9stQc # xWv2XFJRXRLbJbqvUAV6bMURHXLvjflSxIUXk8A8FdsaN8cIFRg/eKtFtvUeh17a # j54WcmnGrnu3tz5q4i6tAgMBAAGjggHdMIIB2TASBgkrBgEEAYI3FQEEBQIDAQAB # MCMGCSsGAQQBgjcVAgQWBBQqp1L+ZMSavoKRPEY1Kc8Q/y8E7jAdBgNVHQ4EFgQU # n6cVXQBeYl2D9OXSZacbUzUZ6XIwXAYDVR0gBFUwUzBRBgwrBgEEAYI3TIN9AQEw # QTA/BggrBgEFBQcCARYzaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9E # b2NzL1JlcG9zaXRvcnkuaHRtMBMGA1UdJQQMMAoGCCsGAQUFBwMIMBkGCSsGAQQB # gjcUAgQMHgoAUwB1AGIAQwBBMAsGA1UdDwQEAwIBhjAPBgNVHRMBAf8EBTADAQH/ # MB8GA1UdIwQYMBaAFNX2VsuP6KJcYmjRPZSQW9fOmhjEMFYGA1UdHwRPME0wS6BJ # oEeGRWh0dHA6Ly9jcmwubWljcm9zb2Z0LmNvbS9wa2kvY3JsL3Byb2R1Y3RzL01p # Y1Jvb0NlckF1dF8yMDEwLTA2LTIzLmNybDBaBggrBgEFBQcBAQROMEwwSgYIKwYB # BQUHMAKGPmh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2kvY2VydHMvTWljUm9v # Q2VyQXV0XzIwMTAtMDYtMjMuY3J0MA0GCSqGSIb3DQEBCwUAA4ICAQCdVX38Kq3h # LB9nATEkW+Geckv8qW/qXBS2Pk5HZHixBpOXPTEztTnXwnE2P9pkbHzQdTltuw8x # 5MKP+2zRoZQYIu7pZmc6U03dmLq2HnjYNi6cqYJWAAOwBb6J6Gngugnue99qb74p # y27YP0h1AdkY3m2CDPVtI1TkeFN1JFe53Z/zjj3G82jfZfakVqr3lbYoVSfQJL1A # oL8ZthISEV09J+BAljis9/kpicO8F7BUhUKz/AyeixmJ5/ALaoHCgRlCGVJ1ijbC # HcNhcy4sa3tuPywJeBTpkbKpW99Jo3QMvOyRgNI95ko+ZjtPu4b6MhrZlvSP9pEB # 9s7GdP32THJvEKt1MMU0sHrYUP4KWN1APMdUbZ1jdEgssU5HLcEUBHG/ZPkkvnNt # yo4JvbMBV0lUZNlz138eW0QBjloZkWsNn6Qo3GcZKCS6OEuabvshVGtqRRFHqfG3 # rsjoiV5PndLQTHa1V1QJsWkBRH58oWFsc/4Ku+xBZj1p/cvBQUl+fpO+y/g75LcV # v7TOPqUxUYS8vwLBgqJ7Fx0ViY1w/ue10CgaiQuPNtq6TPmb/wrpNPgkNWcr4A24 # 5oyZ1uEi6vAnQj0llOZ0dFtq0Z4+7X6gMTN9vMvpe784cETRkPHIqzqKOghif9lw # Y1NNje6CbaUFEMFxBmoQtB1VM1izoXBm8qGCAtQwggI9AgEBMIIBAKGB2KSB1TCB # 0jELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1Jl # ZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEtMCsGA1UECxMk # TWljcm9zb2Z0IElyZWxhbmQgT3BlcmF0aW9ucyBMaW1pdGVkMSYwJAYDVQQLEx1U # aGFsZXMgVFNTIEVTTjo4NkRGLTRCQkMtOTMzNTElMCMGA1UEAxMcTWljcm9zb2Z0 # IFRpbWUtU3RhbXAgU2VydmljZaIjCgEBMAcGBSsOAwIaAxUAyGdBGMObODlsGBZm # SUX2oWgfqcaggYMwgYCkfjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGlu # Z3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBv # cmF0aW9uMSYwJAYDVQQDEx1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMDAN # BgkqhkiG9w0BAQUFAAIFAOf8xbMwIhgPMjAyMzA1MDMxOTM2MTlaGA8yMDIzMDUw # NDE5MzYxOVowdDA6BgorBgEEAYRZCgQBMSwwKjAKAgUA5/zFswIBADAHAgEAAgIR # SzAHAgEAAgIRqzAKAgUA5/4XMwIBADA2BgorBgEEAYRZCgQCMSgwJjAMBgorBgEE # AYRZCgMCoAowCAIBAAIDB6EgoQowCAIBAAIDAYagMA0GCSqGSIb3DQEBBQUAA4GB # ACqgApMzDhL+OXKBsJPDD62muc7lj6HEki5TQMXmSwQbMXYQsKHEACklOXXkCEQF # m466MB+YKSk6VlZ2qiWn/OkNSQgk+L/D2a3yXrbp+6IWzjmMux7n9MwgboS3URvv # LK0HmW/zsUW2h4kC5i4eXzW9sjLvU5zgHdXmpVobo0zHMYIEDTCCBAkCAQEwgZMw # fDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1Jl # ZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEmMCQGA1UEAxMd # TWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIwMTACEzMAAAG3IScaB6IqhkYAAQAA # AbcwDQYJYIZIAWUDBAIBBQCgggFKMBoGCSqGSIb3DQEJAzENBgsqhkiG9w0BCRAB # BDAvBgkqhkiG9w0BCQQxIgQg6nO7shgWeoxGWKegv5DQM5XXmmOuhr1PKrbvIePj # ZVkwgfoGCyqGSIb3DQEJEAIvMYHqMIHnMIHkMIG9BCBsJ3jTsh7aL8hNeiYGL5/8 # IBn8zUfr7/Q7rkM8ic1wQTCBmDCBgKR+MHwxCzAJBgNVBAYTAlVTMRMwEQYDVQQI # EwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3Nv # ZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBD # QSAyMDEwAhMzAAABtyEnGgeiKoZGAAEAAAG3MCIEIA1jgU6myieKktF8KZcQ8Rfz # JNkVZ+3fXWTpB2A076CqMA0GCSqGSIb3DQEBCwUABIICACE8AEBwjFh/5qslmAI+ # jz6FT+8PVVBhkuQegVKk3K9yFjC36arWrghGzy6f2uhocXbwcIRSo8OOlIg32RuX # 1vf+raptgoHNa0SOzan3u+pSaYE1Qbmhr4XAxPuXw+O5g18bWkMqDQad1t7EEeBq # PWn6x7KChzLYqOZ89VyzecCCrUOyH7PU6hJScaDL4ZjIlzT4MPU43fe7hVgqpggZ # S0bnWgO/mHeIn+pZCfNSgdYEZWXR+AEK8vsRMuhAnpHDf1h1jZPywtls+ustnMXh # URTgtHW1WQDgKwAPaLA8rNM907RdEn8mUkG50ioIDo/zo95uQrEAPVb+TUH2BIrl # 5q0gldFy28YGGG88tgFGorhFgQYFZcxpc63z0rygPiSf2cr9+C+JD239gpLIxHCG # g8iMZAu13dM3PlFOu3Zm5QMWM/JdSTS5Ees7iVqnW602uwPnCxJnM2CSy2Or4gH+ # G4svcEy/DN5lmUZcRgqkcSc971SpzC5uW/5RrPTjEsZmov3hs6omI289zDsAZCfV # YHtBdyPAjgOLdCxdM6njtVb/mTEegDrse02ZZVPZx6C9oa2kSN6B8dR1GAkpqA50 # Rtrr/p8jj85PV3xBMYsdVb2ysxfdE3wCp1NCh1AK+5+AjNxFXp6OD299KeEwKU0Y # /3ZqZqVsQZ4TfilKdS2HnDwD # SIG # End signature block |