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-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 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 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 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 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"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DeviceId"] = $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-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 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 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-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-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.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["SearchString"]) { $params["SearchString"] = $PSBoundParameters["SearchString"] } 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-MgDirectoryDeletedItem @params $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 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 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-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-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-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 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 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 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-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 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-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 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 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 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 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 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 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"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["UserId"] = $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 = 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 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 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 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-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 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 Get-AzureADServiceAppRoleAssignment -Value Get-CompatADServiceAppRoleAssignment -Scope Global -Force Set-Alias -Name New-AzureADMSGroup -Value New-CompatADMSGroup -Scope Global -Force Set-Alias -Name Select-AzureADGroupIdsUserIsMemberOf -Value Select-CompatADGroupIdsUserIsMemberOf -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 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 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-AzureADUserAppRoleAssignment -Value Remove-CompatADUserAppRoleAssignment -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 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 Remove-AzureADApplicationPasswordCredential -Value Remove-CompatADApplicationPasswordCredential -Scope Global -Force Set-Alias -Name Get-AzureADServicePrincipalOwnedObject -Value Get-CompatADServicePrincipalOwnedObject -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-AzureADServicePrincipalCreatedObject -Value Get-CompatADServicePrincipalCreatedObject -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 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 Get-AzureADContactManager -Value Get-CompatADContactManager -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-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 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-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 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 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 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 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 Set-AzureADServicePrincipal -Value Set-CompatADServicePrincipal -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 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 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 } # ------------------------------------------------------------------------------ # 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-CompatADMSGroupPermissionGrant','Set-CompatADMSIdentityProvider','Add-CompatADGroupOwner','Get-CompatADGroup','Remove-CompatADApplicationExtensionProperty','New-CompatADUser','Remove-CompatADMSGroupLifecyclePolicy','Get-CompatADDomain','New-CompatADDomain','Reset-CompatADMSLifeCycleGroup','Get-CompatADGroupMember','Get-CompatADServiceAppRoleAssignment','New-CompatADMSGroup','Select-CompatADGroupIdsUserIsMemberOf','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','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','Get-CompatADContactMembership','New-CompatADGroup','New-CompatADMSNamedLocationPolicy','Confirm-CompatADDomain','Remove-CompatADUserAppRoleAssignment','Remove-CompatADMSIdentityProvider','Get-CompatADDeletedApplication','Get-CompatADExtensionProperty','Select-CompatADGroupIdsGroupIsMemberOf','Set-CompatADMSAdministrativeUnit','Set-CompatADMSGroup','Add-CompatADMSLifecyclePolicyGroup','Get-CompatADUserAppRoleAssignment','Remove-CompatADMSAdministrativeUnit','Get-CompatADMSDeletedGroup','Remove-CompatADApplicationPasswordCredential','Get-CompatADServicePrincipalOwnedObject','Get-CompatADUserOwnedObject','Remove-CompatADMSLifecyclePolicyGroup','Remove-CompatADDomain','Get-CompatADContact','Set-CompatADMSGroupLifecyclePolicy','Get-CompatADGroupAppRoleAssignment','Get-CompatADMSApplication','Set-CompatADApplication','Get-CompatADServicePrincipalCreatedObject','Get-CompatADServicePrincipalOwner','Get-CompatADUserThumbnailPhoto','Remove-CompatADDevice','Get-CompatADUserExtension','Get-CompatADUserCreatedObject','Set-CompatADMSNamedLocationPolicy','Get-CompatADContactManager','Get-CompatADApplicationOwner','Get-CompatADDeviceConfiguration','Remove-CompatADMSScopedRoleMembership','Remove-CompatADMSApplication','Set-CompatADUserExtension','Get-CompatADUserManager','New-CompatADServiceAppRoleAssignment','Add-CompatADApplicationOwner','Remove-CompatADMSGroup','Remove-CompatADApplication','New-CompatADGroupAppRoleAssignment','Remove-CompatADOAuth2PermissionGrant','Get-CompatADUserOwnedDevice','Remove-CompatADGroup','Set-CompatADUserLicense','Remove-CompatADUserExtension','New-CompatADMSApplicationKey','Get-CompatADServicePrincipalMembership','New-CompatADMSApplicationPassword','Get-CompatADDomainVerificationDnsRecord','Remove-CompatADGroupAppRoleAssignment','New-CompatADDevice','Get-CompatADDirectoryRoleTemplate','Set-CompatADUserPassword','Get-CompatADGroupOwner','Get-CompatADMSPermissionGrantPolicy','Remove-CompatADMSApplicationExtensionProperty','New-CompatADMSApplicationExtensionProperty','Get-CompatADDomainServiceConfigurationRecord','Remove-CompatADMSPermissionGrantPolicy','Get-CompatADMSConditionalAccessPolicy','Get-CompatADUserRegisteredDevice','Get-CompatADContract','Set-CompatADMSApplicationLogo','Add-CompatADMSScopedRoleMembership','Set-CompatADUser','Get-CompatADUserDirectReport','Remove-CompatADDirectoryRoleMember','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','Set-CompatADServicePrincipal','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','New-CompatADApplicationKeyCredential','Enable-CompatADDirectoryRole','Get-CompatADMSAdministrativeUnit','Remove-CompatADServicePrincipal','New-CompatADMSInvitation','Get-CompatADTenantDetail','New-CompatADApplicationPasswordCredential','Test-CompatADScript','Set-CompatADAlias' ) Set-Variable -name MISSING_CMDS -value @('Get-AzureADApplicationServiceEndpoint','Revoke-AzureADUserAllRefreshToken','Remove-AzureADTrustedCertificateAuthority','New-AzureADMSRoleAssignment','Get-AzureADTrustedCertificateAuthority','Set-AzureADApplicationProxyApplicationSingleSignOn','Get-AzureADMSAuthorizationPolicy','Set-AzureADApplicationProxyConnector','Revoke-AzureADSignedInUserAllRefreshToken','Remove-AzureADServicePrincipalOwner','Remove-AzureADMSRoleAssignment','Get-AzureADApplicationProxyConnectorGroupMember','Remove-AzureADDeviceRegisteredUser','Set-AzureADMSAuthorizationPolicy','Remove-AzureADGroupOwner','Remove-AzureADMSRoleDefinition','Get-AzureADMSRoleAssignment','New-AzureADServicePrincipalKeyCredential','Set-AzureADApplicationProxyApplication','Get-AzureADMSRoleDefinition','Get-AzureADMSPermissionGrantConditionSet','Remove-AzureADGroupMember','Get-AzureADApplicationKeyCredential','Get-AzureADApplicationProxyApplication','Get-AzureADServicePrincipalKeyCredential','Set-AzureADMSRoleDefinition','Set-AzureADMSPermissionGrantConditionSet','Get-AzureADMSLifecyclePolicyGroup','Add-AzureADDeviceRegisteredUser','Set-AzureADTrustedCertificateAuthority','Remove-AzureADMSApplicationVerifiedPublisher','New-AzureADMSPermissionGrantConditionSet','Get-AzureADApplicationProxyConnectorMemberOf','Set-AzureADApplicationProxyApplicationCustomDomainCertificate','Get-AzureADApplicationPasswordCredential','Remove-AzureADApplicationProxyConnectorGroup','Restore-AzureADMSDeletedDirectoryObject','New-AzureADMSRoleDefinition','New-AzureADTrustedCertificateAuthority','Get-AzureADContactThumbnailPhoto','Remove-AzureADApplicationOwner','Get-AzureADApplicationProxyConnectorGroup','New-AzureADApplicationProxyApplication','Remove-AzureADDeviceRegisteredOwner','New-AzureADMSPermissionGrantPolicy','Remove-AzureADMSPermissionGrantConditionSet','Get-AzureADServicePrincipalPasswordCredential','New-AzureADApplicationProxyConnectorGroup','Get-AzureADApplicationProxyConnector','Set-AzureADApplicationProxyConnectorGroup','Set-AzureADApplicationProxyApplicationConnectorGroup','Remove-AzureADApplicationProxyApplication','Remove-AzureADApplicationProxyApplicationConnectorGroup','Get-AzureADApplicationProxyApplicationConnectorGroup','Remove-AzureADMSApplicationOwner','Remove-AzureADContactManager','Restore-AzureADDeletedApplication') -Scope Global -Option ReadOnly -Force ' Microsoft Graph Compatibility Adapter for AzureAD. Copyright (c) Microsoft Corporation. ' | Out-Host # SIG # Begin signature block # MIInngYJKoZIhvcNAQcCoIInjzCCJ4sCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCD9jAqDeAHd/b7T # RQ3o6Fk47NpWKD+V3W0H+YvHZ5Q/xaCCDYEwggX/MIID56ADAgECAhMzAAACzI61 # lqa90clOAAAAAALMMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjIwNTEyMjA0NjAxWhcNMjMwNTExMjA0NjAxWjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB # AQCiTbHs68bADvNud97NzcdP0zh0mRr4VpDv68KobjQFybVAuVgiINf9aG2zQtWK # No6+2X2Ix65KGcBXuZyEi0oBUAAGnIe5O5q/Y0Ij0WwDyMWaVad2Te4r1Eic3HWH # UfiiNjF0ETHKg3qa7DCyUqwsR9q5SaXuHlYCwM+m59Nl3jKnYnKLLfzhl13wImV9 # DF8N76ANkRyK6BYoc9I6hHF2MCTQYWbQ4fXgzKhgzj4zeabWgfu+ZJCiFLkogvc0 # RVb0x3DtyxMbl/3e45Eu+sn/x6EVwbJZVvtQYcmdGF1yAYht+JnNmWwAxL8MgHMz # xEcoY1Q1JtstiY3+u3ulGMvhAgMBAAGjggF+MIIBejAfBgNVHSUEGDAWBgorBgEE # AYI3TAgBBggrBgEFBQcDAzAdBgNVHQ4EFgQUiLhHjTKWzIqVIp+sM2rOHH11rfQw # UAYDVR0RBEkwR6RFMEMxKTAnBgNVBAsTIE1pY3Jvc29mdCBPcGVyYXRpb25zIFB1 # ZXJ0byBSaWNvMRYwFAYDVQQFEw0yMzAwMTIrNDcwNTI5MB8GA1UdIwQYMBaAFEhu # ZOVQBdOCqhc3NyK1bajKdQKVMFQGA1UdHwRNMEswSaBHoEWGQ2h0dHA6Ly93d3cu # bWljcm9zb2Z0LmNvbS9wa2lvcHMvY3JsL01pY0NvZFNpZ1BDQTIwMTFfMjAxMS0w # Ny0wOC5jcmwwYQYIKwYBBQUHAQEEVTBTMFEGCCsGAQUFBzAChkVodHRwOi8vd3d3 # Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2NlcnRzL01pY0NvZFNpZ1BDQTIwMTFfMjAx # MS0wNy0wOC5jcnQwDAYDVR0TAQH/BAIwADANBgkqhkiG9w0BAQsFAAOCAgEAeA8D # sOAHS53MTIHYu8bbXrO6yQtRD6JfyMWeXaLu3Nc8PDnFc1efYq/F3MGx/aiwNbcs # J2MU7BKNWTP5JQVBA2GNIeR3mScXqnOsv1XqXPvZeISDVWLaBQzceItdIwgo6B13 # vxlkkSYMvB0Dr3Yw7/W9U4Wk5K/RDOnIGvmKqKi3AwyxlV1mpefy729FKaWT7edB # d3I4+hldMY8sdfDPjWRtJzjMjXZs41OUOwtHccPazjjC7KndzvZHx/0VWL8n0NT/ # 404vftnXKifMZkS4p2sB3oK+6kCcsyWsgS/3eYGw1Fe4MOnin1RhgrW1rHPODJTG # AUOmW4wc3Q6KKr2zve7sMDZe9tfylonPwhk971rX8qGw6LkrGFv31IJeJSe/aUbG # dUDPkbrABbVvPElgoj5eP3REqx5jdfkQw7tOdWkhn0jDUh2uQen9Atj3RkJyHuR0 # GUsJVMWFJdkIO/gFwzoOGlHNsmxvpANV86/1qgb1oZXdrURpzJp53MsDaBY/pxOc # J0Cvg6uWs3kQWgKk5aBzvsX95BzdItHTpVMtVPW4q41XEvbFmUP1n6oL5rdNdrTM # j/HXMRk1KCksax1Vxo3qv+13cCsZAaQNaIAvt5LvkshZkDZIP//0Hnq7NnWeYR3z # 4oFiw9N2n3bb9baQWuWPswG0Dq9YT9kb+Cs4qIIwggd6MIIFYqADAgECAgphDpDS # AAAAAAADMA0GCSqGSIb3DQEBCwUAMIGIMQswCQYDVQQGEwJVUzETMBEGA1UECBMK # V2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0 # IENvcnBvcmF0aW9uMTIwMAYDVQQDEylNaWNyb3NvZnQgUm9vdCBDZXJ0aWZpY2F0 # ZSBBdXRob3JpdHkgMjAxMTAeFw0xMTA3MDgyMDU5MDlaFw0yNjA3MDgyMTA5MDla # MH4xCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdS # ZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMT # H01pY3Jvc29mdCBDb2RlIFNpZ25pbmcgUENBIDIwMTEwggIiMA0GCSqGSIb3DQEB # AQUAA4ICDwAwggIKAoICAQCr8PpyEBwurdhuqoIQTTS68rZYIZ9CGypr6VpQqrgG # OBoESbp/wwwe3TdrxhLYC/A4wpkGsMg51QEUMULTiQ15ZId+lGAkbK+eSZzpaF7S # 35tTsgosw6/ZqSuuegmv15ZZymAaBelmdugyUiYSL+erCFDPs0S3XdjELgN1q2jz # y23zOlyhFvRGuuA4ZKxuZDV4pqBjDy3TQJP4494HDdVceaVJKecNvqATd76UPe/7 # 4ytaEB9NViiienLgEjq3SV7Y7e1DkYPZe7J7hhvZPrGMXeiJT4Qa8qEvWeSQOy2u # M1jFtz7+MtOzAz2xsq+SOH7SnYAs9U5WkSE1JcM5bmR/U7qcD60ZI4TL9LoDho33 # X/DQUr+MlIe8wCF0JV8YKLbMJyg4JZg5SjbPfLGSrhwjp6lm7GEfauEoSZ1fiOIl # XdMhSz5SxLVXPyQD8NF6Wy/VI+NwXQ9RRnez+ADhvKwCgl/bwBWzvRvUVUvnOaEP # 6SNJvBi4RHxF5MHDcnrgcuck379GmcXvwhxX24ON7E1JMKerjt/sW5+v/N2wZuLB # l4F77dbtS+dJKacTKKanfWeA5opieF+yL4TXV5xcv3coKPHtbcMojyyPQDdPweGF # RInECUzF1KVDL3SV9274eCBYLBNdYJWaPk8zhNqwiBfenk70lrC8RqBsmNLg1oiM # CwIDAQABo4IB7TCCAekwEAYJKwYBBAGCNxUBBAMCAQAwHQYDVR0OBBYEFEhuZOVQ # BdOCqhc3NyK1bajKdQKVMBkGCSsGAQQBgjcUAgQMHgoAUwB1AGIAQwBBMAsGA1Ud # DwQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFHItOgIxkEO5FAVO # 4eqnxzHRI4k0MFoGA1UdHwRTMFEwT6BNoEuGSWh0dHA6Ly9jcmwubWljcm9zb2Z0 # LmNvbS9wa2kvY3JsL3Byb2R1Y3RzL01pY1Jvb0NlckF1dDIwMTFfMjAxMV8wM18y # Mi5jcmwwXgYIKwYBBQUHAQEEUjBQME4GCCsGAQUFBzAChkJodHRwOi8vd3d3Lm1p # Y3Jvc29mdC5jb20vcGtpL2NlcnRzL01pY1Jvb0NlckF1dDIwMTFfMjAxMV8wM18y # Mi5jcnQwgZ8GA1UdIASBlzCBlDCBkQYJKwYBBAGCNy4DMIGDMD8GCCsGAQUFBwIB # FjNodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2RvY3MvcHJpbWFyeWNw # cy5odG0wQAYIKwYBBQUHAgIwNB4yIB0ATABlAGcAYQBsAF8AcABvAGwAaQBjAHkA # XwBzAHQAYQB0AGUAbQBlAG4AdAAuIB0wDQYJKoZIhvcNAQELBQADggIBAGfyhqWY # 4FR5Gi7T2HRnIpsLlhHhY5KZQpZ90nkMkMFlXy4sPvjDctFtg/6+P+gKyju/R6mj # 82nbY78iNaWXXWWEkH2LRlBV2AySfNIaSxzzPEKLUtCw/WvjPgcuKZvmPRul1LUd # d5Q54ulkyUQ9eHoj8xN9ppB0g430yyYCRirCihC7pKkFDJvtaPpoLpWgKj8qa1hJ # Yx8JaW5amJbkg/TAj/NGK978O9C9Ne9uJa7lryft0N3zDq+ZKJeYTQ49C/IIidYf # wzIY4vDFLc5bnrRJOQrGCsLGra7lstnbFYhRRVg4MnEnGn+x9Cf43iw6IGmYslmJ # aG5vp7d0w0AFBqYBKig+gj8TTWYLwLNN9eGPfxxvFX1Fp3blQCplo8NdUmKGwx1j # NpeG39rz+PIWoZon4c2ll9DuXWNB41sHnIc+BncG0QaxdR8UvmFhtfDcxhsEvt9B # xw4o7t5lL+yX9qFcltgA1qFGvVnzl6UJS0gQmYAf0AApxbGbpT9Fdx41xtKiop96 # eiL6SJUfq/tHI4D1nvi/a7dLl+LrdXga7Oo3mXkYS//WsyNodeav+vyL6wuA6mk7 # r/ww7QRMjt/fdW1jkT3RnVZOT7+AVyKheBEyIXrvQQqxP/uozKRdwaGIm1dxVk5I # RcBCyZt2WwqASGv9eZ/BvW1taslScxMNelDNMYIZczCCGW8CAQEwgZUwfjELMAkG # A1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQx # HjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEoMCYGA1UEAxMfTWljcm9z # b2Z0IENvZGUgU2lnbmluZyBQQ0EgMjAxMQITMwAAAsyOtZamvdHJTgAAAAACzDAN # BglghkgBZQMEAgEFAKCBrjAZBgkqhkiG9w0BCQMxDAYKKwYBBAGCNwIBBDAcBgor # BgEEAYI3AgELMQ4wDAYKKwYBBAGCNwIBFTAvBgkqhkiG9w0BCQQxIgQg285DIeWe # 3WcgZ0Thxq6CqWv631PBnN38ZrFYYYZ34w0wQgYKKwYBBAGCNwIBDDE0MDKgFIAS # AE0AaQBjAHIAbwBzAG8AZgB0oRqAGGh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbTAN # BgkqhkiG9w0BAQEFAASCAQAnoULU7PZCOoQXts51jLnhwzgrtAQZL3J0jPLl7ZWy # CsfXiqqBpokyqmfR6JQXMWJVA9i3Xfng2DIu3qZw/AKN9u9rXubzIXwEtNc94XEj # WhoUSX8Ag+9sLrWajwUqaDIRqGLh6BYTOo1NugtXALVmI/sNnN9de6+Nb11YIdH7 # FpcslLFFQ9pG0ffKy6FNs55jzT5TW7/8mrODeVspGnC2lD8KQvJnk+FIKsGbM1EO # G7wh/KyJJATYHL2tRxsLgkYa0bs0U8Eo5SYOT05/Vr+DC26pBzoyR4kw/SiYoCSk # nJ4K7mPMxMguPfNK4QjP82EmwGApUnNHjS4GRAVoNZusoYIW/TCCFvkGCisGAQQB # gjcDAwExghbpMIIW5QYJKoZIhvcNAQcCoIIW1jCCFtICAQMxDzANBglghkgBZQME # AgEFADCCAVEGCyqGSIb3DQEJEAEEoIIBQASCATwwggE4AgEBBgorBgEEAYRZCgMB # MDEwDQYJYIZIAWUDBAIBBQAEIARu2N06PyDGpn1s6LgAMFwxS3MZiAJhMJDXbLU8 # Jb6vAgZjv/B+AM8YEzIwMjMwMTE4MTg0NjQ3LjU0NlowBIACAfSggdCkgc0wgcox # CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRt # b25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xJTAjBgNVBAsTHE1p # Y3Jvc29mdCBBbWVyaWNhIE9wZXJhdGlvbnMxJjAkBgNVBAsTHVRoYWxlcyBUU1Mg # RVNOOkQ2QkQtRTNFNy0xNjg1MSUwIwYDVQQDExxNaWNyb3NvZnQgVGltZS1TdGFt # cCBTZXJ2aWNloIIRVDCCBwwwggT0oAMCAQICEzMAAAHH+wCgSlvyJ9wAAQAAAccw # DQYJKoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0 # b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3Jh # dGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIwMTAwHhcN # MjIxMTA0MTkwMTM1WhcNMjQwMjAyMTkwMTM1WjCByjELMAkGA1UEBhMCVVMxEzAR # BgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1p # Y3Jvc29mdCBDb3Jwb3JhdGlvbjElMCMGA1UECxMcTWljcm9zb2Z0IEFtZXJpY2Eg # T3BlcmF0aW9uczEmMCQGA1UECxMdVGhhbGVzIFRTUyBFU046RDZCRC1FM0U3LTE2 # ODUxJTAjBgNVBAMTHE1pY3Jvc29mdCBUaW1lLVN0YW1wIFNlcnZpY2UwggIiMA0G # CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCvQtxW2dq00UwGtBO0b0/whIA/LIab # E1+ETNo5WW3TzykFQUAhqyY3946KMTpRxp/dzZtWc3/TaKHSyZKpiSbk/dnBTtlb # bTZvpw8MmNdyuMmPSp+e5xwG0TdZTS9nwKJAPuqsrF4XxgE1xL49W2+yqF3lhboD # CFaqGPDWZi4t60Xlvpo+J//dHOXKobdJXtA+JIl6d2zuAbjflGzLUcnheerO04lH # jUjSPcRDTkkwXlA1GLuRPq9dNP4wdWPbsVVDtt5/9T7YQBsWPZfYA5Zu+CVhpicz # eb8j85YMdSAbDwoh2wOHdbV66ycXYPuh6caC1qGz5LUblSiV/kRKD/1n7fyuFDAu # CiRjmTqnyTlqtha2zN0kromIhGXzjcfviTv5CqVPYtsBA+ryK9C/SB1yVbZom6fU # qtb6/nZHe8AcI61tSbG8PV40YeoaotqC2Wr1QVcpe5eepcmqu4JiZ/B0UwPRQ/qK # LWUV14ovzs92N0DDIKJVwISgue8PPK+M2PG2RN3PpHjIXU39fg9JAfgWWCyXIEhe # CBpKU+28+7EC25pz8hOPiTQhFKEaJgsEzYPDqh6ws6jF7Ts5Q876pdc5wkxUeETQ # yWGGfF83YHUlYU9bBDqihaKoA5AOrNwPH7v2yHEDULHQrvR44GmUyiDbuBigukG/ # udHPi0eqhPK8DQIDAQABo4IBNjCCATIwHQYDVR0OBBYEFAVQ0t0cPsEAX9VT9f94 # QcuJRJIgMB8GA1UdIwQYMBaAFJ+nFV0AXmJdg/Tl0mWnG1M1GelyMF8GA1UdHwRY # MFYwVKBSoFCGTmh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2lvcHMvY3JsL01p # Y3Jvc29mdCUyMFRpbWUtU3RhbXAlMjBQQ0ElMjAyMDEwKDEpLmNybDBsBggrBgEF # BQcBAQRgMF4wXAYIKwYBBQUHMAKGUGh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9w # a2lvcHMvY2VydHMvTWljcm9zb2Z0JTIwVGltZS1TdGFtcCUyMFBDQSUyMDIwMTAo # MSkuY3J0MAwGA1UdEwEB/wQCMAAwEwYDVR0lBAwwCgYIKwYBBQUHAwgwDQYJKoZI # hvcNAQELBQADggIBANDLlzyiA/TLzECwtVxrTvBbLWZP6epiAAWfPb3vaQ074ons # ATh/5JVu86eR5644+rfFz7pNLyDcW4opgTBiq+dEfFfny2OWxxmxl4qe7t8Y1SWk # 1P1s5AUdYAtRG6henxMseHGPc8Sr2PMVgE/Zg0wuiXvSiNjWqnN7ecwwl+l26t0E # Glo4uUmZE1MuHF35EkYlBtjVcBzHqn8WKDCoFqxINTGn7TIU8QEH24ETcogsC2rp # 9zMangQx6ifpiaTIIYC1cwoMVBCB0/8hN7tWCEBVs9NWU/eFjV0WBz63xgrahsVI # VUqyWQBIBMMe6UIyG35asiy6RyURQ/0NoyamrtLREs4MyJwjo+2qoY6F2dpGW0DR # 35Z/7S0+31JRW2s8nI7tYw8pvKQJFfOYcrTrOvSSfViJRg1cKw6BocXkiY7ZnBDn # hQTUjnmONR2V3KPL9Q8mDFGb03Jd47tp1ivwrx/pDac8XS9aoUbt7DBoCXkKUp6v # OyF+EHzO6NVHR3VFrtnTWWddiFa4+pVlrIWXskevqLqG6GlToFDr9WBjRwGKSxfi # Y0z4hJjzVPVFi3t9YBM27/OSMg1zOKnNt+DlL7d8ICjyBUHr7oDkvS8GDf12wUhO # /oxYm5DxlnLt/CUUFkTh3kgVtG51qQ3AoZ3IsYzai1o2rvCbeS7vHjVQYCaQMIIH # cTCCBVmgAwIBAgITMwAAABXF52ueAptJmQAAAAAAFTANBgkqhkiG9w0BAQsFADCB # iDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1Jl # ZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEyMDAGA1UEAxMp # TWljcm9zb2Z0IFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTAwHhcNMjEw # OTMwMTgyMjI1WhcNMzAwOTMwMTgzMjI1WjB8MQswCQYDVQQGEwJVUzETMBEGA1UE # CBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9z # b2Z0IENvcnBvcmF0aW9uMSYwJAYDVQQDEx1NaWNyb3NvZnQgVGltZS1TdGFtcCBQ # Q0EgMjAxMDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAOThpkzntHIh # C3miy9ckeb0O1YLT/e6cBwfSqWxOdcjKNVf2AX9sSuDivbk+F2Az/1xPx2b3lVNx # WuJ+Slr+uDZnhUYjDLWNE893MsAQGOhgfWpSg0S3po5GawcU88V29YZQ3MFEyHFc # UTE3oAo4bo3t1w/YJlN8OWECesSq/XJprx2rrPY2vjUmZNqYO7oaezOtgFt+jBAc # nVL+tuhiJdxqD89d9P6OU8/W7IVWTe/dvI2k45GPsjksUZzpcGkNyjYtcI4xyDUo # veO0hyTD4MmPfrVUj9z6BVWYbWg7mka97aSueik3rMvrg0XnRm7KMtXAhjBcTyzi # YrLNueKNiOSWrAFKu75xqRdbZ2De+JKRHh09/SDPc31BmkZ1zcRfNN0Sidb9pSB9 # fvzZnkXftnIv231fgLrbqn427DZM9ituqBJR6L8FA6PRc6ZNN3SUHDSCD/AQ8rdH # GO2n6Jl8P0zbr17C89XYcz1DTsEzOUyOArxCaC4Q6oRRRuLRvWoYWmEBc8pnol7X # KHYC4jMYctenIPDC+hIK12NvDMk2ZItboKaDIV1fMHSRlJTYuVD5C4lh8zYGNRiE # R9vcG9H9stQcxWv2XFJRXRLbJbqvUAV6bMURHXLvjflSxIUXk8A8FdsaN8cIFRg/ # eKtFtvUeh17aj54WcmnGrnu3tz5q4i6tAgMBAAGjggHdMIIB2TASBgkrBgEEAYI3 # FQEEBQIDAQABMCMGCSsGAQQBgjcVAgQWBBQqp1L+ZMSavoKRPEY1Kc8Q/y8E7jAd # BgNVHQ4EFgQUn6cVXQBeYl2D9OXSZacbUzUZ6XIwXAYDVR0gBFUwUzBRBgwrBgEE # AYI3TIN9AQEwQTA/BggrBgEFBQcCARYzaHR0cDovL3d3dy5taWNyb3NvZnQuY29t # L3BraW9wcy9Eb2NzL1JlcG9zaXRvcnkuaHRtMBMGA1UdJQQMMAoGCCsGAQUFBwMI # MBkGCSsGAQQBgjcUAgQMHgoAUwB1AGIAQwBBMAsGA1UdDwQEAwIBhjAPBgNVHRMB # Af8EBTADAQH/MB8GA1UdIwQYMBaAFNX2VsuP6KJcYmjRPZSQW9fOmhjEMFYGA1Ud # HwRPME0wS6BJoEeGRWh0dHA6Ly9jcmwubWljcm9zb2Z0LmNvbS9wa2kvY3JsL3By # b2R1Y3RzL01pY1Jvb0NlckF1dF8yMDEwLTA2LTIzLmNybDBaBggrBgEFBQcBAQRO # MEwwSgYIKwYBBQUHMAKGPmh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2kvY2Vy # dHMvTWljUm9vQ2VyQXV0XzIwMTAtMDYtMjMuY3J0MA0GCSqGSIb3DQEBCwUAA4IC # AQCdVX38Kq3hLB9nATEkW+Geckv8qW/qXBS2Pk5HZHixBpOXPTEztTnXwnE2P9pk # bHzQdTltuw8x5MKP+2zRoZQYIu7pZmc6U03dmLq2HnjYNi6cqYJWAAOwBb6J6Gng # ugnue99qb74py27YP0h1AdkY3m2CDPVtI1TkeFN1JFe53Z/zjj3G82jfZfakVqr3 # lbYoVSfQJL1AoL8ZthISEV09J+BAljis9/kpicO8F7BUhUKz/AyeixmJ5/ALaoHC # gRlCGVJ1ijbCHcNhcy4sa3tuPywJeBTpkbKpW99Jo3QMvOyRgNI95ko+ZjtPu4b6 # MhrZlvSP9pEB9s7GdP32THJvEKt1MMU0sHrYUP4KWN1APMdUbZ1jdEgssU5HLcEU # BHG/ZPkkvnNtyo4JvbMBV0lUZNlz138eW0QBjloZkWsNn6Qo3GcZKCS6OEuabvsh # VGtqRRFHqfG3rsjoiV5PndLQTHa1V1QJsWkBRH58oWFsc/4Ku+xBZj1p/cvBQUl+ # fpO+y/g75LcVv7TOPqUxUYS8vwLBgqJ7Fx0ViY1w/ue10CgaiQuPNtq6TPmb/wrp # NPgkNWcr4A245oyZ1uEi6vAnQj0llOZ0dFtq0Z4+7X6gMTN9vMvpe784cETRkPHI # qzqKOghif9lwY1NNje6CbaUFEMFxBmoQtB1VM1izoXBm8qGCAsswggI0AgEBMIH4 # oYHQpIHNMIHKMQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4G # A1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSUw # IwYDVQQLExxNaWNyb3NvZnQgQW1lcmljYSBPcGVyYXRpb25zMSYwJAYDVQQLEx1U # aGFsZXMgVFNTIEVTTjpENkJELUUzRTctMTY4NTElMCMGA1UEAxMcTWljcm9zb2Z0 # IFRpbWUtU3RhbXAgU2VydmljZaIjCgEBMAcGBSsOAwIaAxUA4gBI/QlJu/lHbfDF # yJCK8fJyRiiggYMwgYCkfjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGlu # Z3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBv # cmF0aW9uMSYwJAYDVQQDEx1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMDAN # BgkqhkiG9w0BAQUFAAIFAOdyV8cwIhgPMjAyMzAxMTgxOTM0MzFaGA8yMDIzMDEx # OTE5MzQzMVowdDA6BgorBgEEAYRZCgQBMSwwKjAKAgUA53JXxwIBADAHAgEAAgID # MzAHAgEAAgIRDDAKAgUA53OpRwIBADA2BgorBgEEAYRZCgQCMSgwJjAMBgorBgEE # AYRZCgMCoAowCAIBAAIDB6EgoQowCAIBAAIDAYagMA0GCSqGSIb3DQEBBQUAA4GB # AFpBlejlAB922ddlX6gICNTMeVA0jZYPTLETUd/dPMbBtL4Fhh+kiAGI1djW5FT2 # v1JVDIvclaf++UvJ6n7kxb24wnSghy/d1pvzEJZi+rmMi5Ku6aOK72JbWAPLTzaz # WfXuG6CWSv3YCyEJtQi3Um0I9xL7n3J7T8a97xjt6IzZMYIEDTCCBAkCAQEwgZMw # fDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1Jl # ZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEmMCQGA1UEAxMd # TWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIwMTACEzMAAAHH+wCgSlvyJ9wAAQAA # AccwDQYJYIZIAWUDBAIBBQCgggFKMBoGCSqGSIb3DQEJAzENBgsqhkiG9w0BCRAB # BDAvBgkqhkiG9w0BCQQxIgQg0D5lJPHIHuXu3R8nqS8YaDdQ930DIi0MGSHUbjO/ # /ZcwgfoGCyqGSIb3DQEJEAIvMYHqMIHnMIHkMIG9BCBH5+Xb4lKyRQs55Vgtt4yC # Tsd0htESYCyPC1zLowmSyTCBmDCBgKR+MHwxCzAJBgNVBAYTAlVTMRMwEQYDVQQI # EwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3Nv # ZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBD # QSAyMDEwAhMzAAABx/sAoEpb8ifcAAEAAAHHMCIEIBAq0eIbgfDOS2cmRNTJQ5Nw # CfZKHwX6c3AATbT0rtIbMA0GCSqGSIb3DQEBCwUABIICABW1Yc8Mev9f7UTu6EDx # /PeM8H7Mmz3a/NxQ5rmRl8nt/SqCx9cr2MN4vAh2OTYhwYdXYwv+U6y65Ikc1hsb # +IXUh5Pu3mMfx6dYJt100nhaWdWpXB5SiOhZydpysbOMkafYOGUnGa/I2PHINmFy # Ytkf2HK7joe/wccDP3lQg3JyxNGDZuCT6oteKDnXyRJG21JALPHqmrtwjCiDzN64 # rP+/3t2qxpRoxIdOWfDuF3DYlxBvQJCfj5SLEwsEU32ojEfYUEpBxPoMndvnK+c9 # SyHMjbU1qsTWLrHAwcE8qpad97PiTSFd/h5qRd7LPxK/AF/uOUg6Vc4Cwz1mHIym # Vz1dhGh1GE7aAghYL47vSBsY7L7xU8BpnAiLKqUiScJltNXdlGjwYUrG8K/UL3yN # BCiAMF/iw3lUma1oK+FElLPUCNUyxJ3WMnuUVJR3unIzT3T4Zx1glFWI6+7vQejI # DXRKwUl9vO/1hsHZioxMi4MwlUoICf6p0Anma3lnJi/dy5Gy8zPqDXQIwMAijsuZ # RyVyM5m2UKBfzQ2352mZdvkstPcd/7CIEAlAqgXHfY2keGOhlp1xNtxYm+yW8lev # r7MgwXfoDfxYpz06kImJXwCbkUbs0eVz2VYh+4TSmmRARYsKwVOlEXDHXnS2ZUFu # cw49T5VRkHIJbaFIAhGfOSRf # SIG # End signature block |