Microsoft.Graph.Compatibility.AzureAD.psm1
# ------------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ Set-StrictMode -Version 5 function Get-CompatADMSIdentityProvider { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["IdentityProviderBaseId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgIdentityProvider @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADServicePrincipalOAuth2PermissionGrant { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["OAuth2PermissionGrantId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgServicePrincipalOAuth2PermissionGrant @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADApplicationExtensionProperty { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgApplicationExtensionProperty @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADApplicationServiceEndpoint { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgServicePrincipalEndpoint @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADMSGroupPermissionGrant { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["GroupId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgGroupPermissionGrant @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Set-CompatADMSIdentityProvider { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Type, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Name, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ClientId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ClientSecret ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["Id"]) { $params["IdentityProviderBaseId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["Type"]) { $params["Type"] = $PSBoundParameters["Type"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Name"]) { $params["Name"] = $PSBoundParameters["Name"] } if($null -ne $PSBoundParameters["ClientId"]) { $params["ClientId"] = $PSBoundParameters["ClientId"] } if($null -ne $PSBoundParameters["ClientSecret"]) { $params["ClientSecret"] = $PSBoundParameters["ClientSecret"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgIdentityProvider @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Add-CompatADGroupOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $RefObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["GroupId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["RefObjectId"]) { $params["RefObjectId"] = $PSBoundParameters["RefObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgGroupOwner @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function 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 New-CompatADMSRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $RoleDefinitionId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DirectoryScopeId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $PrincipalId ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["RoleDefinitionId"]) { $params["RoleDefinitionId"] = $PSBoundParameters["RoleDefinitionId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["DirectoryScopeId"]) { $params["DirectoryScopeId"] = $PSBoundParameters["DirectoryScopeId"] } if($null -ne $PSBoundParameters["PrincipalId"]) { $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgRoleManagementDirectoryRoleAssignment @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Select-CompatADGroupIdsUserIsMemberOf { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["GroupIdsForMembershipCheck"]) { $params["GroupIdsForMembershipCheck"] = $PSBoundParameters["GroupIdsForMembershipCheck"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUserMemberOf @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function 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 Get-CompatADMSAuthorizationPolicy { [CmdletBinding(DefaultParameterSetName = '')] param ( ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgPolicyAuthorizationPolicy @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Select-CompatADGroupIdsServicePrincipalIsMemberOf { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["GroupIdsForMembershipCheck"]) { $params["GroupIdsForMembershipCheck"] = $PSBoundParameters["GroupIdsForMembershipCheck"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgServicePrincipalMemberOf @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Set-CompatADGroup { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Description, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $MailEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $SecurityEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $MailNickName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["Description"]) { $params["Description"] = $PSBoundParameters["Description"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["GroupId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["MailEnabled"]) { $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["SecurityEnabled"]) { $params["SecurityEnabled"] = $PSBoundParameters["SecurityEnabled"] } if($null -ne $PSBoundParameters["MailNickName"]) { $params["MailNickName"] = $PSBoundParameters["MailNickName"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgGroup @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Set-CompatADApplicationLogo { [CmdletBinding(DefaultParameterSetName = 'File')] param ( [Parameter(ParameterSetName = "ByteArray")][System.String] $ObjectId, [Parameter(ParameterSetName = "ByteArray", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Byte[]] $ImageByteArray, [Parameter(ParameterSetName = "File", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $FilePath, [Parameter(ParameterSetName = "Stream", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.IO.Stream] $FileStream ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["ImageByteArray"]) { $params["ImageByteArray"] = $PSBoundParameters["ImageByteArray"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["FilePath"]) { $params["FilePath"] = $PSBoundParameters["FilePath"] } if($null -ne $PSBoundParameters["FileStream"]) { $params["FileStream"] = $PSBoundParameters["FileStream"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Set-MgApplicationLogo @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADContactDirectReport { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgContactDirectReport @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Add-CompatADGroupMember { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $RefObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"; RefObjectId = "DirectoryObjectId"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["GroupId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["RefObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["RefObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgGroupMember @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADMSConditionalAccessPolicy { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $PolicyId ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["PolicyId"]) { $params["PolicyId"] = $PSBoundParameters["PolicyId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgIdentityConditionalAccessPolicy @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Add-CompatADMSServicePrincipalDelegatedPermissionClassification { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $PermissionId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.Nullable`1[Microsoft.Open.MSGraph.Model.DelegatedPermissionClassification+ClassificationEnum]] $Classification, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $PermissionName, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ServicePrincipalId ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["PermissionId"]) { $params["PermissionId"] = $PSBoundParameters["PermissionId"] } if($null -ne $PSBoundParameters["Classification"]) { $params["Classification"] = $PSBoundParameters["Classification"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["PermissionName"]) { $params["PermissionName"] = $PSBoundParameters["PermissionName"] } if($null -ne $PSBoundParameters["ServicePrincipalId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgServicePrincipalDelegatedPermissionClassification @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADServiceAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $AppRoleAssignmentId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["AppRoleAssignmentId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["AppRoleAssignmentId"]) { $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgServicePrincipalAppRoleAssignment @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADDomainNameReference { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Name ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Name"]) { $params["Name"] = $PSBoundParameters["Name"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDomainNameReference @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Set-CompatADMSConditionalAccessPolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $PolicyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls] $SessionControls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $State, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls] $GrantControls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet] $Conditions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["Id"]) { $params["ConditionalAccessPolicyId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["PolicyId"]) { $params["PolicyId"] = $PSBoundParameters["PolicyId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["SessionControls"]) { $params["SessionControls"] = $PSBoundParameters["SessionControls"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["State"]) { $params["State"] = $PSBoundParameters["State"] } if($null -ne $PSBoundParameters["GrantControls"]) { $params["GrantControls"] = $PSBoundParameters["GrantControls"] } if($null -ne $PSBoundParameters["Conditions"]) { $params["Conditions"] = $PSBoundParameters["Conditions"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgIdentityConditionalAccessPolicy @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADMSAdministrativeUnitMember { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $MemberId ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["AdministrativeUnitId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["MemberId"]) { $params["MemberId"] = $PSBoundParameters["MemberId"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgDirectoryAdministrativeUnitScopedRoleMember @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADUserOAuth2PermissionGrant { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["OAuth2PermissionGrantId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUserOAuth2PermissionGrant @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADOAuth2PermissionGrant { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgOAuth2PermissionGrant @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function New-CompatADMSIdentityProvider { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $ClientId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $Type, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Name, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $ClientSecret ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["ClientId"]) { $params["ClientId"] = $PSBoundParameters["ClientId"] } if($null -ne $PSBoundParameters["Type"]) { $params["Type"] = $PSBoundParameters["Type"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Name"]) { $params["Name"] = $PSBoundParameters["Name"] } if($null -ne $PSBoundParameters["ClientSecret"]) { $params["ClientSecret"] = $PSBoundParameters["ClientSecret"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgIdentityProvider @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADMSDeletedDirectoryObject { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["DirectoryObjectId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgDirectoryObject @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADContactMembership { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgContactMemberOf @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function New-CompatADGroup { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.Nullable`1[System.Boolean]] $MailEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.Nullable`1[System.Boolean]] $SecurityEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $MailNickName, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $DisplayName ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["Description"]) { $params["Description"] = $PSBoundParameters["Description"] } if($null -ne $PSBoundParameters["MailEnabled"]) { $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["SecurityEnabled"]) { $params["SecurityEnabled"] = $PSBoundParameters["SecurityEnabled"] } if($null -ne $PSBoundParameters["MailNickName"]) { $params["MailNickName"] = $PSBoundParameters["MailNickName"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgGroup @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function New-CompatADMSNamedLocationPolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IncludeUnknownCountriesAndRegions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsTrusted, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $OdataType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion]] $CountriesAndRegions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]] $IpRanges, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["IncludeUnknownCountriesAndRegions"]) { $params["IncludeUnknownCountriesAndRegions"] = $PSBoundParameters["IncludeUnknownCountriesAndRegions"] } if($null -ne $PSBoundParameters["Id"]) { $params["Id"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["IsTrusted"]) { $params["IsTrusted"] = $PSBoundParameters["IsTrusted"] } if($null -ne $PSBoundParameters["OdataType"]) { $params["OdataType"] = $PSBoundParameters["OdataType"] } if($null -ne $PSBoundParameters["CountriesAndRegions"]) { $params["CountriesAndRegions"] = $PSBoundParameters["CountriesAndRegions"] } if($null -ne $PSBoundParameters["IpRanges"]) { $params["IpRanges"] = $PSBoundParameters["IpRanges"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgIdentityConditionalAccessNamedLocation @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Confirm-CompatADDomain { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][Microsoft.Open.AzureAD.Model.CrossCloudVerificationCodeBody] $CrossCloudVerificationCode, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Name ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["CrossCloudVerificationCode"]) { $params["CrossCloudVerificationCode"] = $PSBoundParameters["CrossCloudVerificationCode"] } if($null -ne $PSBoundParameters["Name"]) { $params["Name"] = $PSBoundParameters["Name"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Confirm-MgDomain @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADServicePrincipalOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $OwnerId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{OwnerId = "DirectoryObjectId"; ObjectId = "Id"} if($null -ne $PSBoundParameters["OwnerId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ServicePrincipalId "] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgServicePrincipalOwnerByRef @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADUserAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $AppRoleAssignmentId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["AppRoleAssignmentId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["AppRoleAssignmentId"]) { $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgUserAppRoleAssignment @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADMSRoleAssignment { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["UnifiedRoleAssignmentId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgRoleManagementDirectoryRoleAssignment @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADMSIdentityProvider { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["IdentityProviderBaseId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgIdentityProvider @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADDeletedApplication { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $SearchString, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.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 Set-CompatADMSAuthorizationPolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $AllowedToSignUpEmailBasedSubscriptions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $BlockMsolPowerShell, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.DefaultUserRolePermissions] $DefaultUserRolePermissions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $AllowedToUseSSPR, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $AllowEmailVerifiedUsersToJoinOrganization, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["Description"]) { $params["Description"] = $PSBoundParameters["Description"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["AllowedToSignUpEmailBasedSubscriptions"]) { $params["AllowedToSignUpEmailBasedSubscriptions"] = $PSBoundParameters["AllowedToSignUpEmailBasedSubscriptions"] } if($null -ne $PSBoundParameters["BlockMsolPowerShell"]) { $params["BlockMsolPowerShell"] = $PSBoundParameters["BlockMsolPowerShell"] } if($null -ne $PSBoundParameters["DefaultUserRolePermissions"]) { $params["DefaultUserRolePermissions"] = $PSBoundParameters["DefaultUserRolePermissions"] } if($null -ne $PSBoundParameters["AllowedToUseSSPR"]) { $params["AllowedToUseSSPR"] = $PSBoundParameters["AllowedToUseSSPR"] } if($null -ne $PSBoundParameters["AllowEmailVerifiedUsersToJoinOrganization"]) { $params["AllowEmailVerifiedUsersToJoinOrganization"] = $PSBoundParameters["AllowEmailVerifiedUsersToJoinOrganization"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgPolicyAuthorizationPolicy @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADGroupOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $OwnerId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{OwnerId = "DirectoryObjectId"; ObjectId = "Id"} if($null -ne $PSBoundParameters["OwnerId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["GroupId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgGroupOwnerByRef @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADMSRoleDefinition { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgRoleManagementDirectoryRoleDefinition @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADApplicationPasswordCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $KeyId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["KeyId"]) { $params["KeyId"] = $PSBoundParameters["KeyId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgApplicationPassword @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADServicePrincipalOwnedObject { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgServicePrincipalOwnedObject @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADMSRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $SearchString, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["Id"]) { $params["UnifiedRoleAssignmentId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($null -ne $PSBoundParameters["SearchString"]) { $params["SearchString"] = $PSBoundParameters["SearchString"] } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgRoleManagementDirectoryRoleAssignment @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADUserOwnedObject { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUserOwnedObject @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADMSLifecyclePolicyGroup { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $GroupId ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["GroupLifecyclePolicyId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["GroupId"]) { $params["GroupId"] = $PSBoundParameters["GroupId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgGroupFromLifecyclePolicy @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADDomain { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Name ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Name"]) { $params["Name"] = $PSBoundParameters["Name"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgDomain @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADContact { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["OrgContactId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgContact @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Set-CompatADMSGroupLifecyclePolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $AlternateNotificationEmails, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ManagedGroupTypes, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Int32]] $GroupLifetimeInDays ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["AlternateNotificationEmails"]) { $params["AlternateNotificationEmails"] = $PSBoundParameters["AlternateNotificationEmails"] } if($null -ne $PSBoundParameters["Id"]) { $params["GroupLifecyclePolicyId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["ManagedGroupTypes"]) { $params["ManagedGroupTypes"] = $PSBoundParameters["ManagedGroupTypes"] } if($null -ne $PSBoundParameters["GroupLifetimeInDays"]) { $params["GroupLifetimeInDays"] = $PSBoundParameters["GroupLifetimeInDays"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgGroupLifecyclePolicy @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADGroupAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["AppRoleAssignmentId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgGroupAppRoleAssignment @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADMSApplication { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $SearchString, [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{SearchString = "Filter"; ObjectId = "Id"} if($null -ne $PSBoundParameters["SearchString"]) { $TmpValue = $PSBoundParameters["SearchString"] $Value = "displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')" $params["Filter"] = $Value } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgApplication @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Set-CompatADApplication { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AddIn]] $AddIns, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $SignInAudience, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $Oauth2AllowImplicitFlow, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $ReplyUrls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsDisabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $AllowGuestsSignIn, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $KnownClientApplications, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $PublisherDomain, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $OrgRestrictions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.AzureAD.Model.OptionalClaims] $OptionalClaims, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.AzureAD.Model.ParentalControlSettings] $ParentalControlSettings, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $Oauth2AllowUrlPathMatching, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential]] $KeyCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $WwwHomepage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $IdentifierUris, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $GroupMembershipClaims, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.OAuth2Permission]] $Oauth2Permissions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $LogoutUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ErrorUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $SamlMetadataUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsDeviceOnlyAuthSupported, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PreAuthorizedApplication]] $PreAuthorizedApplications, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $Oauth2RequirePostResponse, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $AllowPassthroughUsers, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.RequiredResourceAccess]] $RequiredResourceAccess, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $PublicClient, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $AvailableToOtherTenants, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $RecordConsentConditions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $AppLogoUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential]] $PasswordCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Homepage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AppRole]] $AppRoles, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.AzureAD.Model.InformationalUrl] $InformationalUrls ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["AddIns"]) { $params["AddIns"] = $PSBoundParameters["AddIns"] } if($null -ne $PSBoundParameters["SignInAudience"]) { $params["SignInAudience"] = $PSBoundParameters["SignInAudience"] } if($null -ne $PSBoundParameters["Oauth2AllowImplicitFlow"]) { $params["Oauth2AllowImplicitFlow"] = $PSBoundParameters["Oauth2AllowImplicitFlow"] } if($null -ne $PSBoundParameters["ReplyUrls"]) { $params["ReplyUrls"] = $PSBoundParameters["ReplyUrls"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if($null -ne $PSBoundParameters["IsDisabled"]) { $params["IsDisabled"] = $PSBoundParameters["IsDisabled"] } if($null -ne $PSBoundParameters["AllowGuestsSignIn"]) { $params["AllowGuestsSignIn"] = $PSBoundParameters["AllowGuestsSignIn"] } if($null -ne $PSBoundParameters["KnownClientApplications"]) { $params["KnownClientApplications"] = $PSBoundParameters["KnownClientApplications"] } if($null -ne $PSBoundParameters["PublisherDomain"]) { $params["PublisherDomain"] = $PSBoundParameters["PublisherDomain"] } if($null -ne $PSBoundParameters["OrgRestrictions"]) { $params["OrgRestrictions"] = $PSBoundParameters["OrgRestrictions"] } if($null -ne $PSBoundParameters["OptionalClaims"]) { $params["OptionalClaims"] = $PSBoundParameters["OptionalClaims"] } if($null -ne $PSBoundParameters["ParentalControlSettings"]) { $params["ParentalControlSettings"] = $PSBoundParameters["ParentalControlSettings"] } if($null -ne $PSBoundParameters["Oauth2AllowUrlPathMatching"]) { $params["Oauth2AllowUrlPathMatching"] = $PSBoundParameters["Oauth2AllowUrlPathMatching"] } if($null -ne $PSBoundParameters["KeyCredentials"]) { $params["KeyCredentials"] = $PSBoundParameters["KeyCredentials"] } if($null -ne $PSBoundParameters["WwwHomepage"]) { $params["WwwHomepage"] = $PSBoundParameters["WwwHomepage"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["IdentifierUris"]) { $params["IdentifierUris"] = $PSBoundParameters["IdentifierUris"] } if($null -ne $PSBoundParameters["GroupMembershipClaims"]) { $params["GroupMembershipClaims"] = $PSBoundParameters["GroupMembershipClaims"] } if($null -ne $PSBoundParameters["Oauth2Permissions"]) { $params["Oauth2Permissions"] = $PSBoundParameters["Oauth2Permissions"] } if($null -ne $PSBoundParameters["LogoutUrl"]) { $params["LogoutUrl"] = $PSBoundParameters["LogoutUrl"] } if($null -ne $PSBoundParameters["ErrorUrl"]) { $params["ErrorUrl"] = $PSBoundParameters["ErrorUrl"] } if($null -ne $PSBoundParameters["SamlMetadataUrl"]) { $params["SamlMetadataUrl"] = $PSBoundParameters["SamlMetadataUrl"] } if($null -ne $PSBoundParameters["IsDeviceOnlyAuthSupported"]) { $params["IsDeviceOnlyAuthSupported"] = $PSBoundParameters["IsDeviceOnlyAuthSupported"] } if($null -ne $PSBoundParameters["PreAuthorizedApplications"]) { $params["PreAuthorizedApplications"] = $PSBoundParameters["PreAuthorizedApplications"] } if($null -ne $PSBoundParameters["Oauth2RequirePostResponse"]) { $params["Oauth2RequirePostResponse"] = $PSBoundParameters["Oauth2RequirePostResponse"] } if($null -ne $PSBoundParameters["AllowPassthroughUsers"]) { $params["AllowPassthroughUsers"] = $PSBoundParameters["AllowPassthroughUsers"] } if($null -ne $PSBoundParameters["RequiredResourceAccess"]) { $params["RequiredResourceAccess"] = $PSBoundParameters["RequiredResourceAccess"] } if($null -ne $PSBoundParameters["PublicClient"]) { $params["PublicClient"] = $PSBoundParameters["PublicClient"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["AvailableToOtherTenants"]) { $params["AvailableToOtherTenants"] = $PSBoundParameters["AvailableToOtherTenants"] } if($null -ne $PSBoundParameters["RecordConsentConditions"]) { $params["RecordConsentConditions"] = $PSBoundParameters["RecordConsentConditions"] } if($null -ne $PSBoundParameters["AppLogoUrl"]) { $params["AppLogoUrl"] = $PSBoundParameters["AppLogoUrl"] } if($null -ne $PSBoundParameters["PasswordCredentials"]) { $params["PasswordCredentials"] = $PSBoundParameters["PasswordCredentials"] } if($null -ne $PSBoundParameters["Homepage"]) { $params["Homepage"] = $PSBoundParameters["Homepage"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["AppRoles"]) { $params["AppRoles"] = $PSBoundParameters["AppRoles"] } if($null -ne $PSBoundParameters["InformationalUrls"]) { $params["InformationalUrls"] = $PSBoundParameters["InformationalUrls"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgApplication @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADMSRoleDefinition { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $SearchString, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["Id"]) { $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($null -ne $PSBoundParameters["SearchString"]) { $params["SearchString"] = $PSBoundParameters["SearchString"] } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgRoleManagementDirectoryRoleDefinition @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADGroupMember { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $MemberId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"; MemberId = "DirectoryObjectId"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["GroupId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["MemberId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgGroupMemberByRef @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADServicePrincipalCreatedObject { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgServicePrincipalCreatedObject @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADApplicationKeyCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) (Get-MgApplication -ApplicationId $PSBoundParameters["ObjectId"]).KeyCredentials } function Get-CompatADServicePrincipalOwner { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgServicePrincipalOwner @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADUserThumbnailPhoto { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $FileName, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $FilePath, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Boolean] $View ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["UserId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["FileName"]) { $params["FileName"] = $PSBoundParameters["FileName"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["FilePath"]) { $params["FilePath"] = $PSBoundParameters["FilePath"] } if($null -ne $PSBoundParameters["View"]) { $params["View"] = $PSBoundParameters["View"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUserPhoto @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADServicePrincipalKeyCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) (MgServicePrincipal ServicePrincipalId $PSBoundParameters["ObjectId"]).KeyCredentials } function Remove-CompatADDevice { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DeviceId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgDevice @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADUserExtension { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ExtensionId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUserExtension @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADUserCreatedObject { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUserCreatedObject @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Set-CompatADMSNamedLocationPolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IncludeUnknownCountriesAndRegions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $PolicyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsTrusted, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $OdataType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion]] $CountriesAndRegions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]] $IpRanges, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["IncludeUnknownCountriesAndRegions"]) { $params["IncludeUnknownCountriesAndRegions"] = $PSBoundParameters["IncludeUnknownCountriesAndRegions"] } if($null -ne $PSBoundParameters["Id"]) { $params["NamedLocationId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["PolicyId"]) { $params["PolicyId"] = $PSBoundParameters["PolicyId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["IsTrusted"]) { $params["IsTrusted"] = $PSBoundParameters["IsTrusted"] } if($null -ne $PSBoundParameters["OdataType"]) { $params["OdataType"] = $PSBoundParameters["OdataType"] } if($null -ne $PSBoundParameters["CountriesAndRegions"]) { $params["CountriesAndRegions"] = $PSBoundParameters["CountriesAndRegions"] } if($null -ne $PSBoundParameters["IpRanges"]) { $params["IpRanges"] = $PSBoundParameters["IpRanges"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgIdentityConditionalAccessNamedLocation @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Set-CompatADMSRoleDefinition { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsEnabled, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Version, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $ResourceScopes, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission]] $RolePermissions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $TemplateId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["IsEnabled"]) { $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] } if($null -ne $PSBoundParameters["Id"]) { $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Version"]) { $params["Version"] = $PSBoundParameters["Version"] } if($null -ne $PSBoundParameters["ResourceScopes"]) { $params["ResourceScopes"] = $PSBoundParameters["ResourceScopes"] } if($null -ne $PSBoundParameters["Description"]) { $params["Description"] = $PSBoundParameters["Description"] } if($null -ne $PSBoundParameters["RolePermissions"]) { $params["RolePermissions"] = $PSBoundParameters["RolePermissions"] } if($null -ne $PSBoundParameters["TemplateId"]) { $params["TemplateId"] = $PSBoundParameters["TemplateId"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgRoleManagementDirectoryRoleDefinition @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADContactManager { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["OrgContactId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgContactManager @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADApplicationOwner { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgApplicationOwner @params $response | ForEach-Object { Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADDeviceConfiguration { [CmdletBinding(DefaultParameterSetName = '')] param ( ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDeviceManagementDeviceConfiguration @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADMSScopedRoleMembership { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ScopedRoleMembershipId ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["ScopedRoleMembershipId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["ScopedRoleMembershipId"]) { $params["ScopedRoleMembershipId"] = $PSBoundParameters["ScopedRoleMembershipId"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgUserScopedRoleMemberOf @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADMSApplication { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgApplication @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Set-CompatADUserExtension { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ExtensionName, [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionNameValues, [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ExtensionValue ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ExtensionName"]) { $params["ExtensionName"] = $PSBoundParameters["ExtensionName"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ExtensionId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["ExtensionNameValues"]) { $params["ExtensionNameValues"] = $PSBoundParameters["ExtensionNameValues"] } if($null -ne $PSBoundParameters["ExtensionValue"]) { $params["ExtensionValue"] = $PSBoundParameters["ExtensionValue"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgUserExtension @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADMSLifecyclePolicyGroup { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["GroupLifecyclePolicyId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgGroupLifecyclePolicy @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADUserManager { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["UserId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUserManager @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function New-CompatADServiceAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $ResourceId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $PrincipalId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ResourceId"]) { $params["ResourceId"] = $PSBoundParameters["ResourceId"] } if($null -ne $PSBoundParameters["Id"]) { $params["ServicePrincipalId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["PrincipalId"]) { $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgServicePrincipalAppRoleAssignment @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Add-CompatADApplicationOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $RefObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["RefObjectId"]) { $params["RefObjectId"] = $PSBoundParameters["RefObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgApplicationOwnerByRef @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADMSGroup { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["GroupId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgGroup @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADApplication { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgApplication @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function New-CompatADGroupAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $ResourceId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $PrincipalId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ResourceId"]) { $params["ResourceId"] = $PSBoundParameters["ResourceId"] } if($null -ne $PSBoundParameters["Id"]) { $params["GroupId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["GroupId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["PrincipalId"]) { $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgGroupAppRoleAssignment @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADOAuth2PermissionGrant { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["OAuth2PermissionGrantId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgOAuth2PermissionGrant @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADUserOwnedDevice { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUserOwnedDevice @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADGroup { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["GroupId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgGroup @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Set-CompatADUserLicense { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][Microsoft.Open.AzureAD.Model.AssignedLicenses] $AssignedLicenses ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["UserId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["AssignedLicenses"]) { $params["AssignedLicenses"] = $PSBoundParameters["AssignedLicenses"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Set-MgUserLicense @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADMSApplicationVerifiedPublisher { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $AppObjectId ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["AppObjectId"]) { $params["AppObjectId"] = $PSBoundParameters["AppObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Clear-MgApplicationVerifiedPublisher @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADUserExtension { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Collections.Generic.List`1[System.String]] $ExtensionNames, [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ExtensionName ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ExtensionId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["ExtensionNames"]) { $params["ExtensionNames"] = $PSBoundParameters["ExtensionNames"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["ExtensionName"]) { $params["ExtensionName"] = $PSBoundParameters["ExtensionName"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgUserExtension @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function New-CompatADMSApplicationKey { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][Microsoft.Open.MSGraph.Model.KeyCredential] $KeyCredential, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.PasswordCredential] $PasswordCredential, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $Proof ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["KeyCredential"]) { $params["KeyCredential"] = $PSBoundParameters["KeyCredential"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["PasswordCredential"]) { $params["PasswordCredential"] = $PSBoundParameters["PasswordCredential"] } if($null -ne $PSBoundParameters["Proof"]) { $params["Proof"] = $PSBoundParameters["Proof"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Add-MgApplicationKey @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADServicePrincipalMembership { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgServicePrincipalTransitiveMemberOf @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function New-CompatADMSApplicationPassword { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][Microsoft.Open.MSGraph.Model.PasswordCredential] $PasswordCredential ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["PasswordCredential"]) { $params["PasswordCredential"] = $PSBoundParameters["PasswordCredential"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Add-MgApplicationPassword @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADDomainVerificationDnsRecord { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Name ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Name"]) { $params["Name"] = $PSBoundParameters["Name"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDomainVerificationDnsRecord @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADGroupAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $AppRoleAssignmentId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["AppRoleAssignmentId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["AppRoleAssignmentId"]) { $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgGroupAppRoleAssignment @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADApplicationPasswordCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) (Get-MgApplication -ApplicationId $PSBoundParameters["ObjectId"]).PasswordCredentials } function New-CompatADDevice { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.Nullable`1[System.Boolean]] $AccountEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $DevicePhysicalIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Int32]] $DeviceObjectVersion, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.DateTime]] $ApproximateLastLogonTimeStamp, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ProfileType, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId]] $AlternativeSecurityIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $DeviceOSVersion, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $DeviceOSType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DeviceTrustType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsManaged, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $SystemLabels, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DeviceMetadata, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $DeviceId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsCompliant ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["AccountEnabled"]) { $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] } if($null -ne $PSBoundParameters["DevicePhysicalIds"]) { $params["DevicePhysicalIds"] = $PSBoundParameters["DevicePhysicalIds"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["DeviceObjectVersion"]) { $params["DeviceObjectVersion"] = $PSBoundParameters["DeviceObjectVersion"] } if($null -ne $PSBoundParameters["ApproximateLastLogonTimeStamp"]) { $params["ApproximateLastLogonTimeStamp"] = $PSBoundParameters["ApproximateLastLogonTimeStamp"] } if($null -ne $PSBoundParameters["ProfileType"]) { $params["ProfileType"] = $PSBoundParameters["ProfileType"] } if($null -ne $PSBoundParameters["AlternativeSecurityIds"]) { $params["AlternativeSecurityIds"] = $PSBoundParameters["AlternativeSecurityIds"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["DeviceOSVersion"]) { $params["DeviceOSVersion"] = $PSBoundParameters["DeviceOSVersion"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if($null -ne $PSBoundParameters["DeviceOSType"]) { $params["DeviceOSType"] = $PSBoundParameters["DeviceOSType"] } if($null -ne $PSBoundParameters["DeviceTrustType"]) { $params["DeviceTrustType"] = $PSBoundParameters["DeviceTrustType"] } if($null -ne $PSBoundParameters["IsManaged"]) { $params["IsManaged"] = $PSBoundParameters["IsManaged"] } if($null -ne $PSBoundParameters["SystemLabels"]) { $params["SystemLabels"] = $PSBoundParameters["SystemLabels"] } if($null -ne $PSBoundParameters["DeviceMetadata"]) { $params["DeviceMetadata"] = $PSBoundParameters["DeviceMetadata"] } if($null -ne $PSBoundParameters["DeviceId"]) { $params["DeviceId"] = $PSBoundParameters["DeviceId"] } if($null -ne $PSBoundParameters["IsCompliant"]) { $params["IsCompliant"] = $PSBoundParameters["IsCompliant"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgDevice @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADDirectoryRoleTemplate { [CmdletBinding(DefaultParameterSetName = '')] param ( ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDirectoryRoleTemplate @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Set-CompatADUserPassword { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Security.SecureString] $Password, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Boolean] $ForceChangePasswordNextLogin, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Boolean] $EnforceChangePasswordPolicy ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["UserId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Password"]) { $params["Password"] = $PSBoundParameters["Password"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["ForceChangePasswordNextLogin"]) { $params["ForceChangePasswordNextLogin"] = $PSBoundParameters["ForceChangePasswordNextLogin"] } if($null -ne $PSBoundParameters["EnforceChangePasswordPolicy"]) { $params["EnforceChangePasswordPolicy"] = $PSBoundParameters["EnforceChangePasswordPolicy"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgUserPassword @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADGroupOwner { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["GroupId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgGroupOwner @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADMSPermissionGrantPolicy { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgPolicyPermissionGrantPolicy @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADMSApplicationExtensionProperty { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ExtensionPropertyId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["ExtensionPropertyId"]) { $params["ExtensionPropertyId"] = $PSBoundParameters["ExtensionPropertyId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgApplicationExtensionProperty @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function New-CompatADMSApplicationExtensionProperty { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DataType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Name, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $TargetObjects ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["DataType"]) { $params["DataType"] = $PSBoundParameters["DataType"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Name"]) { $params["Name"] = $PSBoundParameters["Name"] } if($null -ne $PSBoundParameters["TargetObjects"]) { $params["TargetObjects"] = $PSBoundParameters["TargetObjects"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgApplicationExtensionProperty @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADDomainServiceConfigurationRecord { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Name ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Name"]) { $params["Name"] = $PSBoundParameters["Name"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDomainServiceConfigurationRecord @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADMSPermissionGrantPolicy { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgPolicyPermissionGrantPolicy @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADMSConditionalAccessPolicy { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $PolicyId ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["PolicyId"]) { $params["PolicyId"] = $PSBoundParameters["PolicyId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgIdentityConditionalAccessPolicy @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADUserRegisteredDevice { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUserRegisteredDevice @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADContract { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["ContractId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgContract @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Set-CompatADMSApplicationLogo { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Byte[]] $Content ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["Content"]) { $params["Content"] = $PSBoundParameters["Content"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Set-MgApplicationLogo @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Add-CompatADMSScopedRoleMembership { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $AdministrativeUnitId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.MsRoleMemberInfo] $RoleMemberInfo, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $RoleId ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["AdministrativeUnitId"]) { $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] } if($null -ne $PSBoundParameters["Id"]) { $params["DirectoryRoleId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["RoleMemberInfo"]) { $params["RoleMemberInfo"] = $PSBoundParameters["RoleMemberInfo"] } if($null -ne $PSBoundParameters["RoleId"]) { $params["RoleId"] = $PSBoundParameters["RoleId"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgDirectoryRoleScopedMember @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function New-CompatADMSRoleDefinition { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.Nullable`1[System.Boolean]] $IsEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Version, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $ResourceScopes, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission]] $RolePermissions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $TemplateId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $DisplayName ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["IsEnabled"]) { $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] } if($null -ne $PSBoundParameters["Description"]) { $params["Description"] = $PSBoundParameters["Description"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Version"]) { $params["Version"] = $PSBoundParameters["Version"] } if($null -ne $PSBoundParameters["ResourceScopes"]) { $params["ResourceScopes"] = $PSBoundParameters["ResourceScopes"] } if($null -ne $PSBoundParameters["RolePermissions"]) { $params["RolePermissions"] = $PSBoundParameters["RolePermissions"] } if($null -ne $PSBoundParameters["TemplateId"]) { $params["TemplateId"] = $PSBoundParameters["TemplateId"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgRoleManagementDirectoryRoleDefinition @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Set-CompatADUser { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $PostalCode, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $MailNickName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $ShowInAddressList, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Department, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Mobile, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $JobTitle, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ConsentProvidedForMinor, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $PhysicalDeliveryOfficeName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $OtherMails, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $PasswordPolicies, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsCompromised, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName]] $SignInNames, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $PreferredLanguage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $UserState, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ImmutableId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $City, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $AgeGroup, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionProperty, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $UsageLocation, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $State, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $AccountEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Country, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $UserPrincipalName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $GivenName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.AzureAD.Model.PasswordProfile] $PasswordProfile, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $UserType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $StreetAddress, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $CompanyName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $FacsimileTelephoneNumber, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Surname, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $TelephoneNumber, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $CreationType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $UserStateChangedOn ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["PostalCode"]) { $params["PostalCode"] = $PSBoundParameters["PostalCode"] } if($null -ne $PSBoundParameters["MailNickName"]) { $params["MailNickName"] = $PSBoundParameters["MailNickName"] } if($null -ne $PSBoundParameters["ShowInAddressList"]) { $params["ShowInAddressList"] = $PSBoundParameters["ShowInAddressList"] } if($null -ne $PSBoundParameters["Department"]) { $params["Department"] = $PSBoundParameters["Department"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if($null -ne $PSBoundParameters["Mobile"]) { $params["Mobile"] = $PSBoundParameters["Mobile"] } if($null -ne $PSBoundParameters["JobTitle"]) { $params["JobTitle"] = $PSBoundParameters["JobTitle"] } if($null -ne $PSBoundParameters["ConsentProvidedForMinor"]) { $params["ConsentProvidedForMinor"] = $PSBoundParameters["ConsentProvidedForMinor"] } if($null -ne $PSBoundParameters["PhysicalDeliveryOfficeName"]) { $params["PhysicalDeliveryOfficeName"] = $PSBoundParameters["PhysicalDeliveryOfficeName"] } if($null -ne $PSBoundParameters["OtherMails"]) { $params["OtherMails"] = $PSBoundParameters["OtherMails"] } if($null -ne $PSBoundParameters["PasswordPolicies"]) { $params["PasswordPolicies"] = $PSBoundParameters["PasswordPolicies"] } if($null -ne $PSBoundParameters["IsCompromised"]) { $params["IsCompromised"] = $PSBoundParameters["IsCompromised"] } if($null -ne $PSBoundParameters["SignInNames"]) { $params["SignInNames"] = $PSBoundParameters["SignInNames"] } if($null -ne $PSBoundParameters["PreferredLanguage"]) { $params["PreferredLanguage"] = $PSBoundParameters["PreferredLanguage"] } if($null -ne $PSBoundParameters["UserState"]) { $params["UserState"] = $PSBoundParameters["UserState"] } if($null -ne $PSBoundParameters["ImmutableId"]) { $params["ImmutableId"] = $PSBoundParameters["ImmutableId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["City"]) { $params["City"] = $PSBoundParameters["City"] } if($null -ne $PSBoundParameters["AgeGroup"]) { $params["AgeGroup"] = $PSBoundParameters["AgeGroup"] } if($null -ne $PSBoundParameters["ExtensionProperty"]) { $params["ExtensionProperty"] = $PSBoundParameters["ExtensionProperty"] } if($null -ne $PSBoundParameters["UsageLocation"]) { $params["UsageLocation"] = $PSBoundParameters["UsageLocation"] } if($null -ne $PSBoundParameters["State"]) { $params["State"] = $PSBoundParameters["State"] } if($null -ne $PSBoundParameters["AccountEnabled"]) { $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] } if($null -ne $PSBoundParameters["Country"]) { $params["Country"] = $PSBoundParameters["Country"] } if($null -ne $PSBoundParameters["UserPrincipalName"]) { $params["UserPrincipalName"] = $PSBoundParameters["UserPrincipalName"] } if($null -ne $PSBoundParameters["GivenName"]) { $params["GivenName"] = $PSBoundParameters["GivenName"] } if($null -ne $PSBoundParameters["PasswordProfile"]) { $params["PasswordProfile"] = $PSBoundParameters["PasswordProfile"] } if($null -ne $PSBoundParameters["UserType"]) { $params["UserType"] = $PSBoundParameters["UserType"] } if($null -ne $PSBoundParameters["StreetAddress"]) { $params["StreetAddress"] = $PSBoundParameters["StreetAddress"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["UserId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["CompanyName"]) { $params["CompanyName"] = $PSBoundParameters["CompanyName"] } if($null -ne $PSBoundParameters["FacsimileTelephoneNumber"]) { $params["FacsimileTelephoneNumber"] = $PSBoundParameters["FacsimileTelephoneNumber"] } if($null -ne $PSBoundParameters["Surname"]) { $params["Surname"] = $PSBoundParameters["Surname"] } if($null -ne $PSBoundParameters["TelephoneNumber"]) { $params["TelephoneNumber"] = $PSBoundParameters["TelephoneNumber"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["CreationType"]) { $params["CreationType"] = $PSBoundParameters["CreationType"] } if($null -ne $PSBoundParameters["UserStateChangedOn"]) { $params["UserStateChangedOn"] = $PSBoundParameters["UserStateChangedOn"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgUser @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADUserDirectReport { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUserDirectReport @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADDirectoryRoleMember { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $MemberId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryRoleId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["MemberId"]) { $params["MemberId"] = $PSBoundParameters["MemberId"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgDirectoryRoleScopedMember @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADApplicationOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $OwnerId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{OwnerId = "DirectoryObjectId"; ObjectId = "Id"} if($null -ne $PSBoundParameters["OwnerId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgApplicationOwnerByRef @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Set-CompatADDomain { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsDefault, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $SupportedServices, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Name, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsDefaultForCloudRedirections ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["IsDefault"]) { $params["IsDefault"] = $PSBoundParameters["IsDefault"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["SupportedServices"]) { $params["SupportedServices"] = $PSBoundParameters["SupportedServices"] } if($null -ne $PSBoundParameters["Name"]) { $params["Name"] = $PSBoundParameters["Name"] } if($null -ne $PSBoundParameters["IsDefaultForCloudRedirections"]) { $params["IsDefaultForCloudRedirections"] = $PSBoundParameters["IsDefaultForCloudRedirections"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgDomain @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADMSNamedLocationPolicy { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $PolicyId ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["PolicyId"]) { $params["PolicyId"] = $PSBoundParameters["PolicyId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgIdentityConditionalAccessNamedLocation @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Set-CompatADMSApplication { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.ApiApplication] $Api, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.OptionalClaims] $OptionalClaims, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $Tags, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.WebApplication] $Web, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsFallbackPublicClient, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess]] $RequiredResourceAccess, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.PublicClientApplication] $PublicClient, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsDeviceOnlyAuthSupported, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $TokenEncryptionKeyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $IdentifierUris, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.ParentalControlSettings] $ParentalControlSettings, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $GroupMembershipClaims, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn]] $AddIns, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole]] $AppRoles, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential]] $PasswordCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $SignInAudience, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.InformationalUrl] $InformationalUrl ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["Api"]) { $params["Api"] = $PSBoundParameters["Api"] } if($null -ne $PSBoundParameters["OptionalClaims"]) { $params["OptionalClaims"] = $PSBoundParameters["OptionalClaims"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if($null -ne $PSBoundParameters["Tags"]) { $params["Tags"] = $PSBoundParameters["Tags"] } if($null -ne $PSBoundParameters["Web"]) { $params["Web"] = $PSBoundParameters["Web"] } if($null -ne $PSBoundParameters["IsFallbackPublicClient"]) { $params["IsFallbackPublicClient"] = $PSBoundParameters["IsFallbackPublicClient"] } if($null -ne $PSBoundParameters["RequiredResourceAccess"]) { $params["RequiredResourceAccess"] = $PSBoundParameters["RequiredResourceAccess"] } if($null -ne $PSBoundParameters["PublicClient"]) { $params["PublicClient"] = $PSBoundParameters["PublicClient"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["IsDeviceOnlyAuthSupported"]) { $params["IsDeviceOnlyAuthSupported"] = $PSBoundParameters["IsDeviceOnlyAuthSupported"] } if($null -ne $PSBoundParameters["KeyCredentials"]) { $params["KeyCredentials"] = $PSBoundParameters["KeyCredentials"] } if($null -ne $PSBoundParameters["TokenEncryptionKeyId"]) { $params["TokenEncryptionKeyId"] = $PSBoundParameters["TokenEncryptionKeyId"] } if($null -ne $PSBoundParameters["IdentifierUris"]) { $params["IdentifierUris"] = $PSBoundParameters["IdentifierUris"] } if($null -ne $PSBoundParameters["ParentalControlSettings"]) { $params["ParentalControlSettings"] = $PSBoundParameters["ParentalControlSettings"] } if($null -ne $PSBoundParameters["GroupMembershipClaims"]) { $params["GroupMembershipClaims"] = $PSBoundParameters["GroupMembershipClaims"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["AddIns"]) { $params["AddIns"] = $PSBoundParameters["AddIns"] } if($null -ne $PSBoundParameters["AppRoles"]) { $params["AppRoles"] = $PSBoundParameters["AppRoles"] } if($null -ne $PSBoundParameters["PasswordCredentials"]) { $params["PasswordCredentials"] = $PSBoundParameters["PasswordCredentials"] } if($null -ne $PSBoundParameters["SignInAudience"]) { $params["SignInAudience"] = $PSBoundParameters["SignInAudience"] } if($null -ne $PSBoundParameters["InformationalUrl"]) { $params["InformationalUrl"] = $PSBoundParameters["InformationalUrl"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgApplication @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADMSApplicationOwner { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgApplicationOwner @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function New-CompatADApplication { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AddIn]] $AddIns, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $SignInAudience, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $Oauth2AllowImplicitFlow, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $ReplyUrls, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsDisabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $AllowGuestsSignIn, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $KnownClientApplications, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $PublisherDomain, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $OrgRestrictions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.AzureAD.Model.ParentalControlSettings] $ParentalControlSettings, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.AzureAD.Model.OptionalClaims] $OptionalClaims, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $Oauth2AllowUrlPathMatching, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential]] $KeyCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $WwwHomepage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $IdentifierUris, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $GroupMembershipClaims, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.OAuth2Permission]] $Oauth2Permissions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $LogoutUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ErrorUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $SamlMetadataUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $IsDeviceOnlyAuthSupported, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PreAuthorizedApplication]] $PreAuthorizedApplications, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $Oauth2RequirePostResponse, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $AllowPassthroughUsers, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.RequiredResourceAccess]] $RequiredResourceAccess, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $PublicClient, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $AvailableToOtherTenants, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $RecordConsentConditions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $AppLogoUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential]] $PasswordCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Homepage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AppRole]] $AppRoles, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.AzureAD.Model.InformationalUrl] $InformationalUrls ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["AddIns"]) { $params["AddIns"] = $PSBoundParameters["AddIns"] } if($null -ne $PSBoundParameters["SignInAudience"]) { $params["SignInAudience"] = $PSBoundParameters["SignInAudience"] } if($null -ne $PSBoundParameters["Oauth2AllowImplicitFlow"]) { $params["Oauth2AllowImplicitFlow"] = $PSBoundParameters["Oauth2AllowImplicitFlow"] } if($null -ne $PSBoundParameters["ReplyUrls"]) { $params["ReplyUrls"] = $PSBoundParameters["ReplyUrls"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if($null -ne $PSBoundParameters["IsDisabled"]) { $params["IsDisabled"] = $PSBoundParameters["IsDisabled"] } if($null -ne $PSBoundParameters["AllowGuestsSignIn"]) { $params["AllowGuestsSignIn"] = $PSBoundParameters["AllowGuestsSignIn"] } if($null -ne $PSBoundParameters["KnownClientApplications"]) { $params["KnownClientApplications"] = $PSBoundParameters["KnownClientApplications"] } if($null -ne $PSBoundParameters["PublisherDomain"]) { $params["PublisherDomain"] = $PSBoundParameters["PublisherDomain"] } if($null -ne $PSBoundParameters["OrgRestrictions"]) { $params["OrgRestrictions"] = $PSBoundParameters["OrgRestrictions"] } if($null -ne $PSBoundParameters["ParentalControlSettings"]) { $params["ParentalControlSettings"] = $PSBoundParameters["ParentalControlSettings"] } if($null -ne $PSBoundParameters["OptionalClaims"]) { $params["OptionalClaims"] = $PSBoundParameters["OptionalClaims"] } if($null -ne $PSBoundParameters["Oauth2AllowUrlPathMatching"]) { $params["Oauth2AllowUrlPathMatching"] = $PSBoundParameters["Oauth2AllowUrlPathMatching"] } if($null -ne $PSBoundParameters["KeyCredentials"]) { $params["KeyCredentials"] = $PSBoundParameters["KeyCredentials"] } if($null -ne $PSBoundParameters["WwwHomepage"]) { $params["WwwHomepage"] = $PSBoundParameters["WwwHomepage"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["IdentifierUris"]) { $params["IdentifierUris"] = $PSBoundParameters["IdentifierUris"] } if($null -ne $PSBoundParameters["GroupMembershipClaims"]) { $params["GroupMembershipClaims"] = $PSBoundParameters["GroupMembershipClaims"] } if($null -ne $PSBoundParameters["Oauth2Permissions"]) { $params["Oauth2Permissions"] = $PSBoundParameters["Oauth2Permissions"] } if($null -ne $PSBoundParameters["LogoutUrl"]) { $params["LogoutUrl"] = $PSBoundParameters["LogoutUrl"] } if($null -ne $PSBoundParameters["ErrorUrl"]) { $params["ErrorUrl"] = $PSBoundParameters["ErrorUrl"] } if($null -ne $PSBoundParameters["SamlMetadataUrl"]) { $params["SamlMetadataUrl"] = $PSBoundParameters["SamlMetadataUrl"] } if($null -ne $PSBoundParameters["IsDeviceOnlyAuthSupported"]) { $params["IsDeviceOnlyAuthSupported"] = $PSBoundParameters["IsDeviceOnlyAuthSupported"] } if($null -ne $PSBoundParameters["PreAuthorizedApplications"]) { $params["PreAuthorizedApplications"] = $PSBoundParameters["PreAuthorizedApplications"] } if($null -ne $PSBoundParameters["Oauth2RequirePostResponse"]) { $params["Oauth2RequirePostResponse"] = $PSBoundParameters["Oauth2RequirePostResponse"] } if($null -ne $PSBoundParameters["AllowPassthroughUsers"]) { $params["AllowPassthroughUsers"] = $PSBoundParameters["AllowPassthroughUsers"] } if($null -ne $PSBoundParameters["RequiredResourceAccess"]) { $params["RequiredResourceAccess"] = $PSBoundParameters["RequiredResourceAccess"] } if($null -ne $PSBoundParameters["PublicClient"]) { $params["PublicClient"] = $PSBoundParameters["PublicClient"] } if($null -ne $PSBoundParameters["AvailableToOtherTenants"]) { $params["AvailableToOtherTenants"] = $PSBoundParameters["AvailableToOtherTenants"] } if($null -ne $PSBoundParameters["RecordConsentConditions"]) { $params["RecordConsentConditions"] = $PSBoundParameters["RecordConsentConditions"] } if($null -ne $PSBoundParameters["AppLogoUrl"]) { $params["AppLogoUrl"] = $PSBoundParameters["AppLogoUrl"] } if($null -ne $PSBoundParameters["PasswordCredentials"]) { $params["PasswordCredentials"] = $PSBoundParameters["PasswordCredentials"] } if($null -ne $PSBoundParameters["Homepage"]) { $params["Homepage"] = $PSBoundParameters["Homepage"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["AppRoles"]) { $params["AppRoles"] = $PSBoundParameters["AppRoles"] } if($null -ne $PSBoundParameters["InformationalUrls"]) { $params["InformationalUrls"] = $PSBoundParameters["InformationalUrls"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgApplication @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADDevice { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $SearchString, [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{SearchString = "Filter"; ObjectId = "Id"} if($null -ne $PSBoundParameters["SearchString"]) { $TmpValue = $PSBoundParameters["SearchString"] $Value = "displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')" $params["Filter"] = $Value } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DeviceId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDevice @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADUser { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $SearchString, [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{SearchString = "Filter"; ObjectId = "Id"} if($null -ne $PSBoundParameters["SearchString"]) { $TmpValue = $PSBoundParameters["SearchString"] $Value = "userPrincipalName eq '$TmpValue' or (state eq '$TmpValue' or (mailNickName eq '$TmpValue' or (mail eq '$TmpValue' or (jobTitle eq '$TmpValue' or (displayName eq '$TmpValue' or (startswith(displayName,'$TmpValue') or (department eq '$TmpValue' or (country eq '$TmpValue' or city eq '$TmpValue'))))))))" $params["Filter"] = $Value } if($null -ne $PSBoundParameters["ObjectId"]) { $params["UserId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUser @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function New-CompatADServicePrincipalPasswordCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.DateTime]] $EndDate, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Value, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.DateTime]] $StartDate, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $CustomKeyIdentifier ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["EndDate"]) { $params["EndDate"] = $PSBoundParameters["EndDate"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Value"]) { $params["Value"] = $PSBoundParameters["Value"] } if($null -ne $PSBoundParameters["StartDate"]) { $params["StartDate"] = $PSBoundParameters["StartDate"] } if($null -ne $PSBoundParameters["CustomKeyIdentifier"]) { $params["CustomKeyIdentifier"] = $PSBoundParameters["CustomKeyIdentifier"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Add-MgServicePrincipalPassword @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADMSApplicationExtensionProperty { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgApplicationExtensionProperty @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADMSGroupLifecyclePolicy { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["GroupLifecyclePolicyId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgGroupLifecyclePolicy @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADCurrentSessionInfo { [CmdletBinding(DefaultParameterSetName = '')] param ( ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Confirm"]) { $params["Confirm"] = $PSBoundParameters["Confirm"] } if($null -ne $PSBoundParameters["WhatIf"]) { $params["WhatIf"] = $PSBoundParameters["WhatIf"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgContext @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADMSGroup { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $SearchString, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{SearchString = "Filter"} if($null -ne $PSBoundParameters["Id"]) { $params["GroupId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($null -ne $PSBoundParameters["SearchString"]) { $TmpValue = $PSBoundParameters["SearchString"] $Value = "mailNickName eq '$TmpValue' or (mail eq '$TmpValue' or (displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')))" $params["Filter"] = $Value } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgGroup @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADDeviceRegisteredOwner { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DeviceId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDeviceRegisteredOwner @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADMSNamedLocationPolicy { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $PolicyId ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["PolicyId"]) { $params["PolicyId"] = $PSBoundParameters["PolicyId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgIdentityConditionalAccessNamedLocation @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function New-CompatADMSAdministrativeUnit { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $DisplayName ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Description"]) { $params["Description"] = $PSBoundParameters["Description"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgDirectoryAdministrativeUnit @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADDeletedApplication { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgDirectoryDeletedItem @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Select-CompatADGroupIdsContactIsMemberOf { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["GroupIdsForMembershipCheck"]) { $params["GroupIdsForMembershipCheck"] = $PSBoundParameters["GroupIdsForMembershipCheck"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgContactMemberOf @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Add-CompatADMSAdministrativeUnitMember { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $RefObjectId ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["AdministrativeUnitId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["RefObjectId"]) { $params["RefObjectId"] = $PSBoundParameters["RefObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgDirectoryAdministrativeUnitMemberByRef @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADServicePrincipalPasswordCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $KeyId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["ObjectId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["KeyId"]) { $params["KeyId"] = $PSBoundParameters["KeyId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgServicePrincipalPassword @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADObjectByObjectId { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $Types, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.Collections.Generic.List`1[System.String]] $ObjectIds ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Types"]) { $params["Types"] = $PSBoundParameters["Types"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectIds"]) { $params["ObjectIds"] = $PSBoundParameters["ObjectIds"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDirectoryObjectById @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADContact { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["OrgContactId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgContact @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADServiceAppRoleAssignedTo { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["AppRoleAssignmentId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgServicePrincipalAppRoleAssignedTo @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADDeviceRegisteredOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $OwnerId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{OwnerId = "DirectoryObjectId"; ObjectId = "Id"} if($null -ne $PSBoundParameters["OwnerId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DeviceId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgDeviceRegisteredOwnerByRef @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function New-CompatADMSPermissionGrantPolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Id ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Description"]) { $params["Description"] = $PSBoundParameters["Description"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["Id"] = $PSBoundParameters["Id"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgPolicyPermissionGrantPolicy @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Set-CompatADServicePrincipal { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $AccountEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $Tags, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $AlternativeNames, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $AppId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ErrorUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential]] $KeyCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $ReplyUrls, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $LogoutUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $SamlMetadataUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ServicePrincipalType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Homepage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $AppRoleAssignmentRequired, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential]] $PasswordCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $PublisherName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $ServicePrincipalNames ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["AccountEnabled"]) { $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] } if($null -ne $PSBoundParameters["Tags"]) { $params["Tags"] = $PSBoundParameters["Tags"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if($null -ne $PSBoundParameters["AlternativeNames"]) { $params["AlternativeNames"] = $PSBoundParameters["AlternativeNames"] } if($null -ne $PSBoundParameters["AppId"]) { $params["AppId"] = $PSBoundParameters["AppId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["ErrorUrl"]) { $params["ErrorUrl"] = $PSBoundParameters["ErrorUrl"] } if($null -ne $PSBoundParameters["KeyCredentials"]) { $params["KeyCredentials"] = $PSBoundParameters["KeyCredentials"] } if($null -ne $PSBoundParameters["ReplyUrls"]) { $params["ReplyUrls"] = $PSBoundParameters["ReplyUrls"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["LogoutUrl"]) { $params["LogoutUrl"] = $PSBoundParameters["LogoutUrl"] } if($null -ne $PSBoundParameters["SamlMetadataUrl"]) { $params["SamlMetadataUrl"] = $PSBoundParameters["SamlMetadataUrl"] } if($null -ne $PSBoundParameters["ServicePrincipalType"]) { $params["ServicePrincipalType"] = $PSBoundParameters["ServicePrincipalType"] } if($null -ne $PSBoundParameters["Homepage"]) { $params["Homepage"] = $PSBoundParameters["Homepage"] } if($null -ne $PSBoundParameters["AppRoleAssignmentRequired"]) { $params["AppRoleAssignmentRequired"] = $PSBoundParameters["AppRoleAssignmentRequired"] } if($null -ne $PSBoundParameters["PasswordCredentials"]) { $params["PasswordCredentials"] = $PSBoundParameters["PasswordCredentials"] } if($null -ne $PSBoundParameters["PublisherName"]) { $params["PublisherName"] = $PSBoundParameters["PublisherName"] } if($null -ne $PSBoundParameters["ServicePrincipalNames"]) { $params["ServicePrincipalNames"] = $PSBoundParameters["ServicePrincipalNames"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Update-MgServicePrincipal @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADServicePrincipalPasswordCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) (MgServicePrincipal ServicePrincipalId $PSBoundParameters["ObjectId"]).PasswordCredentials } function Get-CompatADDirectoryRoleMember { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryRoleId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDirectoryRoleMember @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function New-CompatADMSGroupLifecyclePolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $AlternateNotificationEmails, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $ManagedGroupTypes, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.Nullable`1[System.Int32]] $GroupLifetimeInDays ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["AlternateNotificationEmails"]) { $params["AlternateNotificationEmails"] = $PSBoundParameters["AlternateNotificationEmails"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ManagedGroupTypes"]) { $params["ManagedGroupTypes"] = $PSBoundParameters["ManagedGroupTypes"] } if($null -ne $PSBoundParameters["GroupLifetimeInDays"]) { $params["GroupLifetimeInDays"] = $PSBoundParameters["GroupLifetimeInDays"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgGroupLifecyclePolicy @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADMSScopedRoleMembership { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ScopedRoleMembershipId ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["Id"]) { $params["ScopedRoleMembershipId"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["ScopedRoleMembershipId"]) { $params["ScopedRoleMembershipId"] = $PSBoundParameters["ScopedRoleMembershipId"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgUserScopedRoleMemberOf @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function New-CompatADMSConditionalAccessPolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls] $SessionControls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $State, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls] $GrantControls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet] $Conditions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["Id"]) { $params["Id"] = $PSBoundParameters["Id"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["SessionControls"]) { $params["SessionControls"] = $PSBoundParameters["SessionControls"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["State"]) { $params["State"] = $PSBoundParameters["State"] } if($null -ne $PSBoundParameters["GrantControls"]) { $params["GrantControls"] = $PSBoundParameters["GrantControls"] } if($null -ne $PSBoundParameters["Conditions"]) { $params["Conditions"] = $PSBoundParameters["Conditions"] } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgIdentityConditionalAccessPolicy @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADUserManager { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["UserId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgUserManagerByRef @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function New-CompatADServicePrincipal { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $AccountEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $Tags, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $AlternativeNames, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)][System.String] $AppId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ErrorUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential]] $KeyCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $ReplyUrls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $LogoutUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $SamlMetadataUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $ServicePrincipalType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $Homepage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Nullable`1[System.Boolean]] $AppRoleAssignmentRequired, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential]] $PasswordCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $PublisherName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.Collections.Generic.List`1[System.String]] $ServicePrincipalNames ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["AccountEnabled"]) { $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] } if($null -ne $PSBoundParameters["Tags"]) { $params["Tags"] = $PSBoundParameters["Tags"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if($null -ne $PSBoundParameters["AlternativeNames"]) { $params["AlternativeNames"] = $PSBoundParameters["AlternativeNames"] } if($null -ne $PSBoundParameters["AppId"]) { $params["AppId"] = $PSBoundParameters["AppId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["ErrorUrl"]) { $params["ErrorUrl"] = $PSBoundParameters["ErrorUrl"] } if($null -ne $PSBoundParameters["KeyCredentials"]) { $params["KeyCredentials"] = $PSBoundParameters["KeyCredentials"] } if($null -ne $PSBoundParameters["ReplyUrls"]) { $params["ReplyUrls"] = $PSBoundParameters["ReplyUrls"] } if($null -ne $PSBoundParameters["LogoutUrl"]) { $params["LogoutUrl"] = $PSBoundParameters["LogoutUrl"] } if($null -ne $PSBoundParameters["SamlMetadataUrl"]) { $params["SamlMetadataUrl"] = $PSBoundParameters["SamlMetadataUrl"] } if($null -ne $PSBoundParameters["ServicePrincipalType"]) { $params["ServicePrincipalType"] = $PSBoundParameters["ServicePrincipalType"] } if($null -ne $PSBoundParameters["Homepage"]) { $params["Homepage"] = $PSBoundParameters["Homepage"] } if($null -ne $PSBoundParameters["AppRoleAssignmentRequired"]) { $params["AppRoleAssignmentRequired"] = $PSBoundParameters["AppRoleAssignmentRequired"] } if($null -ne $PSBoundParameters["PasswordCredentials"]) { $params["PasswordCredentials"] = $PSBoundParameters["PasswordCredentials"] } if($null -ne $PSBoundParameters["PublisherName"]) { $params["PublisherName"] = $PSBoundParameters["PublisherName"] } if($null -ne $PSBoundParameters["ServicePrincipalNames"]) { $params["ServicePrincipalNames"] = $PSBoundParameters["ServicePrincipalNames"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgServicePrincipal @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADDirectoryRole { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryRoleId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDirectoryRole @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADServicePrincipal { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $SearchString, [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{SearchString = "Filter"; ObjectId = "Id"} if($null -ne $PSBoundParameters["SearchString"]) { $TmpValue = $PSBoundParameters["SearchString"] $Value = "publisherName eq '$TmpValue' or (displayName eq '$TmpValue' or startswith(displayName,'$TmpValue'))" $params["Filter"] = $Value } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgServicePrincipal @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Set-CompatADUserManager { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $RefObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} 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 Remove-CompatADMSApplicationOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $OwnerId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{OwnerId = "DirectoryObjectId"; ObjectId = "Id"} if($null -ne $PSBoundParameters["OwnerId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgApplicationOwnerByRef @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function New-CompatADApplicationKeyCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[Microsoft.Open.AzureAD.Graph.PowerShell.Custom.KeyUsage]] $Usage, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[Microsoft.Open.AzureAD.Graph.PowerShell.Custom.KeyType]] $Type, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.DateTime]] $EndDate, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Value, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.DateTime]] $StartDate, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $CustomKeyIdentifier ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($null -ne $PSBoundParameters["Usage"]) { $params["Usage"] = $PSBoundParameters["Usage"] } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } if($null -ne $PSBoundParameters["Type"]) { $params["Type"] = $PSBoundParameters["Type"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["EndDate"]) { $params["EndDate"] = $PSBoundParameters["EndDate"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Value"]) { $params["Value"] = $PSBoundParameters["Value"] } if($null -ne $PSBoundParameters["StartDate"]) { $params["StartDate"] = $PSBoundParameters["StartDate"] } if($null -ne $PSBoundParameters["CustomKeyIdentifier"]) { $params["CustomKeyIdentifier"] = $PSBoundParameters["CustomKeyIdentifier"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Add-MgApplicationKey @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Enable-CompatADDirectoryRole { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")][System.String] $RoleTemplateId ) PROCESS { $params = @{} $keysChanged = @{} if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["RoleTemplateId"]) { $params["RoleTemplateId"] = $PSBoundParameters["RoleTemplateId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = New-MgDirectoryRole @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Get-CompatADMSAdministrativeUnit { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Filter, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Boolean]] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Nullable`1[System.Int32]] $Top ) PROCESS { $params = @{} $keysChanged = @{} if($null -ne $PSBoundParameters["Id"]) { $params["AdministrativeUnitId"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] foreach($i in $keysChanged.GetEnumerator()){ $TmpValue = $TmpValue.Replace($i.Key, $i.Value) } $Value = $TmpValue $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) { $params["All"] = $Null } } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } if($null -ne $PSBoundParameters["Top"]) { $params["Top"] = $PSBoundParameters["Top"] } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgDirectoryAdministrativeUnit @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function Remove-CompatADServicePrincipal { [CmdletBinding(DefaultParameterSetName = '')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $ObjectId ) PROCESS { $params = @{} $keysChanged = @{ObjectId = "Id"} if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $Null } if($null -ne $PSBoundParameters["ObjectId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $Null } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Remove-MgServicePrincipal @params $response | ForEach-Object { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } $response } } function 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-AzureADApplicationServiceEndpoint -Value Get-CompatADApplicationServiceEndpoint -Scope Global -Force Set-Alias -Name Get-AzureADMSGroupPermissionGrant -Value Get-CompatADMSGroupPermissionGrant -Scope Global -Force Set-Alias -Name Set-AzureADMSIdentityProvider -Value Set-CompatADMSIdentityProvider -Scope Global -Force Set-Alias -Name Add-AzureADGroupOwner -Value Add-CompatADGroupOwner -Scope Global -Force Set-Alias -Name 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 New-AzureADMSRoleAssignment -Value New-CompatADMSRoleAssignment -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 Get-AzureADMSAuthorizationPolicy -Value Get-CompatADMSAuthorizationPolicy -Scope Global -Force Set-Alias -Name Select-AzureADGroupIdsServicePrincipalIsMemberOf -Value Select-CompatADGroupIdsServicePrincipalIsMemberOf -Scope Global -Force Set-Alias -Name Set-AzureADGroup -Value Set-CompatADGroup -Scope Global -Force Set-Alias -Name Set-AzureADApplicationLogo -Value Set-CompatADApplicationLogo -Scope Global -Force Set-Alias -Name Get-AzureADContactDirectReport -Value Get-CompatADContactDirectReport -Scope Global -Force Set-Alias -Name Add-AzureADGroupMember -Value Add-CompatADGroupMember -Scope Global -Force Set-Alias -Name Remove-AzureADMSConditionalAccessPolicy -Value Remove-CompatADMSConditionalAccessPolicy -Scope Global -Force Set-Alias -Name Add-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Add-CompatADMSServicePrincipalDelegatedPermissionClassification -Scope Global -Force Set-Alias -Name Remove-AzureADServiceAppRoleAssignment -Value Remove-CompatADServiceAppRoleAssignment -Scope Global -Force Set-Alias -Name Get-AzureADDomainNameReference -Value Get-CompatADDomainNameReference -Scope Global -Force Set-Alias -Name Set-AzureADMSConditionalAccessPolicy -Value Set-CompatADMSConditionalAccessPolicy -Scope Global -Force Set-Alias -Name Remove-AzureADMSAdministrativeUnitMember -Value Remove-CompatADMSAdministrativeUnitMember -Scope Global -Force Set-Alias -Name Get-AzureADUserOAuth2PermissionGrant -Value Get-CompatADUserOAuth2PermissionGrant -Scope Global -Force Set-Alias -Name Get-AzureADOAuth2PermissionGrant -Value Get-CompatADOAuth2PermissionGrant -Scope Global -Force Set-Alias -Name New-AzureADMSIdentityProvider -Value New-CompatADMSIdentityProvider -Scope Global -Force Set-Alias -Name Remove-AzureADMSDeletedDirectoryObject -Value Remove-CompatADMSDeletedDirectoryObject -Scope Global -Force Set-Alias -Name Get-AzureADContactMembership -Value Get-CompatADContactMembership -Scope Global -Force Set-Alias -Name New-AzureADGroup -Value New-CompatADGroup -Scope Global -Force Set-Alias -Name New-AzureADMSNamedLocationPolicy -Value New-CompatADMSNamedLocationPolicy -Scope Global -Force Set-Alias -Name Confirm-AzureADDomain -Value Confirm-CompatADDomain -Scope Global -Force Set-Alias -Name Remove-AzureADServicePrincipalOwner -Value Remove-CompatADServicePrincipalOwner -Scope Global -Force Set-Alias -Name Remove-AzureADUserAppRoleAssignment -Value Remove-CompatADUserAppRoleAssignment -Scope Global -Force Set-Alias -Name Remove-AzureADMSRoleAssignment -Value Remove-CompatADMSRoleAssignment -Scope Global -Force Set-Alias -Name Remove-AzureADMSIdentityProvider -Value Remove-CompatADMSIdentityProvider -Scope Global -Force Set-Alias -Name Get-AzureADDeletedApplication -Value Get-CompatADDeletedApplication -Scope Global -Force Set-Alias -Name Get-AzureADExtensionProperty -Value Get-CompatADExtensionProperty -Scope Global -Force Set-Alias -Name Select-AzureADGroupIdsGroupIsMemberOf -Value Select-CompatADGroupIdsGroupIsMemberOf -Scope Global -Force Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Set-CompatADMSAdministrativeUnit -Scope Global -Force Set-Alias -Name Set-AzureADMSGroup -Value Set-CompatADMSGroup -Scope Global -Force Set-Alias -Name Add-AzureADMSLifecyclePolicyGroup -Value Add-CompatADMSLifecyclePolicyGroup -Scope Global -Force Set-Alias -Name Get-AzureADUserAppRoleAssignment -Value Get-CompatADUserAppRoleAssignment -Scope Global -Force Set-Alias -Name Remove-AzureADMSAdministrativeUnit -Value Remove-CompatADMSAdministrativeUnit -Scope Global -Force Set-Alias -Name Get-AzureADMSDeletedGroup -Value Get-CompatADMSDeletedGroup -Scope Global -Force Set-Alias -Name Set-AzureADMSAuthorizationPolicy -Value Set-CompatADMSAuthorizationPolicy -Scope Global -Force Set-Alias -Name Remove-AzureADGroupOwner -Value Remove-CompatADGroupOwner -Scope Global -Force Set-Alias -Name Remove-AzureADMSRoleDefinition -Value Remove-CompatADMSRoleDefinition -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationPasswordCredential -Value Remove-CompatADApplicationPasswordCredential -Scope Global -Force Set-Alias -Name Get-AzureADServicePrincipalOwnedObject -Value Get-CompatADServicePrincipalOwnedObject -Scope Global -Force Set-Alias -Name Get-AzureADMSRoleAssignment -Value Get-CompatADMSRoleAssignment -Scope Global -Force Set-Alias -Name Get-AzureADUserOwnedObject -Value Get-CompatADUserOwnedObject -Scope Global -Force Set-Alias -Name Remove-AzureADMSLifecyclePolicyGroup -Value Remove-CompatADMSLifecyclePolicyGroup -Scope Global -Force Set-Alias -Name Remove-AzureADDomain -Value Remove-CompatADDomain -Scope Global -Force Set-Alias -Name Get-AzureADContact -Value Get-CompatADContact -Scope Global -Force Set-Alias -Name Set-AzureADMSGroupLifecyclePolicy -Value Set-CompatADMSGroupLifecyclePolicy -Scope Global -Force Set-Alias -Name Get-AzureADGroupAppRoleAssignment -Value Get-CompatADGroupAppRoleAssignment -Scope Global -Force Set-Alias -Name Get-AzureADMSApplication -Value Get-CompatADMSApplication -Scope Global -Force Set-Alias -Name Set-AzureADApplication -Value Set-CompatADApplication -Scope Global -Force Set-Alias -Name Get-AzureADMSRoleDefinition -Value Get-CompatADMSRoleDefinition -Scope Global -Force Set-Alias -Name Remove-AzureADGroupMember -Value Remove-CompatADGroupMember -Scope Global -Force Set-Alias -Name Get-AzureADServicePrincipalCreatedObject -Value Get-CompatADServicePrincipalCreatedObject -Scope Global -Force Set-Alias -Name Get-AzureADApplicationKeyCredential -Value Get-CompatADApplicationKeyCredential -Scope Global -Force Set-Alias -Name Get-AzureADServicePrincipalOwner -Value Get-CompatADServicePrincipalOwner -Scope Global -Force Set-Alias -Name Get-AzureADUserThumbnailPhoto -Value Get-CompatADUserThumbnailPhoto -Scope Global -Force Set-Alias -Name Get-AzureADServicePrincipalKeyCredential -Value Get-CompatADServicePrincipalKeyCredential -Scope Global -Force Set-Alias -Name Remove-AzureADDevice -Value Remove-CompatADDevice -Scope Global -Force Set-Alias -Name Get-AzureADUserExtension -Value Get-CompatADUserExtension -Scope Global -Force Set-Alias -Name Get-AzureADUserCreatedObject -Value Get-CompatADUserCreatedObject -Scope Global -Force Set-Alias -Name Set-AzureADMSNamedLocationPolicy -Value Set-CompatADMSNamedLocationPolicy -Scope Global -Force Set-Alias -Name Set-AzureADMSRoleDefinition -Value Set-CompatADMSRoleDefinition -Scope Global -Force Set-Alias -Name Get-AzureADContactManager -Value Get-CompatADContactManager -Scope Global -Force Set-Alias -Name Get-AzureADApplicationOwner -Value Get-CompatADApplicationOwner -Scope Global -Force Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-CompatADDeviceConfiguration -Scope Global -Force Set-Alias -Name Remove-AzureADMSScopedRoleMembership -Value Remove-CompatADMSScopedRoleMembership -Scope Global -Force Set-Alias -Name Remove-AzureADMSApplication -Value Remove-CompatADMSApplication -Scope Global -Force Set-Alias -Name Set-AzureADUserExtension -Value Set-CompatADUserExtension -Scope Global -Force Set-Alias -Name Get-AzureADMSLifecyclePolicyGroup -Value Get-CompatADMSLifecyclePolicyGroup -Scope Global -Force Set-Alias -Name Get-AzureADUserManager -Value Get-CompatADUserManager -Scope Global -Force Set-Alias -Name New-AzureADServiceAppRoleAssignment -Value New-CompatADServiceAppRoleAssignment -Scope Global -Force Set-Alias -Name Add-AzureADApplicationOwner -Value Add-CompatADApplicationOwner -Scope Global -Force Set-Alias -Name Remove-AzureADMSGroup -Value Remove-CompatADMSGroup -Scope Global -Force Set-Alias -Name Remove-AzureADApplication -Value Remove-CompatADApplication -Scope Global -Force Set-Alias -Name New-AzureADGroupAppRoleAssignment -Value New-CompatADGroupAppRoleAssignment -Scope Global -Force Set-Alias -Name Remove-AzureADOAuth2PermissionGrant -Value Remove-CompatADOAuth2PermissionGrant -Scope Global -Force Set-Alias -Name Get-AzureADUserOwnedDevice -Value Get-CompatADUserOwnedDevice -Scope Global -Force Set-Alias -Name Remove-AzureADGroup -Value Remove-CompatADGroup -Scope Global -Force Set-Alias -Name Set-AzureADUserLicense -Value Set-CompatADUserLicense -Scope Global -Force Set-Alias -Name Remove-AzureADMSApplicationVerifiedPublisher -Value Remove-CompatADMSApplicationVerifiedPublisher -Scope Global -Force Set-Alias -Name Remove-AzureADUserExtension -Value Remove-CompatADUserExtension -Scope Global -Force Set-Alias -Name New-AzureADMSApplicationKey -Value New-CompatADMSApplicationKey -Scope Global -Force Set-Alias -Name Get-AzureADServicePrincipalMembership -Value Get-CompatADServicePrincipalMembership -Scope Global -Force Set-Alias -Name New-AzureADMSApplicationPassword -Value New-CompatADMSApplicationPassword -Scope Global -Force Set-Alias -Name Get-AzureADDomainVerificationDnsRecord -Value Get-CompatADDomainVerificationDnsRecord -Scope Global -Force Set-Alias -Name Remove-AzureADGroupAppRoleAssignment -Value Remove-CompatADGroupAppRoleAssignment -Scope Global -Force Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-CompatADApplicationPasswordCredential -Scope Global -Force Set-Alias -Name New-AzureADDevice -Value New-CompatADDevice -Scope Global -Force Set-Alias -Name Get-AzureADDirectoryRoleTemplate -Value Get-CompatADDirectoryRoleTemplate -Scope Global -Force Set-Alias -Name Set-AzureADUserPassword -Value Set-CompatADUserPassword -Scope Global -Force Set-Alias -Name Get-AzureADGroupOwner -Value Get-CompatADGroupOwner -Scope Global -Force Set-Alias -Name Get-AzureADMSPermissionGrantPolicy -Value Get-CompatADMSPermissionGrantPolicy -Scope Global -Force Set-Alias -Name Remove-AzureADMSApplicationExtensionProperty -Value Remove-CompatADMSApplicationExtensionProperty -Scope Global -Force Set-Alias -Name New-AzureADMSApplicationExtensionProperty -Value New-CompatADMSApplicationExtensionProperty -Scope Global -Force Set-Alias -Name Get-AzureADDomainServiceConfigurationRecord -Value Get-CompatADDomainServiceConfigurationRecord -Scope Global -Force Set-Alias -Name Remove-AzureADMSPermissionGrantPolicy -Value Remove-CompatADMSPermissionGrantPolicy -Scope Global -Force Set-Alias -Name Get-AzureADMSConditionalAccessPolicy -Value Get-CompatADMSConditionalAccessPolicy -Scope Global -Force Set-Alias -Name Get-AzureADUserRegisteredDevice -Value Get-CompatADUserRegisteredDevice -Scope Global -Force Set-Alias -Name Get-AzureADContract -Value Get-CompatADContract -Scope Global -Force Set-Alias -Name Set-AzureADMSApplicationLogo -Value Set-CompatADMSApplicationLogo -Scope Global -Force Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Add-CompatADMSScopedRoleMembership -Scope Global -Force Set-Alias -Name New-AzureADMSRoleDefinition -Value New-CompatADMSRoleDefinition -Scope Global -Force Set-Alias -Name Set-AzureADUser -Value Set-CompatADUser -Scope Global -Force Set-Alias -Name Get-AzureADUserDirectReport -Value Get-CompatADUserDirectReport -Scope Global -Force Set-Alias -Name Remove-AzureADDirectoryRoleMember -Value Remove-CompatADDirectoryRoleMember -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationOwner -Value Remove-CompatADApplicationOwner -Scope Global -Force Set-Alias -Name Set-AzureADDomain -Value Set-CompatADDomain -Scope Global -Force Set-Alias -Name Remove-AzureADMSNamedLocationPolicy -Value Remove-CompatADMSNamedLocationPolicy -Scope Global -Force Set-Alias -Name Set-AzureADMSApplication -Value Set-CompatADMSApplication -Scope Global -Force Set-Alias -Name Get-AzureADMSApplicationOwner -Value Get-CompatADMSApplicationOwner -Scope Global -Force Set-Alias -Name New-AzureADApplication -Value New-CompatADApplication -Scope Global -Force Set-Alias -Name Get-AzureADDevice -Value Get-CompatADDevice -Scope Global -Force Set-Alias -Name Get-AzureADUser -Value Get-CompatADUser -Scope Global -Force Set-Alias -Name New-AzureADServicePrincipalPasswordCredential -Value New-CompatADServicePrincipalPasswordCredential -Scope Global -Force Set-Alias -Name Get-AzureADMSApplicationExtensionProperty -Value Get-CompatADMSApplicationExtensionProperty -Scope Global -Force Set-Alias -Name Get-AzureADMSGroupLifecyclePolicy -Value Get-CompatADMSGroupLifecyclePolicy -Scope Global -Force Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-CompatADCurrentSessionInfo -Scope Global -Force Set-Alias -Name Get-AzureADMSGroup -Value Get-CompatADMSGroup -Scope Global -Force Set-Alias -Name Get-AzureADDeviceRegisteredOwner -Value Get-CompatADDeviceRegisteredOwner -Scope Global -Force Set-Alias -Name Get-AzureADMSNamedLocationPolicy -Value Get-CompatADMSNamedLocationPolicy -Scope Global -Force Set-Alias -Name New-AzureADMSAdministrativeUnit -Value New-CompatADMSAdministrativeUnit -Scope Global -Force Set-Alias -Name Remove-AzureADDeletedApplication -Value Remove-CompatADDeletedApplication -Scope Global -Force Set-Alias -Name Select-AzureADGroupIdsContactIsMemberOf -Value Select-CompatADGroupIdsContactIsMemberOf -Scope Global -Force Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Add-CompatADMSAdministrativeUnitMember -Scope Global -Force Set-Alias -Name Remove-AzureADServicePrincipalPasswordCredential -Value Remove-CompatADServicePrincipalPasswordCredential -Scope Global -Force Set-Alias -Name Get-AzureADObjectByObjectId -Value Get-CompatADObjectByObjectId -Scope Global -Force Set-Alias -Name Remove-AzureADContact -Value Remove-CompatADContact -Scope Global -Force Set-Alias -Name Get-AzureADServiceAppRoleAssignedTo -Value Get-CompatADServiceAppRoleAssignedTo -Scope Global -Force Set-Alias -Name Remove-AzureADDeviceRegisteredOwner -Value Remove-CompatADDeviceRegisteredOwner -Scope Global -Force Set-Alias -Name New-AzureADMSPermissionGrantPolicy -Value New-CompatADMSPermissionGrantPolicy -Scope Global -Force Set-Alias -Name Set-AzureADServicePrincipal -Value Set-CompatADServicePrincipal -Scope Global -Force Set-Alias -Name Get-AzureADServicePrincipalPasswordCredential -Value Get-CompatADServicePrincipalPasswordCredential -Scope Global -Force Set-Alias -Name Get-AzureADDirectoryRoleMember -Value Get-CompatADDirectoryRoleMember -Scope Global -Force Set-Alias -Name New-AzureADMSGroupLifecyclePolicy -Value New-CompatADMSGroupLifecyclePolicy -Scope Global -Force Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-CompatADMSScopedRoleMembership -Scope Global -Force Set-Alias -Name New-AzureADMSConditionalAccessPolicy -Value New-CompatADMSConditionalAccessPolicy -Scope Global -Force Set-Alias -Name Remove-AzureADUserManager -Value Remove-CompatADUserManager -Scope Global -Force Set-Alias -Name New-AzureADServicePrincipal -Value New-CompatADServicePrincipal -Scope Global -Force Set-Alias -Name Get-AzureADDirectoryRole -Value Get-CompatADDirectoryRole -Scope Global -Force Set-Alias -Name Get-AzureADServicePrincipal -Value Get-CompatADServicePrincipal -Scope Global -Force Set-Alias -Name Set-AzureADUserManager -Value Set-CompatADUserManager -Scope Global -Force Set-Alias -Name Set-AzureADTenantDetail -Value Set-CompatADTenantDetail -Scope Global -Force Set-Alias -Name New-AzureADApplicationExtensionProperty -Value New-CompatADApplicationExtensionProperty -Scope Global -Force Set-Alias -Name New-AzureADUserAppRoleAssignment -Value New-CompatADUserAppRoleAssignment -Scope Global -Force Set-Alias -Name Get-AzureADMSDeletedDirectoryObject -Value Get-CompatADMSDeletedDirectoryObject -Scope Global -Force Set-Alias -Name Get-AzureADApplicationLogo -Value Get-CompatADApplicationLogo -Scope Global -Force Set-Alias -Name Set-AzureADDevice -Value Set-CompatADDevice -Scope Global -Force Set-Alias -Name Set-AzureADMSPermissionGrantPolicy -Value Set-CompatADMSPermissionGrantPolicy -Scope Global -Force Set-Alias -Name New-AzureADMSApplication -Value New-CompatADMSApplication -Scope Global -Force Set-Alias -Name Get-AzureADSubscribedSku -Value Get-CompatADSubscribedSku -Scope Global -Force Set-Alias -Name Remove-AzureADMSApplicationPassword -Value Remove-CompatADMSApplicationPassword -Scope Global -Force Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-CompatADMSAdministrativeUnitMember -Scope Global -Force Set-Alias -Name Get-AzureADUserMembership -Value Get-CompatADUserMembership -Scope Global -Force Set-Alias -Name Remove-AzureADMSApplicationOwner -Value Remove-CompatADMSApplicationOwner -Scope Global -Force Set-Alias -Name New-AzureADApplicationKeyCredential -Value New-CompatADApplicationKeyCredential -Scope Global -Force Set-Alias -Name Enable-AzureADDirectoryRole -Value Enable-CompatADDirectoryRole -Scope Global -Force Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-CompatADMSAdministrativeUnit -Scope Global -Force Set-Alias -Name Remove-AzureADServicePrincipal -Value Remove-CompatADServicePrincipal -Scope Global -Force Set-Alias -Name 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-CompatADApplicationServiceEndpoint','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','New-CompatADMSRoleAssignment','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','Get-CompatADMSAuthorizationPolicy','Select-CompatADGroupIdsServicePrincipalIsMemberOf','Set-CompatADGroup','Set-CompatADApplicationLogo','Get-CompatADContactDirectReport','Add-CompatADGroupMember','Remove-CompatADMSConditionalAccessPolicy','Add-CompatADMSServicePrincipalDelegatedPermissionClassification','Remove-CompatADServiceAppRoleAssignment','Get-CompatADDomainNameReference','Set-CompatADMSConditionalAccessPolicy','Remove-CompatADMSAdministrativeUnitMember','Get-CompatADUserOAuth2PermissionGrant','Get-CompatADOAuth2PermissionGrant','New-CompatADMSIdentityProvider','Remove-CompatADMSDeletedDirectoryObject','Get-CompatADContactMembership','New-CompatADGroup','New-CompatADMSNamedLocationPolicy','Confirm-CompatADDomain','Remove-CompatADServicePrincipalOwner','Remove-CompatADUserAppRoleAssignment','Remove-CompatADMSRoleAssignment','Remove-CompatADMSIdentityProvider','Get-CompatADDeletedApplication','Get-CompatADExtensionProperty','Select-CompatADGroupIdsGroupIsMemberOf','Set-CompatADMSAdministrativeUnit','Set-CompatADMSGroup','Add-CompatADMSLifecyclePolicyGroup','Get-CompatADUserAppRoleAssignment','Remove-CompatADMSAdministrativeUnit','Get-CompatADMSDeletedGroup','Set-CompatADMSAuthorizationPolicy','Remove-CompatADGroupOwner','Remove-CompatADMSRoleDefinition','Remove-CompatADApplicationPasswordCredential','Get-CompatADServicePrincipalOwnedObject','Get-CompatADMSRoleAssignment','Get-CompatADUserOwnedObject','Remove-CompatADMSLifecyclePolicyGroup','Remove-CompatADDomain','Get-CompatADContact','Set-CompatADMSGroupLifecyclePolicy','Get-CompatADGroupAppRoleAssignment','Get-CompatADMSApplication','Set-CompatADApplication','Get-CompatADMSRoleDefinition','Remove-CompatADGroupMember','Get-CompatADServicePrincipalCreatedObject','Get-CompatADApplicationKeyCredential','Get-CompatADServicePrincipalOwner','Get-CompatADUserThumbnailPhoto','Get-CompatADServicePrincipalKeyCredential','Remove-CompatADDevice','Get-CompatADUserExtension','Get-CompatADUserCreatedObject','Set-CompatADMSNamedLocationPolicy','Set-CompatADMSRoleDefinition','Get-CompatADContactManager','Get-CompatADApplicationOwner','Get-CompatADDeviceConfiguration','Remove-CompatADMSScopedRoleMembership','Remove-CompatADMSApplication','Set-CompatADUserExtension','Get-CompatADMSLifecyclePolicyGroup','Get-CompatADUserManager','New-CompatADServiceAppRoleAssignment','Add-CompatADApplicationOwner','Remove-CompatADMSGroup','Remove-CompatADApplication','New-CompatADGroupAppRoleAssignment','Remove-CompatADOAuth2PermissionGrant','Get-CompatADUserOwnedDevice','Remove-CompatADGroup','Set-CompatADUserLicense','Remove-CompatADMSApplicationVerifiedPublisher','Remove-CompatADUserExtension','New-CompatADMSApplicationKey','Get-CompatADServicePrincipalMembership','New-CompatADMSApplicationPassword','Get-CompatADDomainVerificationDnsRecord','Remove-CompatADGroupAppRoleAssignment','Get-CompatADApplicationPasswordCredential','New-CompatADDevice','Get-CompatADDirectoryRoleTemplate','Set-CompatADUserPassword','Get-CompatADGroupOwner','Get-CompatADMSPermissionGrantPolicy','Remove-CompatADMSApplicationExtensionProperty','New-CompatADMSApplicationExtensionProperty','Get-CompatADDomainServiceConfigurationRecord','Remove-CompatADMSPermissionGrantPolicy','Get-CompatADMSConditionalAccessPolicy','Get-CompatADUserRegisteredDevice','Get-CompatADContract','Set-CompatADMSApplicationLogo','Add-CompatADMSScopedRoleMembership','New-CompatADMSRoleDefinition','Set-CompatADUser','Get-CompatADUserDirectReport','Remove-CompatADDirectoryRoleMember','Remove-CompatADApplicationOwner','Set-CompatADDomain','Remove-CompatADMSNamedLocationPolicy','Set-CompatADMSApplication','Get-CompatADMSApplicationOwner','New-CompatADApplication','Get-CompatADDevice','Get-CompatADUser','New-CompatADServicePrincipalPasswordCredential','Get-CompatADMSApplicationExtensionProperty','Get-CompatADMSGroupLifecyclePolicy','Get-CompatADCurrentSessionInfo','Get-CompatADMSGroup','Get-CompatADDeviceRegisteredOwner','Get-CompatADMSNamedLocationPolicy','New-CompatADMSAdministrativeUnit','Remove-CompatADDeletedApplication','Select-CompatADGroupIdsContactIsMemberOf','Add-CompatADMSAdministrativeUnitMember','Remove-CompatADServicePrincipalPasswordCredential','Get-CompatADObjectByObjectId','Remove-CompatADContact','Get-CompatADServiceAppRoleAssignedTo','Remove-CompatADDeviceRegisteredOwner','New-CompatADMSPermissionGrantPolicy','Set-CompatADServicePrincipal','Get-CompatADServicePrincipalPasswordCredential','Get-CompatADDirectoryRoleMember','New-CompatADMSGroupLifecyclePolicy','Get-CompatADMSScopedRoleMembership','New-CompatADMSConditionalAccessPolicy','Remove-CompatADUserManager','New-CompatADServicePrincipal','Get-CompatADDirectoryRole','Get-CompatADServicePrincipal','Set-CompatADUserManager','Set-CompatADTenantDetail','New-CompatADApplicationExtensionProperty','New-CompatADUserAppRoleAssignment','Get-CompatADMSDeletedDirectoryObject','Get-CompatADApplicationLogo','Set-CompatADDevice','Set-CompatADMSPermissionGrantPolicy','New-CompatADMSApplication','Get-CompatADSubscribedSku','Remove-CompatADMSApplicationPassword','Get-CompatADMSAdministrativeUnitMember','Get-CompatADUserMembership','Remove-CompatADMSApplicationOwner','New-CompatADApplicationKeyCredential','Enable-CompatADDirectoryRole','Get-CompatADMSAdministrativeUnit','Remove-CompatADServicePrincipal','New-CompatADMSInvitation','Get-CompatADTenantDetail','New-CompatADApplicationPasswordCredential','Test-CompatADScript','Set-CompatADAlias' ) Set-Variable -name MISSING_CMDS -value @('Revoke-AzureADUserAllRefreshToken','Remove-AzureADTrustedCertificateAuthority','Get-AzureADTrustedCertificateAuthority','Set-AzureADApplicationProxyApplicationSingleSignOn','Set-AzureADApplicationProxyConnector','Revoke-AzureADSignedInUserAllRefreshToken','Get-AzureADApplicationProxyConnectorGroupMember','Remove-AzureADDeviceRegisteredUser','New-AzureADServicePrincipalKeyCredential','Set-AzureADApplicationProxyApplication','Get-AzureADMSPermissionGrantConditionSet','Get-AzureADApplicationProxyApplication','Set-AzureADMSPermissionGrantConditionSet','Add-AzureADDeviceRegisteredUser','Set-AzureADTrustedCertificateAuthority','New-AzureADMSPermissionGrantConditionSet','Get-AzureADApplicationProxyConnectorMemberOf','Set-AzureADApplicationProxyApplicationCustomDomainCertificate','Remove-AzureADApplicationProxyConnectorGroup','Restore-AzureADMSDeletedDirectoryObject','New-AzureADTrustedCertificateAuthority','Get-AzureADContactThumbnailPhoto','Get-AzureADApplicationProxyConnectorGroup','New-AzureADApplicationProxyApplication','Remove-AzureADMSPermissionGrantConditionSet','New-AzureADApplicationProxyConnectorGroup','Get-AzureADApplicationProxyConnector','Set-AzureADApplicationProxyConnectorGroup','Set-AzureADApplicationProxyApplicationConnectorGroup','Remove-AzureADApplicationProxyApplication','Remove-AzureADApplicationProxyApplicationConnectorGroup','Get-AzureADApplicationProxyApplicationConnectorGroup','Remove-AzureADContactManager','Restore-AzureADDeletedApplication') -Scope Global -Option ReadOnly -Force # SIG # Begin signature block # MIInvwYJKoZIhvcNAQcCoIInsDCCJ6wCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDw2SydQ8e1fYZd # hW6FHRoBdoW2C+1agxYZxpF/rT44sKCCDXYwggX0MIID3KADAgECAhMzAAACy7d1 # OfsCcUI2AAAAAALLMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD # VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p # bmcgUENBIDIwMTEwHhcNMjIwNTEyMjA0NTU5WhcNMjMwNTExMjA0NTU5WjB0MQsw # CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u # ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy # b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB # AQC3sN0WcdGpGXPZIb5iNfFB0xZ8rnJvYnxD6Uf2BHXglpbTEfoe+mO//oLWkRxA # wppditsSVOD0oglKbtnh9Wp2DARLcxbGaW4YanOWSB1LyLRpHnnQ5POlh2U5trg4 # 3gQjvlNZlQB3lL+zrPtbNvMA7E0Wkmo+Z6YFnsf7aek+KGzaGboAeFO4uKZjQXY5 # RmMzE70Bwaz7hvA05jDURdRKH0i/1yK96TDuP7JyRFLOvA3UXNWz00R9w7ppMDcN # lXtrmbPigv3xE9FfpfmJRtiOZQKd73K72Wujmj6/Su3+DBTpOq7NgdntW2lJfX3X # a6oe4F9Pk9xRhkwHsk7Ju9E/AgMBAAGjggFzMIIBbzAfBgNVHSUEGDAWBgorBgEE # AYI3TAgBBggrBgEFBQcDAzAdBgNVHQ4EFgQUrg/nt/gj+BBLd1jZWYhok7v5/w4w # RQYDVR0RBD4wPKQ6MDgxHjAcBgNVBAsTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEW # MBQGA1UEBRMNMjMwMDEyKzQ3MDUyODAfBgNVHSMEGDAWgBRIbmTlUAXTgqoXNzci # tW2oynUClTBUBgNVHR8ETTBLMEmgR6BFhkNodHRwOi8vd3d3Lm1pY3Jvc29mdC5j # b20vcGtpb3BzL2NybC9NaWNDb2RTaWdQQ0EyMDExXzIwMTEtMDctMDguY3JsMGEG # CCsGAQUFBwEBBFUwUzBRBggrBgEFBQcwAoZFaHR0cDovL3d3dy5taWNyb3NvZnQu # Y29tL3BraW9wcy9jZXJ0cy9NaWNDb2RTaWdQQ0EyMDExXzIwMTEtMDctMDguY3J0 # MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQELBQADggIBAJL5t6pVjIRlQ8j4dAFJ # ZnMke3rRHeQDOPFxswM47HRvgQa2E1jea2aYiMk1WmdqWnYw1bal4IzRlSVf4czf # zx2vjOIOiaGllW2ByHkfKApngOzJmAQ8F15xSHPRvNMmvpC3PFLvKMf3y5SyPJxh # 922TTq0q5epJv1SgZDWlUlHL/Ex1nX8kzBRhHvc6D6F5la+oAO4A3o/ZC05OOgm4 # EJxZP9MqUi5iid2dw4Jg/HvtDpCcLj1GLIhCDaebKegajCJlMhhxnDXrGFLJfX8j # 7k7LUvrZDsQniJZ3D66K+3SZTLhvwK7dMGVFuUUJUfDifrlCTjKG9mxsPDllfyck # 4zGnRZv8Jw9RgE1zAghnU14L0vVUNOzi/4bE7wIsiRyIcCcVoXRneBA3n/frLXvd # jDsbb2lpGu78+s1zbO5N0bhHWq4j5WMutrspBxEhqG2PSBjC5Ypi+jhtfu3+x76N # mBvsyKuxx9+Hm/ALnlzKxr4KyMR3/z4IRMzA1QyppNk65Ui+jB14g+w4vole33M1 # pVqVckrmSebUkmjnCshCiH12IFgHZF7gRwE4YZrJ7QjxZeoZqHaKsQLRMp653beB # fHfeva9zJPhBSdVcCW7x9q0c2HVPLJHX9YCUU714I+qtLpDGrdbZxD9mikPqL/To # /1lDZ0ch8FtePhME7houuoPcMIIHejCCBWKgAwIBAgIKYQ6Q0gAAAAAAAzANBgkq # hkiG9w0BAQsFADCBiDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24x # EDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlv # bjEyMDAGA1UEAxMpTWljcm9zb2Z0IFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5 # IDIwMTEwHhcNMTEwNzA4MjA1OTA5WhcNMjYwNzA4MjEwOTA5WjB+MQswCQYDVQQG # EwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwG # A1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSgwJgYDVQQDEx9NaWNyb3NvZnQg # Q29kZSBTaWduaW5nIFBDQSAyMDExMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC # CgKCAgEAq/D6chAcLq3YbqqCEE00uvK2WCGfQhsqa+laUKq4BjgaBEm6f8MMHt03 # a8YS2AvwOMKZBrDIOdUBFDFC04kNeWSHfpRgJGyvnkmc6Whe0t+bU7IKLMOv2akr # rnoJr9eWWcpgGgXpZnboMlImEi/nqwhQz7NEt13YxC4Ddato88tt8zpcoRb0Rrrg # OGSsbmQ1eKagYw8t00CT+OPeBw3VXHmlSSnnDb6gE3e+lD3v++MrWhAfTVYoonpy # 4BI6t0le2O3tQ5GD2Xuye4Yb2T6xjF3oiU+EGvKhL1nkkDstrjNYxbc+/jLTswM9 # sbKvkjh+0p2ALPVOVpEhNSXDOW5kf1O6nA+tGSOEy/S6A4aN91/w0FK/jJSHvMAh # dCVfGCi2zCcoOCWYOUo2z3yxkq4cI6epZuxhH2rhKEmdX4jiJV3TIUs+UsS1Vz8k # A/DRelsv1SPjcF0PUUZ3s/gA4bysAoJf28AVs70b1FVL5zmhD+kjSbwYuER8ReTB # w3J64HLnJN+/RpnF78IcV9uDjexNSTCnq47f7Fufr/zdsGbiwZeBe+3W7UvnSSmn # Eyimp31ngOaKYnhfsi+E11ecXL93KCjx7W3DKI8sj0A3T8HhhUSJxAlMxdSlQy90 # lfdu+HggWCwTXWCVmj5PM4TasIgX3p5O9JawvEagbJjS4NaIjAsCAwEAAaOCAe0w # ggHpMBAGCSsGAQQBgjcVAQQDAgEAMB0GA1UdDgQWBBRIbmTlUAXTgqoXNzcitW2o # ynUClTAZBgkrBgEEAYI3FAIEDB4KAFMAdQBiAEMAQTALBgNVHQ8EBAMCAYYwDwYD # VR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBRyLToCMZBDuRQFTuHqp8cx0SOJNDBa # BgNVHR8EUzBRME+gTaBLhklodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpL2Ny # bC9wcm9kdWN0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFfMDNfMjIuY3JsMF4GCCsG # AQUFBwEBBFIwUDBOBggrBgEFBQcwAoZCaHR0cDovL3d3dy5taWNyb3NvZnQuY29t # L3BraS9jZXJ0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFfMDNfMjIuY3J0MIGfBgNV # HSAEgZcwgZQwgZEGCSsGAQQBgjcuAzCBgzA/BggrBgEFBQcCARYzaHR0cDovL3d3 # dy5taWNyb3NvZnQuY29tL3BraW9wcy9kb2NzL3ByaW1hcnljcHMuaHRtMEAGCCsG # AQUFBwICMDQeMiAdAEwAZQBnAGEAbABfAHAAbwBsAGkAYwB5AF8AcwB0AGEAdABl # AG0AZQBuAHQALiAdMA0GCSqGSIb3DQEBCwUAA4ICAQBn8oalmOBUeRou09h0ZyKb # C5YR4WOSmUKWfdJ5DJDBZV8uLD74w3LRbYP+vj/oCso7v0epo/Np22O/IjWll11l # hJB9i0ZQVdgMknzSGksc8zxCi1LQsP1r4z4HLimb5j0bpdS1HXeUOeLpZMlEPXh6 # I/MTfaaQdION9MsmAkYqwooQu6SpBQyb7Wj6aC6VoCo/KmtYSWMfCWluWpiW5IP0 # wI/zRive/DvQvTXvbiWu5a8n7dDd8w6vmSiXmE0OPQvyCInWH8MyGOLwxS3OW560 # STkKxgrCxq2u5bLZ2xWIUUVYODJxJxp/sfQn+N4sOiBpmLJZiWhub6e3dMNABQam # ASooPoI/E01mC8CzTfXhj38cbxV9Rad25UAqZaPDXVJihsMdYzaXht/a8/jyFqGa # J+HNpZfQ7l1jQeNbB5yHPgZ3BtEGsXUfFL5hYbXw3MYbBL7fQccOKO7eZS/sl/ah # XJbYANahRr1Z85elCUtIEJmAH9AAKcWxm6U/RXceNcbSoqKfenoi+kiVH6v7RyOA # 9Z74v2u3S5fi63V4GuzqN5l5GEv/1rMjaHXmr/r8i+sLgOppO6/8MO0ETI7f33Vt # Y5E90Z1WTk+/gFcioXgRMiF670EKsT/7qMykXcGhiJtXcVZOSEXAQsmbdlsKgEhr # /Xmfwb1tbWrJUnMTDXpQzTGCGZ8wghmbAgEBMIGVMH4xCzAJBgNVBAYTAlVTMRMw # EQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVN # aWNyb3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNp # Z25pbmcgUENBIDIwMTECEzMAAALLt3U5+wJxQjYAAAAAAsswDQYJYIZIAWUDBAIB # BQCgga4wGQYJKoZIhvcNAQkDMQwGCisGAQQBgjcCAQQwHAYKKwYBBAGCNwIBCzEO # MAwGCisGAQQBgjcCARUwLwYJKoZIhvcNAQkEMSIEIN2HfVwhnGcXxyzkaqDK/aYG # z9/qB17ScoJI9phJTR8tMEIGCisGAQQBgjcCAQwxNDAyoBSAEgBNAGkAYwByAG8A # cwBvAGYAdKEagBhodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20wDQYJKoZIhvcNAQEB # BQAEggEAlFIbT2czLr1Y3RulOTmJVp9ZjoncSdNzMgEkPnigXxVhvX4KuciJb+sA # 30zl0rOQ8GE/CVs3PBdFo1xQFlU9pL9s/mA5bYWzz9ontqoJS080ybOVdxw/jfR/ # QmBsVKmI860IaGBmgDE15wcVCAq+Tr7murqWHOrcOBO1QwEcl4rV69qzGyNkDRee # krP/kyEVa42WK+UZ2gWa3r4tUzhkORNcjzA406H2xYDvojVyAgYtZ/K/qBHA5ISf # 4/EJ9qidltzylllaYXPW709I50hn6YnhYD9WlAb+JfLqNqk0vxggKYUdJRefAqX2 # HzRxv1y1kppxEbJ4kICzTe4zF9eYdaGCFykwghclBgorBgEEAYI3AwMBMYIXFTCC # FxEGCSqGSIb3DQEHAqCCFwIwghb+AgEDMQ8wDQYJYIZIAWUDBAIBBQAwggFZBgsq # hkiG9w0BCRABBKCCAUgEggFEMIIBQAIBAQYKKwYBBAGEWQoDATAxMA0GCWCGSAFl # AwQCAQUABCBZ3bBRjyHfPJeMb8CgPUaqBG75gcPi2D4QhK/WJut5pAIGY/daLqc9 # GBMyMDIzMDMyMTE5NDQ1Ny4wOTRaMASAAgH0oIHYpIHVMIHSMQswCQYDVQQGEwJV # UzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UE # ChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMS0wKwYDVQQLEyRNaWNyb3NvZnQgSXJl # bGFuZCBPcGVyYXRpb25zIExpbWl0ZWQxJjAkBgNVBAsTHVRoYWxlcyBUU1MgRVNO # OjNCRDQtNEI4MC02OUMzMSUwIwYDVQQDExxNaWNyb3NvZnQgVGltZS1TdGFtcCBT # ZXJ2aWNloIIReDCCBycwggUPoAMCAQICEzMAAAG0+4AIRAXSLfoAAQAAAbQwDQYJ # KoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24x # EDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlv # bjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIwMTAwHhcNMjIw # OTIwMjAyMjA5WhcNMjMxMjE0MjAyMjA5WjCB0jELMAkGA1UEBhMCVVMxEzARBgNV # BAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jv # c29mdCBDb3Jwb3JhdGlvbjEtMCsGA1UECxMkTWljcm9zb2Z0IElyZWxhbmQgT3Bl # cmF0aW9ucyBMaW1pdGVkMSYwJAYDVQQLEx1UaGFsZXMgVFNTIEVTTjozQkQ0LTRC # ODAtNjlDMzElMCMGA1UEAxMcTWljcm9zb2Z0IFRpbWUtU3RhbXAgU2VydmljZTCC # AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBALRHpp5lBzJCH7zortuyvOmW # 8FoZLBsFe9g5dbhnaq9qSpvpn86E/mJ4JKvWixH/lw7QA8gPtiiGVNIjvFhu/XiY # 889vX5WaQSmyoPMZdj9zvXa5XrkMN05zXzTePkCIIzF6RN7cTxezOyESymTIjrdx # X5BVlZolyQAOxNziMCYKYYNPbYd0786fDE/PhzrRt23a0Xf8trvFa0LEEy2YlcE2 # eqg2CjU/D0GZe8Ra0kjt0M12vdS4qWZ2Dpd7IhiQwnntQWu19Ytd3UBR8SpeRX+C # cw3bjgWfOXtla6chctWt2shlMwayMOfY4TG4yMPWFXELfZFFp7cgpjZNeVsmwkvo # V6RAwy1Y9V+VvbJ5qFtartN/rp6a0I1kGlbjuwX3L0HTVXcikqgHistXk9h3HOZ9 # WgFXlxZurG1SZmcz0BEEdya+1vGHE45KguYU9qq2LiHGBjn9z4+DqnV5tUKobsLb # JMb4r+8st2fj8SacSsftnusxkWqEJiJS34P2uNlzVR03+ls6+ZO0NcO79LgP7BbI # MipiOx8yh19PMQw0piaKFwOW7Q+gdJcfy6rOkG+CrYZwOzdiBHSebIzCIch2cAa+ # 38w7JFP/koKdlJ36qzdVXWv4G/qZpWycIvDKYbxJWM40+z2Stg5uHqK3I8e09kFX # txCHpS7hm8c8m25WaEU5AgMBAAGjggFJMIIBRTAdBgNVHQ4EFgQUy0SF5fGUuDqc # uxIot07eOMwy2X4wHwYDVR0jBBgwFoAUn6cVXQBeYl2D9OXSZacbUzUZ6XIwXwYD # VR0fBFgwVjBUoFKgUIZOaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9j # cmwvTWljcm9zb2Z0JTIwVGltZS1TdGFtcCUyMFBDQSUyMDIwMTAoMSkuY3JsMGwG # CCsGAQUFBwEBBGAwXjBcBggrBgEFBQcwAoZQaHR0cDovL3d3dy5taWNyb3NvZnQu # Y29tL3BraW9wcy9jZXJ0cy9NaWNyb3NvZnQlMjBUaW1lLVN0YW1wJTIwUENBJTIw # MjAxMCgxKS5jcnQwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcD # CDAOBgNVHQ8BAf8EBAMCB4AwDQYJKoZIhvcNAQELBQADggIBABLRDwWMKbeCYqEq # tI6Bs8KmF+kqDR+2G6qYAK3ZZ63bert7pCkRJbihFaktl2o18cdFJFxnOF4vXadm # 0sabskJ05KviEMJIO6dXSq8AGtr3Zmjc895q0mnlBLuNMgk4R8KrkJMHqBuHqkUW # XtfTrVUpgwzQt2UOiINKs+/b4r14MuXRVpOJ6cQOS8UhkeMAWl2iLlYaBGtOr3f/ # f9mLEPfWwoke0sSUbdV60OZCRh1ItBYYM9efKr14H5qu6jan6n00prEEa7W3uGb/ # 1/qj6P5emnvkqy5HI0X69DjVdLxVbjSsegm/dA+S4DaXPcfFf6iBxK/iV21l1upg # EVVajUApl5VR40wY4XF8EpmnUdTqLXDf7CqdhDjPST2K/OjvWPyQGQvc7oPapYyk # 66GU32AOyyHXJj6+vbtRUg/+ory+h0R2Xf5NhC+xbWcMzXEUXRRf1YKZDsRyH6r4 # 12pm8KDKE/r7Rk7aoKK7oYUpNGzNRf6QaYv5z2bVTSxkzWivFrepLHGwvRun9PYM # /8AQSTgZr0yzzjk/97WghkqCaAwAVpyvg3uaYnuCl/AccSkGyb8c+70bFSeUephs # fgb2r+QI7Mb2WcOnkJpCNLz0XJMS/UwlQn1ktLsiCpsqOk3aLJ2wTv6LK3u69I0v # QB/LKRKlZYRXKUDXzoPwr3UtsTVTMIIHcTCCBVmgAwIBAgITMwAAABXF52ueAptJ # mQAAAAAAFTANBgkqhkiG9w0BAQsFADCBiDELMAkGA1UEBhMCVVMxEzARBgNVBAgT # Cldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29m # dCBDb3Jwb3JhdGlvbjEyMDAGA1UEAxMpTWljcm9zb2Z0IFJvb3QgQ2VydGlmaWNh # dGUgQXV0aG9yaXR5IDIwMTAwHhcNMjEwOTMwMTgyMjI1WhcNMzAwOTMwMTgzMjI1 # WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMH # UmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYDVQQD # Ex1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMDCCAiIwDQYJKoZIhvcNAQEB # BQADggIPADCCAgoCggIBAOThpkzntHIhC3miy9ckeb0O1YLT/e6cBwfSqWxOdcjK # NVf2AX9sSuDivbk+F2Az/1xPx2b3lVNxWuJ+Slr+uDZnhUYjDLWNE893MsAQGOhg # fWpSg0S3po5GawcU88V29YZQ3MFEyHFcUTE3oAo4bo3t1w/YJlN8OWECesSq/XJp # rx2rrPY2vjUmZNqYO7oaezOtgFt+jBAcnVL+tuhiJdxqD89d9P6OU8/W7IVWTe/d # vI2k45GPsjksUZzpcGkNyjYtcI4xyDUoveO0hyTD4MmPfrVUj9z6BVWYbWg7mka9 # 7aSueik3rMvrg0XnRm7KMtXAhjBcTyziYrLNueKNiOSWrAFKu75xqRdbZ2De+JKR # Hh09/SDPc31BmkZ1zcRfNN0Sidb9pSB9fvzZnkXftnIv231fgLrbqn427DZM9itu # qBJR6L8FA6PRc6ZNN3SUHDSCD/AQ8rdHGO2n6Jl8P0zbr17C89XYcz1DTsEzOUyO # ArxCaC4Q6oRRRuLRvWoYWmEBc8pnol7XKHYC4jMYctenIPDC+hIK12NvDMk2ZItb # oKaDIV1fMHSRlJTYuVD5C4lh8zYGNRiER9vcG9H9stQcxWv2XFJRXRLbJbqvUAV6 # bMURHXLvjflSxIUXk8A8FdsaN8cIFRg/eKtFtvUeh17aj54WcmnGrnu3tz5q4i6t # AgMBAAGjggHdMIIB2TASBgkrBgEEAYI3FQEEBQIDAQABMCMGCSsGAQQBgjcVAgQW # BBQqp1L+ZMSavoKRPEY1Kc8Q/y8E7jAdBgNVHQ4EFgQUn6cVXQBeYl2D9OXSZacb # UzUZ6XIwXAYDVR0gBFUwUzBRBgwrBgEEAYI3TIN9AQEwQTA/BggrBgEFBQcCARYz # aHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9Eb2NzL1JlcG9zaXRvcnku # aHRtMBMGA1UdJQQMMAoGCCsGAQUFBwMIMBkGCSsGAQQBgjcUAgQMHgoAUwB1AGIA # QwBBMAsGA1UdDwQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFNX2 # VsuP6KJcYmjRPZSQW9fOmhjEMFYGA1UdHwRPME0wS6BJoEeGRWh0dHA6Ly9jcmwu # bWljcm9zb2Z0LmNvbS9wa2kvY3JsL3Byb2R1Y3RzL01pY1Jvb0NlckF1dF8yMDEw # LTA2LTIzLmNybDBaBggrBgEFBQcBAQROMEwwSgYIKwYBBQUHMAKGPmh0dHA6Ly93 # d3cubWljcm9zb2Z0LmNvbS9wa2kvY2VydHMvTWljUm9vQ2VyQXV0XzIwMTAtMDYt # MjMuY3J0MA0GCSqGSIb3DQEBCwUAA4ICAQCdVX38Kq3hLB9nATEkW+Geckv8qW/q # XBS2Pk5HZHixBpOXPTEztTnXwnE2P9pkbHzQdTltuw8x5MKP+2zRoZQYIu7pZmc6 # U03dmLq2HnjYNi6cqYJWAAOwBb6J6Gngugnue99qb74py27YP0h1AdkY3m2CDPVt # I1TkeFN1JFe53Z/zjj3G82jfZfakVqr3lbYoVSfQJL1AoL8ZthISEV09J+BAljis # 9/kpicO8F7BUhUKz/AyeixmJ5/ALaoHCgRlCGVJ1ijbCHcNhcy4sa3tuPywJeBTp # kbKpW99Jo3QMvOyRgNI95ko+ZjtPu4b6MhrZlvSP9pEB9s7GdP32THJvEKt1MMU0 # sHrYUP4KWN1APMdUbZ1jdEgssU5HLcEUBHG/ZPkkvnNtyo4JvbMBV0lUZNlz138e # W0QBjloZkWsNn6Qo3GcZKCS6OEuabvshVGtqRRFHqfG3rsjoiV5PndLQTHa1V1QJ # sWkBRH58oWFsc/4Ku+xBZj1p/cvBQUl+fpO+y/g75LcVv7TOPqUxUYS8vwLBgqJ7 # Fx0ViY1w/ue10CgaiQuPNtq6TPmb/wrpNPgkNWcr4A245oyZ1uEi6vAnQj0llOZ0 # dFtq0Z4+7X6gMTN9vMvpe784cETRkPHIqzqKOghif9lwY1NNje6CbaUFEMFxBmoQ # tB1VM1izoXBm8qGCAtQwggI9AgEBMIIBAKGB2KSB1TCB0jELMAkGA1UEBhMCVVMx # EzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoT # FU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEtMCsGA1UECxMkTWljcm9zb2Z0IElyZWxh # bmQgT3BlcmF0aW9ucyBMaW1pdGVkMSYwJAYDVQQLEx1UaGFsZXMgVFNTIEVTTjoz # QkQ0LTRCODAtNjlDMzElMCMGA1UEAxMcTWljcm9zb2Z0IFRpbWUtU3RhbXAgU2Vy # dmljZaIjCgEBMAcGBSsOAwIaAxUAZZzYkPObl/ZzeCkSbf4B5CceCQiggYMwgYCk # fjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMH # UmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYDVQQD # Ex1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMDANBgkqhkiG9w0BAQUFAAIF # AOfEHeYwIhgPMjAyMzAzMjEyMDEzMjZaGA8yMDIzMDMyMjIwMTMyNlowdDA6Bgor # BgEEAYRZCgQBMSwwKjAKAgUA58Qd5gIBADAHAgEAAgIWnTAHAgEAAgIQpTAKAgUA # 58VvZgIBADA2BgorBgEEAYRZCgQCMSgwJjAMBgorBgEEAYRZCgMCoAowCAIBAAID # B6EgoQowCAIBAAIDAYagMA0GCSqGSIb3DQEBBQUAA4GBAH+TUHvVXtgCsyNxWbb2 # 4DypjIUJdstpyDAo3ZbeiVOosxI0P/hhfeNAz4W0RyHy0E5NZ414GS47xkhtQORm # lSNDnQZn7fRwolfttD2d8xeSQkSrYwka45zXujsl3tae0U43p52C5nTMhqNnFaA3 # MqqgujvbbwHWuMunmcS380bbMYIEDTCCBAkCAQEwgZMwfDELMAkGA1UEBhMCVVMx # EzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoT # FU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUt # U3RhbXAgUENBIDIwMTACEzMAAAG0+4AIRAXSLfoAAQAAAbQwDQYJYIZIAWUDBAIB # BQCgggFKMBoGCSqGSIb3DQEJAzENBgsqhkiG9w0BCRABBDAvBgkqhkiG9w0BCQQx # IgQgx6ijDWl6EHO5yjzYY3r5LBtRolSEFqh4QzI5qyVfpvgwgfoGCyqGSIb3DQEJ # EAIvMYHqMIHnMIHkMIG9BCDTyPd75qMwcAZRcb36/6xJa3hT0eLse71ysdp4twH3 # BjCBmDCBgKR+MHwxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAw # DgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24x # JjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwAhMzAAABtPuA # CEQF0i36AAEAAAG0MCIEIIXkzmkxAk+knVPq9pgWSrC7y8wvjSImk+jatSD8uNWv # MA0GCSqGSIb3DQEBCwUABIICALCTajlSRCLzJMGy7pL0LodZihqkbJua3Mu0pOZk # pVe12+p84u96xPNREWpk+hRAN5JwUn2FUDJLYoDN9+FkAo4NNBvkpTEl2KxStl60 # 0oMgu6axYn//7ahPtjYqJv6kYtH0QlM0a69ZEGoItRY1Z1pfo4pmZPWOcDaWoN8h # c7Yh+ds+TL4DY8OD3gtpUnesjBWZsrf+N5h2j2fn+lWwR7bsSyLRagVJkmODztSl # LD/8C4djzkuLbiSoW1CngylZ1N6N3/kiFFyafvjLy1t4pVCeJypdRQHnzvD+xoDD # DPu6S1Oa6+j40Q/brafeW3UgWORMSi2QR7LGyA6vrqn+VjzXt0P6adCjbzDSEKZA # npqMnKLnPR4CYuvi5XJKOAoXiKv4OrcfiwyepI4RAdy/YejfF0jyyKRrr/i9B/TO # pp5bw3YEanKzQIrhyDRIYp9vzXBvAedj1mHABaRsoLqIt2aoTKFYW5gGzYfie1y7 # x5LbR53DebfFbL25rYDQapVOy4RSgnhvBjrzH0WadfWK+WfoyGZWYsCilP920+EN # vLuak8g9HaSm498RNUC4JbJwLLW4/GE6oC0YVFxJofKoXuPmVbq/d+BK/0gOnpgm # 8RrbPvlbjosy04ibh6O/fcfHqLmjG85pkNpvuiXWwn7XufqTmBX2QDE/ag0cPMdK # X0+w # SIG # End signature block |