diff --git a/documentation/azure-powershell-modules.md b/documentation/azure-powershell-modules.md
index feb61afd799f..32ec9dd505fa 100644
--- a/documentation/azure-powershell-modules.md
+++ b/documentation/azure-powershell-modules.md
@@ -11,6 +11,7 @@ Azure PowerShell | `Az`
Azure Service | Module Name | PowerShell Gallery Link
------------------------------------- | --------------------------------------- | -----------------------
Accounts | `Az.Accounts` | [![Accounts]][AccountsGallery]
+ADDomainServices | `Az.ADDomainServices` | [![ADDomainServices]][ADDomainServicesGallery]
Advisor | `Az.Advisor` | [![Advisor]][AdvisorGallery]
Kubernetes Service | `Az.Aks` | [![Aks]][AksGallery]
Alert Management | `Az.AlertsManagement` | [![AlertsManagement]][AlertsManagementGallery]
@@ -131,6 +132,7 @@ Windows Iot Services | `Az.WindowsIotServices`
[Az]: https://img.shields.io/powershellgallery/v/Az.svg?style=flat-square&label=Az
[Accounts]: https://img.shields.io/powershellgallery/v/Az.Accounts.svg?style=flat-square&label=Az.Accounts
+[ADDomainServices]: https://img.shields.io/powershellgallery/v/Az.ADDomainServices.svg?style=flat-square&label=Az.ADDomainServices
[Advisor]: https://img.shields.io/powershellgallery/v/Az.Advisor.svg?style=flat-square&label=Az.Advisor
[Aks]: https://img.shields.io/powershellgallery/v/Az.Aks.svg?style=flat-square&label=Az.Aks
[AlertsManagement]: https://img.shields.io/powershellgallery/v/Az.AlertsManagement.svg?style=flat-square&label=Az.AlertsManagement
@@ -249,6 +251,7 @@ Windows Iot Services | `Az.WindowsIotServices`
[AzGallery]: https://www.powershellgallery.com/packages/Az/
[AccountsGallery]: https://www.powershellgallery.com/packages/Az.Accounts/
+[ADDomainServicesGallery]: https://www.powershellgallery.com/packages/Az.ADDomainServices/
[AdvisorGallery]: https://www.powershellgallery.com/packages/Az.Advisor/
[AksGallery]: https://www.powershellgallery.com/packages/Az.Aks/
[AlertsManagementGallery]: https://www.powershellgallery.com/packages/Az.AlertsManagement/
@@ -362,4 +365,4 @@ Windows Iot Services | `Az.WindowsIotServices`
[TrafficManagerGallery]: https://www.powershellgallery.com/packages/Az.TrafficManager/
[VMWareGallery]: https://www.powershellgallery.com/packages/Az.VMWare/
[WebsitesGallery]: https://www.powershellgallery.com/packages/Az.Websites/
-[WindowsIotServicesGallery]: https://www.powershellgallery.com/packages/Az.WindowsIotServices/
\ No newline at end of file
+[WindowsIotServicesGallery]: https://www.powershellgallery.com/packages/Az.WindowsIotServices/
diff --git a/src/ADDomainServices/ADDomainServices.sln b/src/ADDomainServices/ADDomainServices.sln
new file mode 100644
index 000000000000..da0b74cc5551
--- /dev/null
+++ b/src/ADDomainServices/ADDomainServices.sln
@@ -0,0 +1,48 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29709.97
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{62843FE6-7575-4D88-B989-7DF7EEC0BC01}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{442C609B-A431-4A71-B289-08F0B63C83E5}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{59E8F6B8-8F0E-403F-B88B-9736DBC396D9}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Az.ADDomainServices", "Az.ADDomainServices.csproj", "{1C203C0C-E0FD-40D2-B79E-C6DA52E4E350}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {62843FE6-7575-4D88-B989-7DF7EEC0BC01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {62843FE6-7575-4D88-B989-7DF7EEC0BC01}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {62843FE6-7575-4D88-B989-7DF7EEC0BC01}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {62843FE6-7575-4D88-B989-7DF7EEC0BC01}.Release|Any CPU.Build.0 = Release|Any CPU
+ {442C609B-A431-4A71-B289-08F0B63C83E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {442C609B-A431-4A71-B289-08F0B63C83E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {442C609B-A431-4A71-B289-08F0B63C83E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {442C609B-A431-4A71-B289-08F0B63C83E5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {59E8F6B8-8F0E-403F-B88B-9736DBC396D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {59E8F6B8-8F0E-403F-B88B-9736DBC396D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {59E8F6B8-8F0E-403F-B88B-9736DBC396D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {59E8F6B8-8F0E-403F-B88B-9736DBC396D9}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1C203C0C-E0FD-40D2-B79E-C6DA52E4E350}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1C203C0C-E0FD-40D2-B79E-C6DA52E4E350}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1C203C0C-E0FD-40D2-B79E-C6DA52E4E350}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1C203C0C-E0FD-40D2-B79E-C6DA52E4E350}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {F9B3D96E-9680-40BE-A917-02EE655D6030}
+ EndGlobalSection
+EndGlobal
diff --git a/src/ADDomainServices/Az.ADDomainServices.csproj b/src/ADDomainServices/Az.ADDomainServices.csproj
new file mode 100644
index 000000000000..92aef5ebc61f
--- /dev/null
+++ b/src/ADDomainServices/Az.ADDomainServices.csproj
@@ -0,0 +1,7 @@
+
+
+ ADDomainServices
+
+
+
+
diff --git a/src/ADDomainServices/Az.ADDomainServices.format.ps1xml b/src/ADDomainServices/Az.ADDomainServices.format.ps1xml
new file mode 100644
index 000000000000..a9f09578c044
--- /dev/null
+++ b/src/ADDomainServices/Az.ADDomainServices.format.ps1xml
@@ -0,0 +1,757 @@
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.AdDomainServicesIdentity
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.AdDomainServicesIdentity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DomainServiceName
+
+
+ ResourceGroupName
+
+
+ SubscriptionId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.CloudErrorBody
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.CloudErrorBody
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code
+
+
+ Message
+
+
+ Target
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainSecuritySettings
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainSecuritySettings
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NtlmV1
+
+
+ SyncKerberosPassword
+
+
+ SyncNtlmPassword
+
+
+ SyncOnPremPassword
+
+
+ TlsV1
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainService
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainService
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ DomainName
+
+
+ Location
+
+
+ Sku
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainServiceListResult
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainServiceListResult
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainServiceProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainServiceProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DeploymentId
+
+
+ DomainConfigurationType
+
+
+ DomainName
+
+
+ FilteredSync
+
+
+ ProvisioningState
+
+
+ Sku
+
+
+ SyncOwner
+
+
+ TenantId
+
+
+ Version
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ForestTrust
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ForestTrust
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ FriendlyName
+
+
+ RemoteDnsIP
+
+
+ TrustDirection
+
+
+ TrustPassword
+
+
+ TrustedDomainFqdn
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.HealthAlert
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.HealthAlert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Issue
+
+
+ LastDetected
+
+
+ Name
+
+
+ Raised
+
+
+ ResolutionUri
+
+
+ Severity
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.HealthMonitor
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.HealthMonitor
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Detail
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.LdapsSettings
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.LdapsSettings
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CertificateNotAfter
+
+
+ CertificateThumbprint
+
+
+ ExternalAccess
+
+
+ Ldap
+
+
+ PfxCertificate
+
+
+ PfxCertificatePassword
+
+
+ PublicCertificate
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.MigrationProgress
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.MigrationProgress
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CompletionPercentage
+
+
+ ProgressMessage
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.MigrationProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.MigrationProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ OldSubnetId
+
+
+ OldVnetSiteId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.NotificationSettings
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.NotificationSettings
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AdditionalRecipient
+
+
+ NotifyDcAdmin
+
+
+ NotifyGlobalAdmin
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.OperationDisplayInfo
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.OperationDisplayInfo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Description
+
+
+ Operation
+
+
+ Provider
+
+
+ Resource
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.OperationEntity
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.OperationEntity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Origin
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.OperationEntityListResult
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.OperationEntityListResult
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ReplicaSet
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ReplicaSet
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DomainControllerIPAddress
+
+
+ ExternalAccessIPAddress
+
+
+ HealthLastEvaluated
+
+
+ Location
+
+
+ ServiceStatus
+
+
+ SubnetId
+
+
+ VnetSiteId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.Resource
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.Resource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Etag
+
+
+ Location
+
+
+ Name
+
+
+ Type
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ResourceForestSettings
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ResourceForestSettings
+
+
+
+
+
+
+
+
+
+
+
+ ResourceForest
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ResourceTags
+
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ResourceTags
+
+
+
+
+
+
+
+
+
+
+
+ Item
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/ADDomainServices/Az.ADDomainServices.psd1 b/src/ADDomainServices/Az.ADDomainServices.psd1
new file mode 100644
index 000000000000..b277d4c9b394
--- /dev/null
+++ b/src/ADDomainServices/Az.ADDomainServices.psd1
@@ -0,0 +1,138 @@
+#
+# Module manifest for module 'Az.ADDomainServices'
+#
+# Generated by: Microsoft Corporation
+#
+# Generated on: 1/5/2021
+#
+
+@{
+
+# Script module or binary module file associated with this manifest.
+RootModule = './Az.ADDomainServices.psm1'
+
+# Version number of this module.
+ModuleVersion = '0.1.0'
+
+# Supported PSEditions
+CompatiblePSEditions = 'Core', 'Desktop'
+
+# ID used to uniquely identify this module
+GUID = '1633c52c-9970-4d92-85bb-16c12ec9fff2'
+
+# Author of this module
+Author = 'Microsoft Corporation'
+
+# Company or vendor of this module
+CompanyName = 'Microsoft Corporation'
+
+# Copyright statement for this module
+Copyright = 'Microsoft Corporation. All rights reserved.'
+
+# Description of the functionality provided by this module
+Description = 'Microsoft Azure PowerShell: AdDomainServices cmdlets'
+
+# Minimum version of the PowerShell engine required by this module
+PowerShellVersion = '5.1'
+
+# Name of the PowerShell host required by this module
+# PowerShellHostName = ''
+
+# Minimum version of the PowerShell host required by this module
+# PowerShellHostVersion = ''
+
+# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
+DotNetFrameworkVersion = '4.7.2'
+
+# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
+# ClrVersion = ''
+
+# Processor architecture (None, X86, Amd64) required by this module
+# ProcessorArchitecture = ''
+
+# Modules that must be imported into the global environment prior to importing this module
+RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.2.3'; })
+
+# Assemblies that must be loaded prior to importing this module
+RequiredAssemblies = './bin/Az.ADDomainServices.private.dll'
+
+# Script files (.ps1) that are run in the caller's environment prior to importing this module.
+# ScriptsToProcess = @()
+
+# Type files (.ps1xml) to be loaded when importing this module
+# TypesToProcess = @()
+
+# Format files (.ps1xml) to be loaded when importing this module
+FormatsToProcess = './Az.ADDomainServices.format.ps1xml'
+
+# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
+# NestedModules = @()
+
+# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
+FunctionsToExport = 'Get-AzADDomainService', 'New-AzADDomainService',
+ 'New-AzADDomainServiceDomainSecuritySettingObject',
+ 'New-AzADDomainServiceLdapsSettingObject',
+ 'New-AzADDomainServiceNotificationSettingObject',
+ 'New-AzADDomainServiceReplicaSetObject',
+ 'New-AzADDomainServiceResourceForestSettingObject',
+ 'Remove-AzADDomainService', 'Update-AzADDomainService'
+
+# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
+CmdletsToExport = @()
+
+# Variables to export from this module
+# VariablesToExport = @()
+
+# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
+AliasesToExport = '*'
+
+# DSC resources to export from this module
+# DscResourcesToExport = @()
+
+# List of all modules packaged with this module
+# ModuleList = @()
+
+# List of all files packaged with this module
+# FileList = @()
+
+# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
+PrivateData = @{
+
+ PSData = @{
+
+ # Tags applied to this module. These help with module discovery in online galleries.
+ Tags = 'Azure','ResourceManager','ARM','PSModule','AdDomainServices'
+
+ # A URL to the license for this module.
+ LicenseUri = 'https://aka.ms/azps-license'
+
+ # A URL to the main website for this project.
+ ProjectUri = 'https://github.com/Azure/azure-powershell'
+
+ # A URL to an icon representing this module.
+ # IconUri = ''
+
+ # ReleaseNotes of this module
+ # ReleaseNotes = ''
+
+ # Prerelease string of this module
+ # Prerelease = ''
+
+ # Flag to indicate whether the module requires explicit user acceptance for install/update/save
+ # RequireLicenseAcceptance = $false
+
+ # External dependent modules of this module
+ # ExternalModuleDependencies = @()
+
+ } # End of PSData hashtable
+
+ } # End of PrivateData hashtable
+
+# HelpInfo URI of this module
+# HelpInfoURI = ''
+
+# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
+# DefaultCommandPrefix = ''
+
+}
+
diff --git a/src/ADDomainServices/Az.ADDomainServices.psm1 b/src/ADDomainServices/Az.ADDomainServices.psm1
new file mode 100644
index 000000000000..085ee9b75b2e
--- /dev/null
+++ b/src/ADDomainServices/Az.ADDomainServices.psm1
@@ -0,0 +1,109 @@
+# region Generated
+ # ----------------------------------------------------------------------------------
+ #
+ # Copyright Microsoft Corporation
+ # Licensed under the Apache License, Version 2.0 (the "License");
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ # http://www.apache.org/licenses/LICENSE-2.0
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ # ----------------------------------------------------------------------------------
+ # Load required Az.Accounts module
+ $accountsName = 'Az.Accounts'
+ $accountsModule = Get-Module -Name $accountsName
+ if(-not $accountsModule) {
+ $localAccountsPath = Join-Path $PSScriptRoot 'generated\modules'
+ if(Test-Path -Path $localAccountsPath) {
+ $localAccounts = Get-ChildItem -Path $localAccountsPath -Recurse -Include 'Az.Accounts.psd1' | Select-Object -Last 1
+ if($localAccounts) {
+ $accountsModule = Import-Module -Name ($localAccounts.FullName) -Scope Global -PassThru
+ }
+ }
+ if(-not $accountsModule) {
+ $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.2.3' } | Measure-Object).Count -gt 0
+ if($hasAdequateVersion) {
+ $accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.2.3 -Scope Global -PassThru
+ }
+ }
+ }
+
+ if(-not $accountsModule) {
+ Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. For installation instructions, please see: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps" -ErrorAction Stop
+ } elseif (($accountsModule.Version -lt [System.Version]'2.2.3') -and (-not $localAccounts)) {
+ Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to remove '.PSSharedModules' in your home directory. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
+ }
+ Write-Information "Loaded Module '$($accountsModule.Name)'"
+
+ # Load the private module dll
+ $null = Import-Module -Name (Join-Path $PSScriptRoot './bin/Az.ADDomainServices.private.dll')
+
+ # Get the private module's instance
+ $instance = [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Module]::Instance
+
+ # Ask for the shared functionality table
+ $VTable = Register-AzModule
+
+ # Tweaks the pipeline on module load
+ $instance.OnModuleLoad = $VTable.OnModuleLoad
+
+ # Tweaks the pipeline per call
+ $instance.OnNewRequest = $VTable.OnNewRequest
+
+ # Gets shared parameter values
+ $instance.GetParameterValue = $VTable.GetParameterValue
+
+ # Allows shared module to listen to events from this module
+ $instance.EventListener = $VTable.EventListener
+
+ # Gets shared argument completers
+ $instance.ArgumentCompleter = $VTable.ArgumentCompleter
+
+ # The name of the currently selected Azure profile
+ $instance.ProfileName = $VTable.ProfileName
+
+
+ # Load the custom module
+ $customModulePath = Join-Path $PSScriptRoot './custom/Az.ADDomainServices.custom.psm1'
+ if(Test-Path $customModulePath) {
+ $null = Import-Module -Name $customModulePath
+ }
+
+ # Export nothing to clear implicit exports
+ Export-ModuleMember
+
+ # Export proxy cmdlet scripts
+ $exportsPath = Join-Path $PSScriptRoot './exports'
+ $directories = Get-ChildItem -Directory -Path $exportsPath
+ $profileDirectory = $null
+ if($instance.ProfileName) {
+ if(($directories | ForEach-Object { $_.Name }) -contains $instance.ProfileName) {
+ $profileDirectory = $directories | Where-Object { $_.Name -eq $instance.ProfileName }
+ } else {
+ # Don't export anything if the profile doesn't exist for the module
+ $exportsPath = $null
+ Write-Warning "Selected Azure profile '$($instance.ProfileName)' does not exist for module '$($instance.Name)'. No cmdlets were loaded."
+ }
+ } elseif(($directories | Measure-Object).Count -gt 0) {
+ # Load the last folder if no profile is selected
+ $profileDirectory = $directories | Select-Object -Last 1
+ }
+
+ if($profileDirectory) {
+ Write-Information "Loaded Azure profile '$($profileDirectory.Name)' for module '$($instance.Name)'"
+ $exportsPath = $profileDirectory.FullName
+ }
+
+ if($exportsPath) {
+ Get-ChildItem -Path $exportsPath -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName }
+ $cmdletNames = Get-ScriptCmdlet -ScriptFolder $exportsPath
+ Export-ModuleMember -Function $cmdletNames -Alias (Get-ScriptCmdlet -ScriptFolder $exportsPath -AsAlias)
+ }
+
+ # Finalize initialization of this module
+ $instance.Init();
+ Write-Information "Loaded Module '$($instance.Name)'"
+# endregion
diff --git a/src/ADDomainServices/Changelog.md b/src/ADDomainServices/Changelog.md
new file mode 100644
index 000000000000..d3b5550bb35f
--- /dev/null
+++ b/src/ADDomainServices/Changelog.md
@@ -0,0 +1,24 @@
+
+## Upcoming Release
+
+## Version 0.1.0
+* First preview release for module Az.ADDomainServices
+
diff --git a/src/ADDomainServices/Properties/AssemblyInfo.cs b/src/ADDomainServices/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000000..9679acdda019
--- /dev/null
+++ b/src/ADDomainServices/Properties/AssemblyInfo.cs
@@ -0,0 +1,28 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("Microsoft Azure Powershell - ADDomainServices")]
+[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)]
+[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)]
+[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)]
+
+[assembly: ComVisible(false)]
+[assembly: CLSCompliant(false)]
+[assembly: Guid("d1e3bb4a-a9b4-4417-87bf-644ad4109592")]
+[assembly: AssemblyVersion("0.1.0")]
+[assembly: AssemblyFileVersion("0.1.0")]
diff --git a/src/ADDomainServices/build-module.ps1 b/src/ADDomainServices/build-module.ps1
new file mode 100644
index 000000000000..ff69fa21eb78
--- /dev/null
+++ b/src/ADDomainServices/build-module.ps1
@@ -0,0 +1,153 @@
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs)
+$ErrorActionPreference = 'Stop'
+
+if($PSEdition -ne 'Core') {
+ Write-Error 'This script requires PowerShell Core to execute. [Note] Generated cmdlets will work in both PowerShell Core or Windows PowerShell.'
+}
+
+if(-not $Isolated -and -not $Debugger) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+
+ if($LastExitCode -ne 0) {
+ # Build failed. Don't attempt to run the module.
+ return
+ }
+
+ if($Test) {
+ . (Join-Path $PSScriptRoot 'test-module.ps1')
+ if($LastExitCode -ne 0) {
+ # Tests failed. Don't attempt to run the module.
+ return
+ }
+ }
+
+ if($Docs) {
+ . (Join-Path $PSScriptRoot 'generate-help.ps1')
+ if($LastExitCode -ne 0) {
+ # Docs generation failed. Don't attempt to run the module.
+ return
+ }
+ }
+
+ if($Pack) {
+ . (Join-Path $PSScriptRoot 'pack-module.ps1')
+ if($LastExitCode -ne 0) {
+ # Packing failed. Don't attempt to run the module.
+ return
+ }
+ }
+
+ $runModulePath = Join-Path $PSScriptRoot 'run-module.ps1'
+ if($Code) {
+ . $runModulePath -Code
+ } elseif($Run) {
+ . $runModulePath
+ } else {
+ Write-Host -ForegroundColor Cyan "To run this module in an isolated PowerShell session, run the 'run-module.ps1' script or provide the '-Run' parameter to this script."
+ }
+ return
+}
+
+$binFolder = Join-Path $PSScriptRoot 'bin'
+$objFolder = Join-Path $PSScriptRoot 'obj'
+
+if(-not $Debugger) {
+ Write-Host -ForegroundColor Green 'Cleaning build folders...'
+ $null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path $binFolder, $objFolder
+
+ if((Test-Path $binFolder) -or (Test-Path $objFolder)) {
+ Write-Host -ForegroundColor Cyan 'Did you forget to exit your isolated module session before rebuilding?'
+ Write-Error 'Unable to clean ''bin'' or ''obj'' folder. A process may have an open handle.'
+ }
+
+ Write-Host -ForegroundColor Green 'Compiling module...'
+ $buildConfig = 'Debug'
+ if($Release) {
+ $buildConfig = 'Release'
+ }
+ dotnet publish $PSScriptRoot --verbosity quiet --configuration $buildConfig /nologo
+ if($LastExitCode -ne 0) {
+ Write-Error 'Compilation failed.'
+ }
+
+ $null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path (Join-Path $binFolder 'Debug'), (Join-Path $binFolder 'Release')
+}
+
+$dll = Join-Path $PSScriptRoot 'bin\Az.ADDomainServices.private.dll'
+if(-not (Test-Path $dll)) {
+ Write-Error "Unable to find output assembly in '$binFolder'."
+}
+
+# Load DLL to use build-time cmdlets
+$null = Import-Module -Name $dll
+
+$modulePaths = $dll
+$customPsm1 = Join-Path $PSScriptRoot 'custom\Az.ADDomainServices.custom.psm1'
+if(Test-Path $customPsm1) {
+ $modulePaths = @($dll, $customPsm1)
+}
+
+$exportsFolder = Join-Path $PSScriptRoot 'exports'
+if(Test-Path $exportsFolder) {
+ $null = Get-ChildItem -Path $exportsFolder -Recurse -Exclude 'readme.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
+}
+$null = New-Item -ItemType Directory -Force -Path $exportsFolder
+
+$internalFolder = Join-Path $PSScriptRoot 'internal'
+if(Test-Path $internalFolder) {
+ $null = Get-ChildItem -Path $internalFolder -Recurse -Exclude '*.psm1', 'readme.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
+}
+$null = New-Item -ItemType Directory -Force -Path $internalFolder
+
+$psd1 = Join-Path $PSScriptRoot './Az.ADDomainServices.psd1'
+$guid = Get-ModuleGuid -Psd1Path $psd1
+$moduleName = 'Az.ADDomainServices'
+$examplesFolder = Join-Path $PSScriptRoot 'examples'
+$null = New-Item -ItemType Directory -Force -Path $examplesFolder
+
+if($NoDocs) {
+ Write-Host -ForegroundColor Green 'Creating exports...'
+ Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs -ExamplesFolder $examplesFolder
+} else {
+ Write-Host -ForegroundColor Green 'Creating exports and docs...'
+ $moduleDescription = 'Microsoft Azure PowerShell: AdDomainServices cmdlets'
+ $docsFolder = Join-Path $PSScriptRoot 'docs'
+ if(Test-Path $docsFolder) {
+ $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'readme.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
+ }
+ $null = New-Item -ItemType Directory -Force -Path $docsFolder
+ Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid
+}
+
+Write-Host -ForegroundColor Green 'Creating format.ps1xml...'
+$formatPs1xml = Join-Path $PSScriptRoot './Az.ADDomainServices.format.ps1xml'
+Export-FormatPs1xml -FilePath $formatPs1xml
+
+Write-Host -ForegroundColor Green 'Creating psd1...'
+$customFolder = Join-Path $PSScriptRoot 'custom'
+Export-Psd1 -ExportsFolder $exportsFolder -CustomFolder $customFolder -Psd1Path $psd1 -ModuleGuid $guid
+
+Write-Host -ForegroundColor Green 'Creating test stubs...'
+$testFolder = Join-Path $PSScriptRoot 'test'
+$null = New-Item -ItemType Directory -Force -Path $testFolder
+Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFolder $testFolder
+
+Write-Host -ForegroundColor Green 'Creating example stubs...'
+Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder
+
+Write-Host -ForegroundColor Green '-------------Done-------------'
diff --git a/src/ADDomainServices/check-dependencies.ps1 b/src/ADDomainServices/check-dependencies.ps1
new file mode 100644
index 000000000000..7ada900d8f0e
--- /dev/null
+++ b/src/ADDomainServices/check-dependencies.ps1
@@ -0,0 +1,64 @@
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
+$ErrorActionPreference = 'Stop'
+
+if(-not $Isolated) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+ & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ return
+}
+
+function DownloadModule ([bool]$predicate, [string]$path, [string]$moduleName, [string]$versionMinimum, [string]$requiredVersion) {
+ if($predicate) {
+ $module = Get-Module -ListAvailable -Name $moduleName
+ if((-not $module) -or ($versionMinimum -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -ge [System.Version]$versionMinimum } | Measure-Object).Count -eq 0)) {
+ $null = New-Item -ItemType Directory -Force -Path $path
+ Write-Host -ForegroundColor Green "Installing local $moduleName module into '$path'..."
+ if ($requiredVersion) {
+ Find-Module -Name $moduleName -RequiredVersion $requiredVersion -Repository PSGallery | Save-Module -Path $path
+ }elseif($versionMinimum) {
+ Find-Module -Name $moduleName -MinimumVersion $versionMinimum -Repository PSGallery | Save-Module -Path $path
+ } else {
+ Find-Module -Name $moduleName -Repository PSGallery | Save-Module -Path $path
+ }
+ }
+ }
+}
+
+$ProgressPreference = 'SilentlyContinue'
+$all = (@($Accounts.IsPresent, $Pester.IsPresent) | Select-Object -Unique | Measure-Object).Count -eq 1
+
+$localModulesPath = Join-Path $PSScriptRoot 'generated\modules'
+if(Test-Path -Path $localModulesPath) {
+ $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath"
+}
+
+DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '2.2.3'
+DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -requiredVersion '4.10.1'
+
+$tools = Join-Path $PSScriptRoot 'tools'
+$resourceDir = Join-Path $tools 'Resources'
+$resourceModule = Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestSupport.psm1'
+
+if ($Resources.IsPresent -and (-not (Test-Path -Path $resourceModule))) {
+ Write-Host -ForegroundColor Green "Building local Resource module used for test..."
+ Set-Location $resourceDir
+ $null = autorest .\readme.md --use:@autorest/powershell@3.0.414 --output-folder=$HOME/.PSSharedModules/Resources
+ $null = Copy-Item custom/* $HOME/.PSSharedModules/Resources/custom/
+ Set-Location $HOME/.PSSharedModules/Resources
+ $null = .\build-module.ps1
+ Set-Location $PSScriptRoot
+}
diff --git a/src/ADDomainServices/custom/Az.ADDomainServices.custom.psm1 b/src/ADDomainServices/custom/Az.ADDomainServices.custom.psm1
new file mode 100644
index 000000000000..c46c519856c3
--- /dev/null
+++ b/src/ADDomainServices/custom/Az.ADDomainServices.custom.psm1
@@ -0,0 +1,17 @@
+# region Generated
+ # Load the private module dll
+ $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.ADDomainServices.private.dll')
+
+ # Load the internal module
+ $internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.ADDomainServices.internal.psm1'
+ if(Test-Path $internalModulePath) {
+ $null = Import-Module -Name $internalModulePath
+ }
+
+ # Export nothing to clear implicit exports
+ Export-ModuleMember
+
+ # Export script cmdlets
+ Get-ChildItem -Path $PSScriptRoot -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName }
+ Export-ModuleMember -Function (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot) -Alias (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot -AsAlias)
+# endregion
diff --git a/src/ADDomainServices/custom/New-AzADDomainService.ps1 b/src/ADDomainServices/custom/New-AzADDomainService.ps1
new file mode 100644
index 000000000000..cf0a47cb8843
--- /dev/null
+++ b/src/ADDomainServices/custom/New-AzADDomainService.ps1
@@ -0,0 +1,237 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+The Create Domain Service operation creates a new domain service with the specified parameters.
+If the specific service already exists, then any patchable properties will be updated and any immutable properties will remain unchanged.
+.Description
+The Create Domain Service operation creates a new domain service with the specified parameters.
+If the specific service already exists, then any patchable properties will be updated and any immutable properties will remain unchanged.
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IDomainService
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+REPLICASET : List of ReplicaSets
+ [Location ]: Virtual network location
+ [SubnetId ]: The name of the virtual network that Domain Services will be deployed on. The id of the subnet that Domain Services will be deployed on. /virtualNetwork/vnetName/subnets/subnetName.
+
+RESOURCEFORESTSETTING : List of settings for Resource Forest
+ [FriendlyName ]: Friendly Name
+ [RemoteDnsIP ]: Remote Dns ips
+ [TrustDirection ]: Trust Direction
+ [TrustPassword ]: Trust Password
+ [TrustedDomainFqdn ]: Trusted Domain FQDN
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.addomainservices/new-azaddomainservice
+#>
+function New-AzADDomainService {
+ [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IDomainService])]
+ [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+ param(
+ [Parameter(Mandatory)]
+ [Alias('DomainServiceName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [System.String]
+ # The name of the domain service.
+ ${Name},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [System.String]
+ # The name of the resource group within the user's subscription.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # Gets subscription credentials which uniquely identify the Microsoft Azure subscription.
+ # The subscription ID forms part of the URI for every service call.
+ ${SubscriptionId},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [ValidateSet("FullySynced", "ResourceTrusting")]
+ [System.String]
+ # Domain Configuration Type
+ ${DomainConfigurationType},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # The name of the Azure domain that the user would like to deploy Domain Services to.
+ ${DomainName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainSecuritySettings]
+ # Domain Security Settings.
+ ${DomainSecuritySetting},
+
+ [Parameter()]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Support.FilteredSync])]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [ValidateSet("Enabled", "Disabled")]
+ [System.String]
+ # Enabled or Disabled flag to turn on Group-based filtered sync
+ ${FilteredSync},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.LdapsSettings]
+ # Secure LDAP Settings.
+ ${LdapsSetting},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.NotificationSettings]
+ # Notification Settings.
+ ${NotificationSetting},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IReplicaSet[]]
+ # List of ReplicaSets
+ # To construct, see NOTES section for REPLICASET properties and create a hash table.
+ ${ReplicaSet},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ResourceForestSettings]
+ # Settings for Resource Forest.
+ ${ResourceForestSetting},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [ValidateSet("Standard", "Enterprise", "Premium")]
+ [System.String]
+ # Sku Type
+ ${Sku},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IResourceTags]))]
+ [System.Collections.Hashtable]
+ # Resource tags
+ ${Tag},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+ )
+
+ process {
+ try {
+ $PSBoundParameters['Location'] = $PSBoundParameters['ReplicaSet'][0].Location
+
+ if ($PSBoundParameters.ContainsKey('DomainSecuritySetting')) {
+ $PSBoundParameters['DomainSecuritySettingNtlmV1'] = $PSBoundParameters['DomainSecuritySetting'].NtlmV1
+ $PSBoundParameters['DomainSecuritySettingSyncKerberosPassword'] = $PSBoundParameters['DomainSecuritySetting'].SyncKerberosPassword
+ $PSBoundParameters['DomainSecuritySettingSyncNtlmPassword'] = $PSBoundParameters['DomainSecuritySetting'].SyncNtlmPassword
+ $PSBoundParameters['DomainSecuritySettingSyncOnPremPassword'] = $PSBoundParameters['DomainSecuritySetting'].SyncOnPremPassword
+ $PSBoundParameters['DomainSecuritySettingTlsV1'] = $PSBoundParameters['DomainSecuritySetting'].TlsV1
+ $null = $PSBoundParameters.Remove('DomainSecuritySetting')
+ }
+
+ if ($PSBoundParameters.ContainsKey('LdapsSetting')) {
+ $PSBoundParameters['LdapSettingExternalAccess'] = $PSBoundParameters['LdapsSetting'].ExternalAccess
+ $PSBoundParameters['LdapSettingLdap'] = $PSBoundParameters['LdapsSetting'].Ldap
+ $PSBoundParameters['LdapSettingPfxCertificate'] = $PSBoundParameters['LdapsSetting'].PfxCertificate
+ $PSBoundParameters['LdapSettingPfxCertificatePassword'] = $PSBoundParameters['LdapsSetting'].PfxCertificatePassword
+ $null = $PSBoundParameters.Remove('LdapsSetting')
+
+ }
+
+ if ($PSBoundParameters.ContainsKey('ResourceForestSetting')) {
+ $PSBoundParameters['ResourceForest'] = $PSBoundParameters['ResourceForestSetting'].ResourceForest
+ $PSBoundParameters['ForestTrust'] = $PSBoundParameters['ResourceForestSetting'].Setting
+ $null = $PSBoundParameters.Remove('ResourceForestSetting')
+ }
+
+ if ($PSBoundParameters.ContainsKey('NotificationSetting')) {
+ $PSBoundParameters['NotificationSettingAdditionalRecipient'] = $PSBoundParameters['NotificationSetting'].AdditionalRecipient
+ $PSBoundParameters['NotificationSettingNotifyDcAdmin'] = $PSBoundParameters['NotificationSetting'].NotifyDcAdmin
+ $PSBoundParameters['NotificationSettingNotifyGlobalAdmin'] = $PSBoundParameters['NotificationSetting'].NotifyGlobalAdmin
+ $null = $PSBoundParameters.Remove('NotificationSetting')
+ }
+ Az.ADDomainServices.internal\New-AzADDomainService @PSBoundParameters
+ } catch {
+ throw
+ }
+ }
+
+}
+
\ No newline at end of file
diff --git a/src/ADDomainServices/custom/New-AzADDomainServiceDomainSecuritySettingObject.ps1 b/src/ADDomainServices/custom/New-AzADDomainServiceDomainSecuritySettingObject.ps1
new file mode 100644
index 000000000000..3608e05d771d
--- /dev/null
+++ b/src/ADDomainServices/custom/New-AzADDomainServiceDomainSecuritySettingObject.ps1
@@ -0,0 +1,64 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the \"License\");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an \"AS IS\" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create a in-memory object for DomainSecuritySettings
+.Description
+Create a in-memory object for DomainSecuritySettings
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainSecuritySettings
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.ADDomainServices/new-AzADDomainServiceDomainSecuritySettingObject
+#>
+function New-AzADDomainServiceDomainSecuritySettingObject {
+ [OutputType('Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainSecuritySettings')]
+ [CmdletBinding(PositionalBinding=$false)]
+ Param(
+
+ [Parameter(HelpMessage="A flag to determine whether or not NtlmV1 is enabled or disabled.")]
+ [ValidateSet("Enabled", "Disabled")]
+ [System.String]
+ $NtlmV1,
+ [ValidateSet("Enabled", "Disabled")]
+ [System.String]
+ $SyncKerberosPassword,
+ [Parameter(HelpMessage="A flag to determine whether or not SyncNtlmPasswords is enabled or disabled.")]
+ [ValidateSet("Enabled", "Disabled")]
+ [System.String]
+ $SyncNtlmPassword,
+ [Parameter(HelpMessage="A flag to determine whether or not SyncOnPremPasswords is enabled or disabled.")]
+ [ValidateSet("Enabled", "Disabled")]
+ [System.String]
+ $SyncOnPremPassword,
+ [Parameter(HelpMessage="A flag to determine whether or not TlsV1 is enabled or disabled.")]
+ [ValidateSet("Enabled", "Disabled")]
+ [System.String]
+ $TlsV1
+ )
+
+ process {
+ $Object = [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainSecuritySettings]::New()
+
+ $Object.NtlmV1 = $NtlmV1
+ $Object.SyncKerberosPassword = $SyncKerberosPassword
+ $Object.SyncNtlmPassword = $SyncNtlmPassword
+ $Object.SyncOnPremPassword = $SyncOnPremPassword
+ $Object.TlsV1 = $TlsV1
+ return $Object
+ }
+}
+
diff --git a/src/ADDomainServices/custom/New-AzADDomainServiceLdapsSettingObject.ps1 b/src/ADDomainServices/custom/New-AzADDomainServiceLdapsSettingObject.ps1
new file mode 100644
index 000000000000..44cae9925ae1
--- /dev/null
+++ b/src/ADDomainServices/custom/New-AzADDomainServiceLdapsSettingObject.ps1
@@ -0,0 +1,66 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the \"License\");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an \"AS IS\" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create a in-memory object for LdapsSettings
+.Description
+Create a in-memory object for LdapsSettings
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.LdapsSettings
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.ADDomainServices/new-AzADDomainServiceLdapsSettingObject
+#>
+function New-AzADDomainServiceLdapsSettingObject {
+ [OutputType('Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.LdapsSettings')]
+ [CmdletBinding(PositionalBinding=$false)]
+ Param(
+
+ [Parameter(HelpMessage="A flag to determine whether or not Secure LDAP access over the internet is enabled or disabled.")]
+ [ValidateSet("Enabled", "Disabled")]
+ [System.String]
+ $ExternalAccess,
+ [Parameter(HelpMessage="A flag to determine whether or not Secure LDAP is enabled or disabled.")]
+ [ValidateSet("Enabled", "Disabled")]
+ [System.String]
+ $Ldaps,
+ [Parameter(HelpMessage="The path of certificate required to configure Secure LDAP.")]
+ [System.String]
+ $PfxCertificatePath,
+ [Parameter(HelpMessage="The password to decrypt the provided Secure LDAP certificate pfx file.")]
+ [System.Security.SecureString]
+ $PfxCertificatePassword
+ )
+
+ process {
+ $Object = [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.LdapsSettings]::New()
+
+ $Object.ExternalAccess = $ExternalAccess
+ $Object.Ldap = $Ldaps
+ if ($PfxCertificatePath -and (Test-Path $PfxCertificatePath)) {
+ $temp = Get-Content -Path $PfxCertificatePath -Encoding Byte
+ $PfxCertificate = [System.Convert]::ToBase64String($temp)
+ $Object.PfxCertificate = $PfxCertificate
+ }
+ if ($PfxCertificatePassword) {
+ $psTxt = . "$PSScriptRoot/../utils/Unprotect-SecureString.ps1" $PfxCertificatePassword
+ $Object.PfxCertificatePassword = $psTxt
+ }
+
+ return $Object
+ }
+}
+
diff --git a/src/ADDomainServices/custom/New-AzADDomainServiceNotificationSettingObject.ps1 b/src/ADDomainServices/custom/New-AzADDomainServiceNotificationSettingObject.ps1
new file mode 100644
index 000000000000..a2e3f295b7a3
--- /dev/null
+++ b/src/ADDomainServices/custom/New-AzADDomainServiceNotificationSettingObject.ps1
@@ -0,0 +1,54 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the \"License\");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an \"AS IS\" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create a in-memory object for NotificationSettings
+.Description
+Create a in-memory object for NotificationSettings
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.NotificationSettings
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.ADDomainServices/new-AzADDomainServiceNotificationSettingObject
+#>
+function New-AzADDomainServiceNotificationSettingObject {
+ [OutputType('Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.NotificationSettings')]
+ [CmdletBinding(PositionalBinding=$false)]
+ Param(
+
+ [Parameter(HelpMessage="The list of additional recipients.")]
+ [string[]]
+ $AdditionalRecipient,
+ [Parameter(HelpMessage="Should domain controller admins be notified.")]
+ [ValidateSet("Enabled", "Disabled")]
+ [System.String]
+ $NotifyDcAdmin,
+ [Parameter(HelpMessage="Should global admins be notified.")]
+ [ValidateSet("Enabled", "Disabled")]
+ [System.String]
+ $NotifyGlobalAdmin
+ )
+
+ process {
+ $Object = [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.NotificationSettings]::New()
+
+ $Object.AdditionalRecipient = $AdditionalRecipient
+ $Object.NotifyDcAdmin = $NotifyDcAdmin
+ $Object.NotifyGlobalAdmin = $NotifyGlobalAdmin
+ return $Object
+ }
+}
+
diff --git a/src/ADDomainServices/custom/New-AzADDomainServiceReplicaSetObject.ps1 b/src/ADDomainServices/custom/New-AzADDomainServiceReplicaSetObject.ps1
new file mode 100644
index 000000000000..f09de9532c86
--- /dev/null
+++ b/src/ADDomainServices/custom/New-AzADDomainServiceReplicaSetObject.ps1
@@ -0,0 +1,48 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the \"License\");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an \"AS IS\" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create a in-memory object for ReplicaSet
+.Description
+Create a in-memory object for ReplicaSet
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ReplicaSet
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.ADDomainServices/new-AzADDomainServiceReplicaSetObject
+#>
+function New-AzADDomainServiceReplicaSetObject {
+ [OutputType('Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ReplicaSet')]
+ [CmdletBinding(PositionalBinding=$false)]
+ Param(
+
+ [Parameter(HelpMessage="Virtual network location.")]
+ [string]
+ $Location,
+ [Parameter(HelpMessage="The name of the virtual network that Domain Services will be deployed on. The id of the subnet that Domain Services will be deployed on. /virtualNetwork/vnetName/subnets/subnetName.")]
+ [string]
+ $SubnetId
+ )
+
+ process {
+ $Object = [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ReplicaSet]::New()
+
+ $Object.Location = $Location
+ $Object.SubnetId = $SubnetId
+ return $Object
+ }
+}
+
diff --git a/src/ADDomainServices/custom/New-AzADDomainServiceResourceForestSettingObject.ps1 b/src/ADDomainServices/custom/New-AzADDomainServiceResourceForestSettingObject.ps1
new file mode 100644
index 000000000000..e01d634e80a6
--- /dev/null
+++ b/src/ADDomainServices/custom/New-AzADDomainServiceResourceForestSettingObject.ps1
@@ -0,0 +1,48 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the \"License\");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an \"AS IS\" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create a in-memory object for ResourceForestSettings
+.Description
+Create a in-memory object for ResourceForestSettings
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ResourceForestSettings
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.ADDomainServices/new-AzADDomainServiceResourceForestSettingObject
+#>
+function New-AzADDomainServiceResourceForestSettingObject {
+ [OutputType('Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ResourceForestSettings')]
+ [CmdletBinding(PositionalBinding=$false)]
+ Param(
+
+ [Parameter(HelpMessage="Resource Forest.")]
+ [string]
+ $ResourceForest,
+ [Parameter(HelpMessage="List of settings for Resource Forest.")]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IForestTrust[]]
+ $ForestTrust
+ )
+
+ process {
+ $Object = [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ResourceForestSettings]::New()
+
+ $Object.ResourceForest = $ResourceForest
+ $Object.Setting = $ForestTrust
+ return $Object
+ }
+}
+
diff --git a/src/ADDomainServices/custom/Update-AzADDomainService.ps1 b/src/ADDomainServices/custom/Update-AzADDomainService.ps1
new file mode 100644
index 000000000000..0883a7f887f8
--- /dev/null
+++ b/src/ADDomainServices/custom/Update-AzADDomainService.ps1
@@ -0,0 +1,244 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+The Update Domain Service operation can be used to update the existing deployment.
+The update call only supports the properties listed in the PATCH body.
+.Description
+The Update Domain Service operation can be used to update the existing deployment.
+The update call only supports the properties listed in the PATCH body.
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IAdDomainServicesIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IDomainService
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [DomainServiceName ]: The name of the domain service.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group within the user's subscription. The name is case insensitive.
+ [SubscriptionId ]: Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
+
+REPLICASET : List of ReplicaSets
+ [Location ]: Virtual network location
+ [SubnetId ]: The name of the virtual network that Domain Services will be deployed on. The id of the subnet that Domain Services will be deployed on. /virtualNetwork/vnetName/subnets/subnetName.
+
+RESOURCEFORESTSETTING : List of settings for Resource Forest
+ [FriendlyName ]: Friendly Name
+ [RemoteDnsIP ]: Remote Dns ips
+ [TrustDirection ]: Trust Direction
+ [TrustPassword ]: Trust Password
+ [TrustedDomainFqdn ]: Trusted Domain FQDN
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.addomainservices/update-azaddomainservice
+#>
+function Update-AzADDomainService {
+ [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IDomainService])]
+ [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+ param(
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Alias('DomainServiceName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [System.String]
+ # The name of the domain service.
+ ${Name},
+
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [System.String]
+ # The name of the resource group within the user's subscription.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # Gets subscription credentials which uniquely identify the Microsoft Azure subscription.
+ # The subscription ID forms part of the URI for every service call.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IAdDomainServicesIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [ValidateSet("FullySynced", "ResourceTrusting")]
+ [System.String]
+ # Domain Configuration Type
+ ${DomainConfigurationType},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainSecuritySettings]
+ # Domain Security Settings.
+ ${DomainSecuritySetting},
+
+ [Parameter()]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Support.FilteredSync])]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [ValidateSet("Enabled", "Disabled")]
+ [System.String]
+ # Enabled or Disabled flag to turn on Group-based filtered sync
+ ${FilteredSync},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.LdapsSettings]
+ # Secure LDAP Settings.
+ ${LdapsSetting},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.NotificationSettings]
+ # Notification Settings.
+ ${NotificationSetting},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IReplicaSet[]]
+ # List of ReplicaSets
+ # To construct, see NOTES section for REPLICASET properties and create a hash table.
+ ${ReplicaSet},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ResourceForestSettings]
+ # Settings for Resource Forest.
+ ${ResourceForestSetting},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [ValidateSet("Standard", "Enterprise", "Premium")]
+ [System.String]
+ # Sku Type
+ ${Sku},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IResourceTags]))]
+ [System.Collections.Hashtable]
+ # Resource tags
+ ${Tag},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+ )
+
+ process {
+ try {
+ if ($PSBoundParameters.ContainsKey('DomainSecuritySetting')) {
+ $PSBoundParameters['DomainSecuritySettingNtlmV1'] = $PSBoundParameters['DomainSecuritySetting'].NtlmV1
+ $PSBoundParameters['DomainSecuritySettingSyncKerberosPassword'] = $PSBoundParameters['DomainSecuritySetting'].SyncKerberosPassword
+ $PSBoundParameters['DomainSecuritySettingSyncNtlmPassword'] = $PSBoundParameters['DomainSecuritySetting'].SyncNtlmPassword
+ $PSBoundParameters['DomainSecuritySettingSyncOnPremPassword'] = $PSBoundParameters['DomainSecuritySetting'].SyncOnPremPassword
+ $PSBoundParameters['DomainSecuritySettingTlsV1'] = $PSBoundParameters['DomainSecuritySetting'].TlsV1
+ $null = $PSBoundParameters.Remove('DomainSecuritySetting')
+ }
+
+ if ($PSBoundParameters.ContainsKey('LdapsSetting')) {
+ $PSBoundParameters['LdapSettingExternalAccess'] = $PSBoundParameters['LdapsSetting'].ExternalAccess
+ $PSBoundParameters['LdapSettingLdap'] = $PSBoundParameters['LdapsSetting'].Ldap
+ $PSBoundParameters['LdapSettingPfxCertificate'] = $PSBoundParameters['LdapsSetting'].PfxCertificate
+ $PSBoundParameters['LdapSettingPfxCertificatePassword'] = $PSBoundParameters['LdapsSetting'].PfxCertificatePassword
+ $null = $PSBoundParameters.Remove('LdapsSetting')
+
+ }
+
+ if ($PSBoundParameters.ContainsKey('ResourceForestSetting')) {
+ $PSBoundParameters['ResourceForest'] = $PSBoundParameters['ResourceForestSetting'].ResourceForest
+ $PSBoundParameters['ForestTrust'] = $PSBoundParameters['ResourceForestSetting'].Setting
+ $null = $PSBoundParameters.Remove('ResourceForestSetting')
+ }
+
+ if ($PSBoundParameters.ContainsKey('NotificationSetting')) {
+ $PSBoundParameters['NotificationSettingAdditionalRecipient'] = $PSBoundParameters['NotificationSetting'].AdditionalRecipient
+ $PSBoundParameters['NotificationSettingNotifyDcAdmin'] = $PSBoundParameters['NotificationSetting'].NotifyDcAdmin
+ $PSBoundParameters['NotificationSettingNotifyGlobalAdmin'] = $PSBoundParameters['NotificationSetting'].NotifyGlobalAdmin
+ $null = $PSBoundParameters.Remove('NotificationSetting')
+ }
+ Az.ADDomainServices.internal\Update-AzADDomainService @PSBoundParameters
+ } catch {
+ throw
+ }
+ }
+}
+
+
\ No newline at end of file
diff --git a/src/ADDomainServices/custom/readme.md b/src/ADDomainServices/custom/readme.md
new file mode 100644
index 000000000000..db0ba82de429
--- /dev/null
+++ b/src/ADDomainServices/custom/readme.md
@@ -0,0 +1,41 @@
+# Custom
+This directory contains custom implementation for non-generated cmdlets for the `Az.ADDomainServices` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `..\exports` folder. The only generated file into this folder is the `Az.ADDomainServices.custom.psm1`. This file should not be modified.
+
+## Info
+- Modifiable: yes
+- Generated: partial
+- Committed: yes
+- Packaged: yes
+
+## Details
+For `Az.ADDomainServices` to use custom cmdlets, it does this two different ways. We **highly recommend** creating script cmdlets, as they are easier to write and allow access to the other exported cmdlets. C# cmdlets *cannot access exported cmdlets*.
+
+For C# cmdlets, they are compiled with the rest of the generated low-level cmdlets into the `./bin/Az.ADDomainServices.private.dll`. The names of the cmdlets (methods) and files must follow the `[cmdletName]_[variantName]` syntax used for generated cmdlets. The `variantName` is used as the `ParameterSetName`, so use something appropriate that doesn't clash with already created variant or parameter set names. You cannot use the `ParameterSetName` property in the `Parameter` attribute on C# cmdlets. Each cmdlet must be separated into variants using the same pattern as seen in the `generated/cmdlets` folder.
+
+For script cmdlets, these are loaded via the `Az.ADDomainServices.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundemental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build.
+
+## Purpose
+This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder.
+
+## Usage
+The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `..\exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters:
+- Break
+- DefaultProfile
+- HttpPipelineAppend
+- HttpPipelinePrepend
+- Proxy
+- ProxyCredential
+- ProxyUseDefaultCredentials
+
+These provide functionality to our HTTP pipeline and other useful features. In script, you can forward these parameters using `$PSBoundParameters` to the other cmdlets you're calling within `Az.ADDomainServices`. For C#, follow the usage seen in the `ProcessRecordAsync` method.
+
+### Attributes
+For processing the cmdlets, we've created some additional attributes:
+- `Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.DescriptionAttribute`
+ - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propegated to reference documentation via [help comments](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts.
+- `Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.DoNotExportAttribute`
+ - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.ADDomainServices`.
+- `Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.InternalExportAttribute`
+ - Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.ADDomainServices`. For more information, see [readme.md](..\internal/readme.md) in the `..\internal` folder.
+- `Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.ProfileAttribute`
+ - Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules.
\ No newline at end of file
diff --git a/src/ADDomainServices/examples/Get-AzADDomainService.md b/src/ADDomainServices/examples/Get-AzADDomainService.md
new file mode 100644
index 000000000000..88617b0a9c14
--- /dev/null
+++ b/src/ADDomainServices/examples/Get-AzADDomainService.md
@@ -0,0 +1,44 @@
+### Example 1: Get All ADDomainService By default
+```powershell
+PS C:\> Get-AzADDomainService
+
+Name Domain Name Location Sku
+---- ----------- -------- ---
+youriADdomain youriAddomain.com westus Enterprise
+```
+
+Get All ADDomainService By default
+
+### Example 2: Get ADDomainService By ResourceGroup and name
+```powershell
+PS C:\> Get-AzADDomainService -Name youriADdomain -ResourceGroupName youriADdomain
+
+Name Domain Name Location Sku
+---- ----------- -------- ---
+youriADdomain youriAddomain.com westus Enterprise
+```
+
+Get ADDomainService By ResourceGroup and name
+
+### Example 3: Get all ADDomainService By ResourceGroup
+```powershell
+PS C:\> Get-AzADDomainService -ResourceGroupName youriADdomain
+
+Name Domain Name Location Sku
+---- ----------- -------- ---
+youriADdomain youriAddomain.com westus Enterprise
+```
+
+Get all ADDomainService By ResourceGroup
+
+### Example 4: Get ADDomainService By InputObject
+```powershell
+PS C:\> $getAzAddomain = Get-AzADDomainService -Name youriADdomain -ResourceGroupName youriADdomain
+Get-AzADDomainService -InputObject $getAzAddomain
+
+Name Domain Name Location Sku
+---- ----------- -------- ---
+youriADdomain youriAddomain.com westus Enterprise
+```
+
+Get ADDomainService By InputObject
\ No newline at end of file
diff --git a/src/ADDomainServices/examples/New-AzADDomainService.md b/src/ADDomainServices/examples/New-AzADDomainService.md
new file mode 100644
index 000000000000..726e0d037de0
--- /dev/null
+++ b/src/ADDomainServices/examples/New-AzADDomainService.md
@@ -0,0 +1,13 @@
+### Example 1: Create new ADDomainService
+```powershell
+PS C:\> $replicaSet = New-AzADDomainServiceReplicaSetObject -Location westus -SubnetId /subscriptions/********-****-****-****-**********/resourceGroups/yishitest/providers/Microsoft.Network/virtualNetworks/aadds-vnet/subnets/default
+New-AzADDomainService -name youriADdomain -ResourceGroupName youriAddomain -DomainName youriAddomain.com -ReplicaSet $replicaSet -debug
+
+Name Domain Name Location Sku
+---- ----------- -------- ---
+youriADdomain youriAddomain.com westus Enterprise
+```
+
+Create new ADDomainService
+
+
diff --git a/src/ADDomainServices/examples/New-AzADDomainServiceDomainSecuritySettingObject.md b/src/ADDomainServices/examples/New-AzADDomainServiceDomainSecuritySettingObject.md
new file mode 100644
index 000000000000..35a049805aaf
--- /dev/null
+++ b/src/ADDomainServices/examples/New-AzADDomainServiceDomainSecuritySettingObject.md
@@ -0,0 +1,11 @@
+### Example 1: Create SecuritySetting for ADDOmain
+```powershell
+PS C:\> New-AzADDomainServiceDomainSecuritySettingObject -NtlmV1 Disabled -SyncKerberosPassword Disabled -SyncNtlmPassword Disabled -SyncOnPremPassword Disabled -TlsV1 Disabled
+
+NtlmV1 SyncKerberosPassword SyncNtlmPassword SyncOnPremPassword TlsV1
+------ -------------------- ---------------- ------------------ -----
+Disabled Disabled Disabled Disabled Disabled
+```
+
+Create SecuritySetting for ADDOmain
+
diff --git a/src/ADDomainServices/examples/New-AzADDomainServiceLdapsSettingObject.md b/src/ADDomainServices/examples/New-AzADDomainServiceLdapsSettingObject.md
new file mode 100644
index 000000000000..d88c498e8971
--- /dev/null
+++ b/src/ADDomainServices/examples/New-AzADDomainServiceLdapsSettingObject.md
@@ -0,0 +1,12 @@
+### Example 1: Create LdapsSetting for AzADDomain
+```powershell
+PS C:\> $secstr = ConvertTo-SecureString -String 'Password' -AsPlainText -Force
+New-AzADDomainServiceLdapsSettingObject -ExternalAccess Enabled -Ldaps Enabled -PfxCertificatePath sahg -PfxCertificatePassword $secstr
+
+CertificateNotAfter CertificateThumbprint ExternalAccess Ldaps PfxCertificate PfxCertificatePassword PublicCertificate
+------------------- --------------------- -------------- ---- -------------- ---------------------- -----------------
+ Enabled Enabled Password
+```
+
+Create LdapsSetting for AzADDomain
+
diff --git a/src/ADDomainServices/examples/New-AzADDomainServiceNotificationSettingObject.md b/src/ADDomainServices/examples/New-AzADDomainServiceNotificationSettingObject.md
new file mode 100644
index 000000000000..86c58f57c0a8
--- /dev/null
+++ b/src/ADDomainServices/examples/New-AzADDomainServiceNotificationSettingObject.md
@@ -0,0 +1,11 @@
+### Example 1: Create NotificationSetting for AzADDomain
+```powershell
+PS C:\> New-AzADDomainServiceNotificationSettingObject -AdditionalRecipient test@microsoft.com -NotifyDcAdmin Enabled -NotifyGlobalAdmin Enabled
+
+AdditionalRecipient NotifyDcAdmin NotifyGlobalAdmin
+------------------- ------------- -----------------
+{test@microsoft.com} Enabled Enabled
+```
+
+Create NotificationSetting for AzADDomain
+
diff --git a/src/ADDomainServices/examples/New-AzADDomainServiceReplicaSetObject.md b/src/ADDomainServices/examples/New-AzADDomainServiceReplicaSetObject.md
new file mode 100644
index 000000000000..4d6714836b76
--- /dev/null
+++ b/src/ADDomainServices/examples/New-AzADDomainServiceReplicaSetObject.md
@@ -0,0 +1,12 @@
+### Example 1: Create ReplicaSet for AzADDomain
+```powershell
+PS C:\> New-AzADDomainServiceReplicaSetObject -Location westus -SubnetId /subscriptions/********-****-****-****-**********/resourceGroups/youritest/providers/Microsoft.Network/virtualNetworks/aadds-vnet/subnets/default
+
+DomainControllerIPAddress ExternalAccessIPAddress HealthLastEvaluated Location ServiceStatus SubnetId
+------------------------- ----------------------- ------------------- -------- ------------- --------
+ westus /subscriptions/********-****-****-****-**********/resourceGroups/youritest/providers/Microsoft.Network…
+```
+
+Create ReplicaSet for AzADDomain
+
+
diff --git a/src/ADDomainServices/examples/New-AzADDomainServiceResourceForestSettingObject.md b/src/ADDomainServices/examples/New-AzADDomainServiceResourceForestSettingObject.md
new file mode 100644
index 000000000000..458c6b70742d
--- /dev/null
+++ b/src/ADDomainServices/examples/New-AzADDomainServiceResourceForestSettingObject.md
@@ -0,0 +1,10 @@
+### Example 1: Generate ForestSetting for ADDomain
+```powershell
+PS C:\> New-AzADDomainServiceResourceForestSettingObject -ResourceForest resourcetest
+
+ResourceForest
+--------------
+resourcetest
+```
+
+Generate ForestSetting for ADDomain
diff --git a/src/ADDomainServices/examples/Remove-AzADDomainService.md b/src/ADDomainServices/examples/Remove-AzADDomainService.md
new file mode 100644
index 000000000000..c5b176496a3c
--- /dev/null
+++ b/src/ADDomainServices/examples/Remove-AzADDomainService.md
@@ -0,0 +1,17 @@
+### Example 1: Delete the AzADDomain by ResourceGroupName and Name
+```powershell
+PS C:\> Remove-AzADDomainService -ResourceGroupName $env.ResourceGroupName -Name $env.ADdomainName
+
+```
+
+Delete the AzADDomain by ResourceGroupName and Name
+
+### Example 2: Delete the AzADDomain by InputObject
+```powershell
+PS C:\> $GetADDomainExample = Get-AzADDomainService -ResourceGroupName $env.ResourceGroupName -Name $env.ADdomainName
+Remove-AzADDomainService -InputObject $GetADDomainExample
+
+```
+
+Delete the AzADDomain by InputObject
+
diff --git a/src/ADDomainServices/examples/Update-AzADDomainService.md b/src/ADDomainServices/examples/Update-AzADDomainService.md
new file mode 100644
index 000000000000..ac568630e3b5
--- /dev/null
+++ b/src/ADDomainServices/examples/Update-AzADDomainService.md
@@ -0,0 +1,24 @@
+### Example 1: Update AzADDomainService By ResourceGroupName and Name
+```powershell
+PS C:\> $ADDomainSetting = New-AzADDomainServiceDomainSecuritySettingObject -TlsV1 Disabled
+Update-AzADDomainService -Name youriADdomain -ResourceGroupName youriADdomain -DomainSecuritySetting $ADDomainSetting
+
+Name Domain Name Location Sku
+---- ----------- -------- ---
+youriADdomain youriAddomain.com westus Enterprise
+```
+
+Update AzADDomainService By ResourceGroupName and Name
+
+### Example 2: Update AzADDomainService By Inputobject
+```powershell
+PS C:\> $getAzAddomain = Get-AzADDomainService -Name youriADdomain -ResourceGroupName youriADdomain
+$ADDomainSetting = New-AzADDomainServiceDomainSecuritySettingObject -TlsV1 Disabled
+Update-AzADDomainService -InputObject $getAzAddomain -DomainSecuritySetting $ADDomainSetting
+
+Name Domain Name Location Sku
+---- ----------- -------- ---
+youriADdomain youriAddomain.com westus Enterprise
+```
+
+Update AzADDomainService By Inputobject
diff --git a/src/ADDomainServices/export-surface.ps1 b/src/ADDomainServices/export-surface.ps1
new file mode 100644
index 000000000000..31ac327afd2f
--- /dev/null
+++ b/src/ADDomainServices/export-surface.ps1
@@ -0,0 +1,40 @@
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+param([switch]$Isolated, [switch]$IncludeGeneralParameters, [switch]$UseExpandedFormat)
+$ErrorActionPreference = 'Stop'
+
+$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+if(-not $Isolated) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ return
+}
+
+$dll = Join-Path $PSScriptRoot 'bin\Az.ADDomainServices.private.dll'
+if(-not (Test-Path $dll)) {
+ Write-Error "Unable to find output assembly in '$binFolder'."
+}
+$null = Import-Module -Name $dll
+
+$moduleName = 'Az.ADDomainServices'
+$exportsFolder = Join-Path $PSScriptRoot 'exports'
+$resourcesFolder = Join-Path $PSScriptRoot 'resources'
+
+Export-CmdletSurface -ModuleName $moduleName -CmdletFolder $exportsFolder -OutputFolder $resourcesFolder -IncludeGeneralParameters $IncludeGeneralParameters.IsPresent -UseExpandedFormat $UseExpandedFormat.IsPresent
+Write-Host -ForegroundColor Green "CmdletSurface file(s) created in '$resourcesFolder'"
+
+Export-ModelSurface -OutputFolder $resourcesFolder -UseExpandedFormat $UseExpandedFormat.IsPresent
+Write-Host -ForegroundColor Green "ModelSurface file created in '$resourcesFolder'"
+
+Write-Host -ForegroundColor Green '-------------Done-------------'
\ No newline at end of file
diff --git a/src/ADDomainServices/exports/Get-AzADDomainService.ps1 b/src/ADDomainServices/exports/Get-AzADDomainService.ps1
new file mode 100644
index 000000000000..2a8d816017b1
--- /dev/null
+++ b/src/ADDomainServices/exports/Get-AzADDomainService.ps1
@@ -0,0 +1,188 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+The Get Domain Service operation retrieves a json representation of the Domain Service.
+.Description
+The Get Domain Service operation retrieves a json representation of the Domain Service.
+.Example
+PS C:\> Get-AzADDomainService
+
+Name Domain Name Location Sku
+---- ----------- -------- ---
+youriADdomain youriAddomain.com westus Enterprise
+.Example
+PS C:\> Get-AzADDomainService -Name youriADdomain -ResourceGroupName youriADdomain
+
+Name Domain Name Location Sku
+---- ----------- -------- ---
+youriADdomain youriAddomain.com westus Enterprise
+.Example
+PS C:\> Get-AzADDomainService -ResourceGroupName youriADdomain
+
+Name Domain Name Location Sku
+---- ----------- -------- ---
+youriADdomain youriAddomain.com westus Enterprise
+.Example
+PS C:\> $getAzAddomain = Get-AzADDomainService -Name youriADdomain -ResourceGroupName youriADdomain
+Get-AzADDomainService -InputObject $getAzAddomain
+
+Name Domain Name Location Sku
+---- ----------- -------- ---
+youriADdomain youriAddomain.com westus Enterprise
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IAdDomainServicesIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IDomainService
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [DomainServiceName ]: The name of the domain service.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group within the user's subscription. The name is case insensitive.
+ [SubscriptionId ]: Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.addomainservices/get-azaddomainservice
+#>
+function Get-AzADDomainService {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IDomainService])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('DomainServiceName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [System.String]
+ # The name of the domain service.
+ ${Name},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List1', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [System.String]
+ # The name of the resource group within the user's subscription.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Parameter(ParameterSetName='List1')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # Gets subscription credentials which uniquely identify the Microsoft Azure subscription.
+ # The subscription ID forms part of the URI for every service call.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IAdDomainServicesIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ Get = 'Az.ADDomainServices.private\Get-AzADDomainService_Get';
+ GetViaIdentity = 'Az.ADDomainServices.private\Get-AzADDomainService_GetViaIdentity';
+ List = 'Az.ADDomainServices.private\Get-AzADDomainService_List';
+ List1 = 'Az.ADDomainServices.private\Get-AzADDomainService_List1';
+ }
+ if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
diff --git a/src/ADDomainServices/exports/New-AzADDomainService.ps1 b/src/ADDomainServices/exports/New-AzADDomainService.ps1
new file mode 100644
index 000000000000..3fc1f4dac710
--- /dev/null
+++ b/src/ADDomainServices/exports/New-AzADDomainService.ps1
@@ -0,0 +1,261 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+The Create Domain Service operation creates a new domain service with the specified parameters.
+If the specific service already exists, then any patchable properties will be updated and any immutable properties will remain unchanged.
+.Description
+The Create Domain Service operation creates a new domain service with the specified parameters.
+If the specific service already exists, then any patchable properties will be updated and any immutable properties will remain unchanged.
+.Example
+PS C:\> $replicaSet = New-AzADDomainServiceReplicaSetObject -Location westus -SubnetId /subscriptions/********-****-****-****-**********/resourceGroups/yishitest/providers/Microsoft.Network/virtualNetworks/aadds-vnet/subnets/default
+New-AzADDomainService -name youriADdomain -ResourceGroupName youriAddomain -DomainName youriAddomain.com -ReplicaSet $replicaSet -debug
+
+Name Domain Name Location Sku
+---- ----------- -------- ---
+youriADdomain youriAddomain.com westus Enterprise
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IDomainService
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+DOMAINSECURITYSETTING : Domain Security Settings.
+ [NtlmV1 ]: A flag to determine whether or not NtlmV1 is enabled or disabled.
+ [SyncKerberosPassword ]: A flag to determine whether or not SyncKerberosPasswords is enabled or disabled.
+ [SyncNtlmPassword ]: A flag to determine whether or not SyncNtlmPasswords is enabled or disabled.
+ [SyncOnPremPassword ]: A flag to determine whether or not SyncOnPremPasswords is enabled or disabled.
+ [TlsV1 ]: A flag to determine whether or not TlsV1 is enabled or disabled.
+
+LDAPSSETTING : Secure LDAP Settings.
+ [ExternalAccess ]: A flag to determine whether or not Secure LDAP access over the internet is enabled or disabled.
+ [Ldap ]: A flag to determine whether or not Secure LDAP is enabled or disabled.
+ [PfxCertificate ]: The certificate required to configure Secure LDAP. The parameter passed here should be a base64encoded representation of the certificate pfx file.
+ [PfxCertificatePassword ]: The password to decrypt the provided Secure LDAP certificate pfx file.
+
+NOTIFICATIONSETTING : Notification Settings.
+ [AdditionalRecipient ]: The list of additional recipients
+ [NotifyDcAdmin ]: Should domain controller admins be notified
+ [NotifyGlobalAdmin ]: Should global admins be notified
+
+REPLICASET : List of ReplicaSets
+ [Location ]: Virtual network location
+ [SubnetId ]: The name of the virtual network that Domain Services will be deployed on. The id of the subnet that Domain Services will be deployed on. /virtualNetwork/vnetName/subnets/subnetName.
+
+RESOURCEFORESTSETTING : Settings for Resource Forest.
+ [ResourceForest ]: Resource Forest
+ [Setting ]: List of settings for Resource Forest
+ [FriendlyName ]: Friendly Name
+ [RemoteDnsIP ]: Remote Dns ips
+ [TrustDirection ]: Trust Direction
+ [TrustPassword ]: Trust Password
+ [TrustedDomainFqdn ]: Trusted Domain FQDN
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.addomainservices/new-azaddomainservice
+#>
+function New-AzADDomainService {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IDomainService])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(Mandatory)]
+ [Alias('DomainServiceName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [System.String]
+ # The name of the domain service.
+ ${Name},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [System.String]
+ # The name of the resource group within the user's subscription.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # Gets subscription credentials which uniquely identify the Microsoft Azure subscription.
+ # The subscription ID forms part of the URI for every service call.
+ ${SubscriptionId},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # The name of the Azure domain that the user would like to deploy Domain Services to.
+ ${DomainName},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IReplicaSet[]]
+ # List of ReplicaSets
+ # To construct, see NOTES section for REPLICASET properties and create a hash table.
+ ${ReplicaSet},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # Domain Configuration Type
+ ${DomainConfigurationType},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainSecuritySettings]
+ # Domain Security Settings.
+ # To construct, see NOTES section for DOMAINSECURITYSETTING properties and create a hash table.
+ ${DomainSecuritySetting},
+
+ [Parameter()]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Support.FilteredSync])]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # Enabled or Disabled flag to turn on Group-based filtered sync
+ ${FilteredSync},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.LdapsSettings]
+ # Secure LDAP Settings.
+ # To construct, see NOTES section for LDAPSSETTING properties and create a hash table.
+ ${LdapsSetting},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.NotificationSettings]
+ # Notification Settings.
+ # To construct, see NOTES section for NOTIFICATIONSETTING properties and create a hash table.
+ ${NotificationSetting},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ResourceForestSettings]
+ # Settings for Resource Forest.
+ # To construct, see NOTES section for RESOURCEFORESTSETTING properties and create a hash table.
+ ${ResourceForestSetting},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # Sku Type
+ ${Sku},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IResourceTags]))]
+ [System.Collections.Hashtable]
+ # Resource tags
+ ${Tag},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ CreateExpanded = 'Az.ADDomainServices.custom\New-AzADDomainService';
+ }
+ if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
diff --git a/src/ADDomainServices/exports/New-AzADDomainServiceDomainSecuritySettingObject.ps1 b/src/ADDomainServices/exports/New-AzADDomainServiceDomainSecuritySettingObject.ps1
new file mode 100644
index 000000000000..6c3d1beb9322
--- /dev/null
+++ b/src/ADDomainServices/exports/New-AzADDomainServiceDomainSecuritySettingObject.ps1
@@ -0,0 +1,101 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create a in-memory object for DomainSecuritySettings
+.Description
+Create a in-memory object for DomainSecuritySettings
+.Example
+PS C:\> New-AzADDomainServiceDomainSecuritySettingObject -NtlmV1 Disabled -SyncKerberosPassword Disabled -SyncNtlmPassword Disabled -SyncOnPremPassword Disabled -TlsV1 Disabled
+
+NtlmV1 SyncKerberosPassword SyncNtlmPassword SyncOnPremPassword TlsV1
+------ -------------------- ---------------- ------------------ -----
+Disabled Disabled Disabled Disabled Disabled
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainSecuritySettings
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.ADDomainServices/new-AzADDomainServicesDomainSecuritySettingsObject
+#>
+function New-AzADDomainServiceDomainSecuritySettingObject {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainSecuritySettings])]
+[CmdletBinding(PositionalBinding=$false)]
+param(
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # A flag to determine whether or not NtlmV1 is enabled or disabled.
+ ${NtlmV1},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ ${SyncKerberosPassword},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # A flag to determine whether or not SyncNtlmPasswords is enabled or disabled.
+ ${SyncNtlmPassword},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # A flag to determine whether or not SyncOnPremPasswords is enabled or disabled.
+ ${SyncOnPremPassword},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # A flag to determine whether or not TlsV1 is enabled or disabled.
+ ${TlsV1}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ __AllParameterSets = 'Az.ADDomainServices.custom\New-AzADDomainServiceDomainSecuritySettingObject';
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
diff --git a/src/ADDomainServices/exports/New-AzADDomainServiceLdapsSettingObject.ps1 b/src/ADDomainServices/exports/New-AzADDomainServiceLdapsSettingObject.ps1
new file mode 100644
index 000000000000..dc6f909bfdd1
--- /dev/null
+++ b/src/ADDomainServices/exports/New-AzADDomainServiceLdapsSettingObject.ps1
@@ -0,0 +1,97 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create a in-memory object for LdapsSettings
+.Description
+Create a in-memory object for LdapsSettings
+.Example
+PS C:\> $secstr = ConvertTo-SecureString -String 'Password' -AsPlainText -Force
+New-AzADDomainServiceLdapsSettingObject -ExternalAccess Enabled -Ldaps Enabled -PfxCertificatePath sahg -PfxCertificatePassword $secstr
+
+CertificateNotAfter CertificateThumbprint ExternalAccess Ldaps PfxCertificate PfxCertificatePassword PublicCertificate
+------------------- --------------------- -------------- ---- -------------- ---------------------- -----------------
+ Enabled Enabled Password
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.LdapsSettings
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.ADDomainServices/new-AzADDomainServicesLdapsSettingsObject
+#>
+function New-AzADDomainServiceLdapsSettingObject {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.LdapsSettings])]
+[CmdletBinding(PositionalBinding=$false)]
+param(
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # A flag to determine whether or not Secure LDAP access over the internet is enabled or disabled.
+ ${ExternalAccess},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # A flag to determine whether or not Secure LDAP is enabled or disabled.
+ ${Ldaps},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # The path of certificate required to configure Secure LDAP.
+ ${PfxCertificatePath},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.Security.SecureString]
+ # The password to decrypt the provided Secure LDAP certificate pfx file.
+ ${PfxCertificatePassword}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ __AllParameterSets = 'Az.ADDomainServices.custom\New-AzADDomainServiceLdapsSettingObject';
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
diff --git a/src/ADDomainServices/exports/New-AzADDomainServiceNotificationSettingObject.ps1 b/src/ADDomainServices/exports/New-AzADDomainServiceNotificationSettingObject.ps1
new file mode 100644
index 000000000000..aadcd44a3a97
--- /dev/null
+++ b/src/ADDomainServices/exports/New-AzADDomainServiceNotificationSettingObject.ps1
@@ -0,0 +1,90 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create a in-memory object for NotificationSettings
+.Description
+Create a in-memory object for NotificationSettings
+.Example
+PS C:\> New-AzADDomainServiceNotificationSettingObject -AdditionalRecipient test@microsoft.com -NotifyDcAdmin Enabled -NotifyGlobalAdmin Enabled
+
+AdditionalRecipient NotifyDcAdmin NotifyGlobalAdmin
+------------------- ------------- -----------------
+{test@microsoft.com} Enabled Enabled
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.NotificationSettings
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.ADDomainServices/new-AzADDomainServicesNotificationSettingsObject
+#>
+function New-AzADDomainServiceNotificationSettingObject {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.NotificationSettings])]
+[CmdletBinding(PositionalBinding=$false)]
+param(
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String[]]
+ # The list of additional recipients.
+ ${AdditionalRecipient},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # Should domain controller admins be notified.
+ ${NotifyDcAdmin},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # Should global admins be notified.
+ ${NotifyGlobalAdmin}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ __AllParameterSets = 'Az.ADDomainServices.custom\New-AzADDomainServiceNotificationSettingObject';
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
diff --git a/src/ADDomainServices/exports/New-AzADDomainServiceReplicaSetObject.ps1 b/src/ADDomainServices/exports/New-AzADDomainServiceReplicaSetObject.ps1
new file mode 100644
index 000000000000..f5e693690a7e
--- /dev/null
+++ b/src/ADDomainServices/exports/New-AzADDomainServiceReplicaSetObject.ps1
@@ -0,0 +1,86 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create a in-memory object for ReplicaSet
+.Description
+Create a in-memory object for ReplicaSet
+.Example
+PS C:\> New-AzADDomainServiceReplicaSetObject -Location westus -SubnetId /subscriptions/********-****-****-****-**********/resourceGroups/youritest/providers/Microsoft.Network/virtualNetworks/aadds-vnet/subnets/default
+
+DomainControllerIPAddress ExternalAccessIPAddress HealthLastEvaluated Location ServiceStatus SubnetId
+------------------------- ----------------------- ------------------- -------- ------------- --------
+ westus /subscriptions/********-****-****-****-**********/resourceGroups/youritest/providers/Microsoft.Network…
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ReplicaSet
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.ADDomainServices/new-AzADDomainServicesReplicaSetObject
+#>
+function New-AzADDomainServiceReplicaSetObject {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ReplicaSet])]
+[CmdletBinding(PositionalBinding=$false)]
+param(
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # Virtual network location.
+ ${Location},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # The name of the virtual network that Domain Services will be deployed on.
+ # The id of the subnet that Domain Services will be deployed on.
+ # /virtualNetwork/vnetName/subnets/subnetName.
+ ${SubnetId}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ __AllParameterSets = 'Az.ADDomainServices.custom\New-AzADDomainServiceReplicaSetObject';
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
diff --git a/src/ADDomainServices/exports/New-AzADDomainServiceResourceForestSettingObject.ps1 b/src/ADDomainServices/exports/New-AzADDomainServiceResourceForestSettingObject.ps1
new file mode 100644
index 000000000000..8489146ac6c3
--- /dev/null
+++ b/src/ADDomainServices/exports/New-AzADDomainServiceResourceForestSettingObject.ps1
@@ -0,0 +1,96 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create a in-memory object for ResourceForestSettings
+.Description
+Create a in-memory object for ResourceForestSettings
+.Example
+PS C:\> New-AzADDomainServiceResourceForestSettingObject -ResourceForest resourcetest
+
+ResourceForest
+--------------
+resourcetest
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ResourceForestSettings
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+FORESTTRUST : List of settings for Resource Forest.
+ [FriendlyName ]: Friendly Name
+ [RemoteDnsIP ]: Remote Dns ips
+ [TrustDirection ]: Trust Direction
+ [TrustPassword ]: Trust Password
+ [TrustedDomainFqdn ]: Trusted Domain FQDN
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.ADDomainServices/new-AzADDomainServicesResourceForestSettingsObject
+#>
+function New-AzADDomainServiceResourceForestSettingObject {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ResourceForestSettings])]
+[CmdletBinding(PositionalBinding=$false)]
+param(
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # Resource Forest.
+ ${ResourceForest},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IForestTrust[]]
+ # List of settings for Resource Forest.
+ # To construct, see NOTES section for FORESTTRUST properties and create a hash table.
+ ${ForestTrust}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ __AllParameterSets = 'Az.ADDomainServices.custom\New-AzADDomainServiceResourceForestSettingObject';
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
diff --git a/src/ADDomainServices/exports/ProxyCmdletDefinitions.ps1 b/src/ADDomainServices/exports/ProxyCmdletDefinitions.ps1
new file mode 100644
index 000000000000..9705b89fd0d2
--- /dev/null
+++ b/src/ADDomainServices/exports/ProxyCmdletDefinitions.ps1
@@ -0,0 +1,1381 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+The Get Domain Service operation retrieves a json representation of the Domain Service.
+.Description
+The Get Domain Service operation retrieves a json representation of the Domain Service.
+.Example
+PS C:\> Get-AzADDomainService
+
+Name Domain Name Location Sku
+---- ----------- -------- ---
+youriADdomain youriAddomain.com westus Enterprise
+.Example
+PS C:\> Get-AzADDomainService -Name youriADdomain -ResourceGroupName youriADdomain
+
+Name Domain Name Location Sku
+---- ----------- -------- ---
+youriADdomain youriAddomain.com westus Enterprise
+.Example
+PS C:\> Get-AzADDomainService -ResourceGroupName youriADdomain
+
+Name Domain Name Location Sku
+---- ----------- -------- ---
+youriADdomain youriAddomain.com westus Enterprise
+.Example
+PS C:\> $getAzAddomain = Get-AzADDomainService -Name youriADdomain -ResourceGroupName youriADdomain
+Get-AzADDomainService -InputObject $getAzAddomain
+
+Name Domain Name Location Sku
+---- ----------- -------- ---
+youriADdomain youriAddomain.com westus Enterprise
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IAdDomainServicesIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IDomainService
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [DomainServiceName ]: The name of the domain service.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group within the user's subscription. The name is case insensitive.
+ [SubscriptionId ]: Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.addomainservices/get-azaddomainservice
+#>
+function Get-AzADDomainService {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IDomainService])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('DomainServiceName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [System.String]
+ # The name of the domain service.
+ ${Name},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List1', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [System.String]
+ # The name of the resource group within the user's subscription.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Parameter(ParameterSetName='List1')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # Gets subscription credentials which uniquely identify the Microsoft Azure subscription.
+ # The subscription ID forms part of the URI for every service call.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IAdDomainServicesIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ Get = 'Az.ADDomainServices.private\Get-AzADDomainService_Get';
+ GetViaIdentity = 'Az.ADDomainServices.private\Get-AzADDomainService_GetViaIdentity';
+ List = 'Az.ADDomainServices.private\Get-AzADDomainService_List';
+ List1 = 'Az.ADDomainServices.private\Get-AzADDomainService_List1';
+ }
+ if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+The Delete Domain Service operation deletes an existing Domain Service.
+.Description
+The Delete Domain Service operation deletes an existing Domain Service.
+.Example
+PS C:\> Remove-AzADDomainService -ResourceGroupName $env.ResourceGroupName -Name $env.ADdomainName
+
+.Example
+PS C:\> $GetADDomainExample = Get-AzADDomainService -ResourceGroupName $env.ResourceGroupName -Name $env.ADdomainName
+Remove-AzADDomainService -InputObject $GetADDomainExample
+
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IAdDomainServicesIdentity
+.Outputs
+System.Boolean
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [DomainServiceName ]: The name of the domain service.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group within the user's subscription. The name is case insensitive.
+ [SubscriptionId ]: Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.addomainservices/remove-azaddomainservice
+#>
+function Remove-AzADDomainService {
+[OutputType([System.Boolean])]
+[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Alias('DomainServiceName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [System.String]
+ # The name of the domain service.
+ ${Name},
+
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [System.String]
+ # The name of the resource group within the user's subscription.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Delete')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # Gets subscription credentials which uniquely identify the Microsoft Azure subscription.
+ # The subscription ID forms part of the URI for every service call.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IAdDomainServicesIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Returns true when the command succeeds
+ ${PassThru},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ Delete = 'Az.ADDomainServices.private\Remove-AzADDomainService_Delete';
+ DeleteViaIdentity = 'Az.ADDomainServices.private\Remove-AzADDomainService_DeleteViaIdentity';
+ }
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+The Create Domain Service operation creates a new domain service with the specified parameters.
+If the specific service already exists, then any patchable properties will be updated and any immutable properties will remain unchanged.
+.Description
+The Create Domain Service operation creates a new domain service with the specified parameters.
+If the specific service already exists, then any patchable properties will be updated and any immutable properties will remain unchanged.
+.Example
+PS C:\> $replicaSet = New-AzADDomainServiceReplicaSetObject -Location westus -SubnetId /subscriptions/********-****-****-****-**********/resourceGroups/yishitest/providers/Microsoft.Network/virtualNetworks/aadds-vnet/subnets/default
+New-AzADDomainService -name youriADdomain -ResourceGroupName youriAddomain -DomainName youriAddomain.com -ReplicaSet $replicaSet -debug
+
+Name Domain Name Location Sku
+---- ----------- -------- ---
+youriADdomain youriAddomain.com westus Enterprise
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IDomainService
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+DOMAINSECURITYSETTING : Domain Security Settings.
+ [NtlmV1 ]: A flag to determine whether or not NtlmV1 is enabled or disabled.
+ [SyncKerberosPassword ]: A flag to determine whether or not SyncKerberosPasswords is enabled or disabled.
+ [SyncNtlmPassword ]: A flag to determine whether or not SyncNtlmPasswords is enabled or disabled.
+ [SyncOnPremPassword ]: A flag to determine whether or not SyncOnPremPasswords is enabled or disabled.
+ [TlsV1 ]: A flag to determine whether or not TlsV1 is enabled or disabled.
+
+LDAPSSETTING : Secure LDAP Settings.
+ [ExternalAccess ]: A flag to determine whether or not Secure LDAP access over the internet is enabled or disabled.
+ [Ldap ]: A flag to determine whether or not Secure LDAP is enabled or disabled.
+ [PfxCertificate ]: The certificate required to configure Secure LDAP. The parameter passed here should be a base64encoded representation of the certificate pfx file.
+ [PfxCertificatePassword ]: The password to decrypt the provided Secure LDAP certificate pfx file.
+
+NOTIFICATIONSETTING : Notification Settings.
+ [AdditionalRecipient ]: The list of additional recipients
+ [NotifyDcAdmin ]: Should domain controller admins be notified
+ [NotifyGlobalAdmin ]: Should global admins be notified
+
+REPLICASET : List of ReplicaSets
+ [Location ]: Virtual network location
+ [SubnetId ]: The name of the virtual network that Domain Services will be deployed on. The id of the subnet that Domain Services will be deployed on. /virtualNetwork/vnetName/subnets/subnetName.
+
+RESOURCEFORESTSETTING : Settings for Resource Forest.
+ [ResourceForest ]: Resource Forest
+ [Setting ]: List of settings for Resource Forest
+ [FriendlyName ]: Friendly Name
+ [RemoteDnsIP ]: Remote Dns ips
+ [TrustDirection ]: Trust Direction
+ [TrustPassword ]: Trust Password
+ [TrustedDomainFqdn ]: Trusted Domain FQDN
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.addomainservices/new-azaddomainservice
+#>
+function New-AzADDomainService {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IDomainService])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(Mandatory)]
+ [Alias('DomainServiceName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [System.String]
+ # The name of the domain service.
+ ${Name},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [System.String]
+ # The name of the resource group within the user's subscription.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # Gets subscription credentials which uniquely identify the Microsoft Azure subscription.
+ # The subscription ID forms part of the URI for every service call.
+ ${SubscriptionId},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # The name of the Azure domain that the user would like to deploy Domain Services to.
+ ${DomainName},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IReplicaSet[]]
+ # List of ReplicaSets
+ # To construct, see NOTES section for REPLICASET properties and create a hash table.
+ ${ReplicaSet},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # Domain Configuration Type
+ ${DomainConfigurationType},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainSecuritySettings]
+ # Domain Security Settings.
+ # To construct, see NOTES section for DOMAINSECURITYSETTING properties and create a hash table.
+ ${DomainSecuritySetting},
+
+ [Parameter()]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Support.FilteredSync])]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # Enabled or Disabled flag to turn on Group-based filtered sync
+ ${FilteredSync},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.LdapsSettings]
+ # Secure LDAP Settings.
+ # To construct, see NOTES section for LDAPSSETTING properties and create a hash table.
+ ${LdapsSetting},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.NotificationSettings]
+ # Notification Settings.
+ # To construct, see NOTES section for NOTIFICATIONSETTING properties and create a hash table.
+ ${NotificationSetting},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ResourceForestSettings]
+ # Settings for Resource Forest.
+ # To construct, see NOTES section for RESOURCEFORESTSETTING properties and create a hash table.
+ ${ResourceForestSetting},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # Sku Type
+ ${Sku},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IResourceTags]))]
+ [System.Collections.Hashtable]
+ # Resource tags
+ ${Tag},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ CreateExpanded = 'Az.ADDomainServices.custom\New-AzADDomainService';
+ }
+ if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create a in-memory object for DomainSecuritySettings
+.Description
+Create a in-memory object for DomainSecuritySettings
+.Example
+PS C:\> New-AzADDomainServiceDomainSecuritySettingObject -NtlmV1 Disabled -SyncKerberosPassword Disabled -SyncNtlmPassword Disabled -SyncOnPremPassword Disabled -TlsV1 Disabled
+
+NtlmV1 SyncKerberosPassword SyncNtlmPassword SyncOnPremPassword TlsV1
+------ -------------------- ---------------- ------------------ -----
+Disabled Disabled Disabled Disabled Disabled
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainSecuritySettings
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.ADDomainServices/new-AzADDomainServicesDomainSecuritySettingsObject
+#>
+function New-AzADDomainServiceDomainSecuritySettingObject {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainSecuritySettings])]
+[CmdletBinding(PositionalBinding=$false)]
+param(
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # A flag to determine whether or not NtlmV1 is enabled or disabled.
+ ${NtlmV1},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ ${SyncKerberosPassword},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # A flag to determine whether or not SyncNtlmPasswords is enabled or disabled.
+ ${SyncNtlmPassword},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # A flag to determine whether or not SyncOnPremPasswords is enabled or disabled.
+ ${SyncOnPremPassword},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # A flag to determine whether or not TlsV1 is enabled or disabled.
+ ${TlsV1}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ __AllParameterSets = 'Az.ADDomainServices.custom\New-AzADDomainServiceDomainSecuritySettingObject';
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create a in-memory object for LdapsSettings
+.Description
+Create a in-memory object for LdapsSettings
+.Example
+PS C:\> $secstr = ConvertTo-SecureString -String 'Password' -AsPlainText -Force
+New-AzADDomainServiceLdapsSettingObject -ExternalAccess Enabled -Ldaps Enabled -PfxCertificatePath sahg -PfxCertificatePassword $secstr
+
+CertificateNotAfter CertificateThumbprint ExternalAccess Ldaps PfxCertificate PfxCertificatePassword PublicCertificate
+------------------- --------------------- -------------- ---- -------------- ---------------------- -----------------
+ Enabled Enabled Password
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.LdapsSettings
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.ADDomainServices/new-AzADDomainServicesLdapsSettingsObject
+#>
+function New-AzADDomainServiceLdapsSettingObject {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.LdapsSettings])]
+[CmdletBinding(PositionalBinding=$false)]
+param(
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # A flag to determine whether or not Secure LDAP access over the internet is enabled or disabled.
+ ${ExternalAccess},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # A flag to determine whether or not Secure LDAP is enabled or disabled.
+ ${Ldaps},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # The path of certificate required to configure Secure LDAP.
+ ${PfxCertificatePath},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.Security.SecureString]
+ # The password to decrypt the provided Secure LDAP certificate pfx file.
+ ${PfxCertificatePassword}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ __AllParameterSets = 'Az.ADDomainServices.custom\New-AzADDomainServiceLdapsSettingObject';
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create a in-memory object for NotificationSettings
+.Description
+Create a in-memory object for NotificationSettings
+.Example
+PS C:\> New-AzADDomainServiceNotificationSettingObject -AdditionalRecipient test@microsoft.com -NotifyDcAdmin Enabled -NotifyGlobalAdmin Enabled
+
+AdditionalRecipient NotifyDcAdmin NotifyGlobalAdmin
+------------------- ------------- -----------------
+{test@microsoft.com} Enabled Enabled
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.NotificationSettings
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.ADDomainServices/new-AzADDomainServicesNotificationSettingsObject
+#>
+function New-AzADDomainServiceNotificationSettingObject {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.NotificationSettings])]
+[CmdletBinding(PositionalBinding=$false)]
+param(
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String[]]
+ # The list of additional recipients.
+ ${AdditionalRecipient},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # Should domain controller admins be notified.
+ ${NotifyDcAdmin},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # Should global admins be notified.
+ ${NotifyGlobalAdmin}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ __AllParameterSets = 'Az.ADDomainServices.custom\New-AzADDomainServiceNotificationSettingObject';
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create a in-memory object for ReplicaSet
+.Description
+Create a in-memory object for ReplicaSet
+.Example
+PS C:\> New-AzADDomainServiceReplicaSetObject -Location westus -SubnetId /subscriptions/********-****-****-****-**********/resourceGroups/youritest/providers/Microsoft.Network/virtualNetworks/aadds-vnet/subnets/default
+
+DomainControllerIPAddress ExternalAccessIPAddress HealthLastEvaluated Location ServiceStatus SubnetId
+------------------------- ----------------------- ------------------- -------- ------------- --------
+ westus /subscriptions/********-****-****-****-**********/resourceGroups/youritest/providers/Microsoft.Network…
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ReplicaSet
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.ADDomainServices/new-AzADDomainServicesReplicaSetObject
+#>
+function New-AzADDomainServiceReplicaSetObject {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ReplicaSet])]
+[CmdletBinding(PositionalBinding=$false)]
+param(
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # Virtual network location.
+ ${Location},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # The name of the virtual network that Domain Services will be deployed on.
+ # The id of the subnet that Domain Services will be deployed on.
+ # /virtualNetwork/vnetName/subnets/subnetName.
+ ${SubnetId}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ __AllParameterSets = 'Az.ADDomainServices.custom\New-AzADDomainServiceReplicaSetObject';
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create a in-memory object for ResourceForestSettings
+.Description
+Create a in-memory object for ResourceForestSettings
+.Example
+PS C:\> New-AzADDomainServiceResourceForestSettingObject -ResourceForest resourcetest
+
+ResourceForest
+--------------
+resourcetest
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ResourceForestSettings
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+FORESTTRUST : List of settings for Resource Forest.
+ [FriendlyName ]: Friendly Name
+ [RemoteDnsIP ]: Remote Dns ips
+ [TrustDirection ]: Trust Direction
+ [TrustPassword ]: Trust Password
+ [TrustedDomainFqdn ]: Trusted Domain FQDN
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.ADDomainServices/new-AzADDomainServicesResourceForestSettingsObject
+#>
+function New-AzADDomainServiceResourceForestSettingObject {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ResourceForestSettings])]
+[CmdletBinding(PositionalBinding=$false)]
+param(
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # Resource Forest.
+ ${ResourceForest},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IForestTrust[]]
+ # List of settings for Resource Forest.
+ # To construct, see NOTES section for FORESTTRUST properties and create a hash table.
+ ${ForestTrust}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ __AllParameterSets = 'Az.ADDomainServices.custom\New-AzADDomainServiceResourceForestSettingObject';
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+The Update Domain Service operation can be used to update the existing deployment.
+The update call only supports the properties listed in the PATCH body.
+.Description
+The Update Domain Service operation can be used to update the existing deployment.
+The update call only supports the properties listed in the PATCH body.
+.Example
+PS C:\> $ADDomainSetting = New-AzADDomainServiceDomainSecuritySettingObject -TlsV1 Disabled
+Update-AzADDomainService -Name youriADdomain -ResourceGroupName youriADdomain -DomainSecuritySetting $ADDomainSetting
+
+Name Domain Name Location Sku
+---- ----------- -------- ---
+youriADdomain youriAddomain.com westus Enterprise
+.Example
+PS C:\> $getAzAddomain = Get-AzADDomainService -Name youriADdomain -ResourceGroupName youriADdomain
+$ADDomainSetting = New-AzADDomainServiceDomainSecuritySettingObject -TlsV1 Disabled
+Update-AzADDomainService -InputObject $getAzAddomain -DomainSecuritySetting $ADDomainSetting
+
+Name Domain Name Location Sku
+---- ----------- -------- ---
+youriADdomain youriAddomain.com westus Enterprise
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IAdDomainServicesIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IDomainService
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+DOMAINSECURITYSETTING : Domain Security Settings.
+ [NtlmV1 ]: A flag to determine whether or not NtlmV1 is enabled or disabled.
+ [SyncKerberosPassword ]: A flag to determine whether or not SyncKerberosPasswords is enabled or disabled.
+ [SyncNtlmPassword ]: A flag to determine whether or not SyncNtlmPasswords is enabled or disabled.
+ [SyncOnPremPassword ]: A flag to determine whether or not SyncOnPremPasswords is enabled or disabled.
+ [TlsV1 ]: A flag to determine whether or not TlsV1 is enabled or disabled.
+
+INPUTOBJECT : Identity Parameter
+ [DomainServiceName ]: The name of the domain service.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group within the user's subscription. The name is case insensitive.
+ [SubscriptionId ]: Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
+
+LDAPSSETTING : Secure LDAP Settings.
+ [ExternalAccess ]: A flag to determine whether or not Secure LDAP access over the internet is enabled or disabled.
+ [Ldap ]: A flag to determine whether or not Secure LDAP is enabled or disabled.
+ [PfxCertificate ]: The certificate required to configure Secure LDAP. The parameter passed here should be a base64encoded representation of the certificate pfx file.
+ [PfxCertificatePassword ]: The password to decrypt the provided Secure LDAP certificate pfx file.
+
+NOTIFICATIONSETTING : Notification Settings.
+ [AdditionalRecipient ]: The list of additional recipients
+ [NotifyDcAdmin ]: Should domain controller admins be notified
+ [NotifyGlobalAdmin ]: Should global admins be notified
+
+REPLICASET : List of ReplicaSets
+ [Location ]: Virtual network location
+ [SubnetId ]: The name of the virtual network that Domain Services will be deployed on. The id of the subnet that Domain Services will be deployed on. /virtualNetwork/vnetName/subnets/subnetName.
+
+RESOURCEFORESTSETTING : Settings for Resource Forest.
+ [ResourceForest ]: Resource Forest
+ [Setting ]: List of settings for Resource Forest
+ [FriendlyName ]: Friendly Name
+ [RemoteDnsIP ]: Remote Dns ips
+ [TrustDirection ]: Trust Direction
+ [TrustPassword ]: Trust Password
+ [TrustedDomainFqdn ]: Trusted Domain FQDN
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.addomainservices/update-azaddomainservice
+#>
+function Update-AzADDomainService {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IDomainService])]
+[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Alias('DomainServiceName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [System.String]
+ # The name of the domain service.
+ ${Name},
+
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [System.String]
+ # The name of the resource group within the user's subscription.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # Gets subscription credentials which uniquely identify the Microsoft Azure subscription.
+ # The subscription ID forms part of the URI for every service call.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IAdDomainServicesIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # Domain Configuration Type
+ ${DomainConfigurationType},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainSecuritySettings]
+ # Domain Security Settings.
+ # To construct, see NOTES section for DOMAINSECURITYSETTING properties and create a hash table.
+ ${DomainSecuritySetting},
+
+ [Parameter()]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Support.FilteredSync])]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # Enabled or Disabled flag to turn on Group-based filtered sync
+ ${FilteredSync},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.LdapsSettings]
+ # Secure LDAP Settings.
+ # To construct, see NOTES section for LDAPSSETTING properties and create a hash table.
+ ${LdapsSetting},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.NotificationSettings]
+ # Notification Settings.
+ # To construct, see NOTES section for NOTIFICATIONSETTING properties and create a hash table.
+ ${NotificationSetting},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IReplicaSet[]]
+ # List of ReplicaSets
+ # To construct, see NOTES section for REPLICASET properties and create a hash table.
+ ${ReplicaSet},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ResourceForestSettings]
+ # Settings for Resource Forest.
+ # To construct, see NOTES section for RESOURCEFORESTSETTING properties and create a hash table.
+ ${ResourceForestSetting},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # Sku Type
+ ${Sku},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IResourceTags]))]
+ [System.Collections.Hashtable]
+ # Resource tags
+ ${Tag},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ UpdateExpanded = 'Az.ADDomainServices.custom\Update-AzADDomainService';
+ UpdateViaIdentityExpanded = 'Az.ADDomainServices.custom\Update-AzADDomainService';
+ }
+ if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
diff --git a/src/ADDomainServices/exports/Remove-AzADDomainService.ps1 b/src/ADDomainServices/exports/Remove-AzADDomainService.ps1
new file mode 100644
index 000000000000..dac657cb63af
--- /dev/null
+++ b/src/ADDomainServices/exports/Remove-AzADDomainService.ps1
@@ -0,0 +1,183 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+The Delete Domain Service operation deletes an existing Domain Service.
+.Description
+The Delete Domain Service operation deletes an existing Domain Service.
+.Example
+PS C:\> Remove-AzADDomainService -ResourceGroupName $env.ResourceGroupName -Name $env.ADdomainName
+
+.Example
+PS C:\> $GetADDomainExample = Get-AzADDomainService -ResourceGroupName $env.ResourceGroupName -Name $env.ADdomainName
+Remove-AzADDomainService -InputObject $GetADDomainExample
+
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IAdDomainServicesIdentity
+.Outputs
+System.Boolean
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [DomainServiceName ]: The name of the domain service.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group within the user's subscription. The name is case insensitive.
+ [SubscriptionId ]: Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.addomainservices/remove-azaddomainservice
+#>
+function Remove-AzADDomainService {
+[OutputType([System.Boolean])]
+[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Alias('DomainServiceName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [System.String]
+ # The name of the domain service.
+ ${Name},
+
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [System.String]
+ # The name of the resource group within the user's subscription.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Delete')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # Gets subscription credentials which uniquely identify the Microsoft Azure subscription.
+ # The subscription ID forms part of the URI for every service call.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IAdDomainServicesIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Returns true when the command succeeds
+ ${PassThru},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ Delete = 'Az.ADDomainServices.private\Remove-AzADDomainService_Delete';
+ DeleteViaIdentity = 'Az.ADDomainServices.private\Remove-AzADDomainService_DeleteViaIdentity';
+ }
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
diff --git a/src/ADDomainServices/exports/Update-AzADDomainService.ps1 b/src/ADDomainServices/exports/Update-AzADDomainService.ps1
new file mode 100644
index 000000000000..54fc965e8a85
--- /dev/null
+++ b/src/ADDomainServices/exports/Update-AzADDomainService.ps1
@@ -0,0 +1,279 @@
+
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+The Update Domain Service operation can be used to update the existing deployment.
+The update call only supports the properties listed in the PATCH body.
+.Description
+The Update Domain Service operation can be used to update the existing deployment.
+The update call only supports the properties listed in the PATCH body.
+.Example
+PS C:\> $ADDomainSetting = New-AzADDomainServiceDomainSecuritySettingObject -TlsV1 Disabled
+Update-AzADDomainService -Name youriADdomain -ResourceGroupName youriADdomain -DomainSecuritySetting $ADDomainSetting
+
+Name Domain Name Location Sku
+---- ----------- -------- ---
+youriADdomain youriAddomain.com westus Enterprise
+.Example
+PS C:\> $getAzAddomain = Get-AzADDomainService -Name youriADdomain -ResourceGroupName youriADdomain
+$ADDomainSetting = New-AzADDomainServiceDomainSecuritySettingObject -TlsV1 Disabled
+Update-AzADDomainService -InputObject $getAzAddomain -DomainSecuritySetting $ADDomainSetting
+
+Name Domain Name Location Sku
+---- ----------- -------- ---
+youriADdomain youriAddomain.com westus Enterprise
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IAdDomainServicesIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IDomainService
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+DOMAINSECURITYSETTING : Domain Security Settings.
+ [NtlmV1 ]: A flag to determine whether or not NtlmV1 is enabled or disabled.
+ [SyncKerberosPassword ]: A flag to determine whether or not SyncKerberosPasswords is enabled or disabled.
+ [SyncNtlmPassword ]: A flag to determine whether or not SyncNtlmPasswords is enabled or disabled.
+ [SyncOnPremPassword ]: A flag to determine whether or not SyncOnPremPasswords is enabled or disabled.
+ [TlsV1 ]: A flag to determine whether or not TlsV1 is enabled or disabled.
+
+INPUTOBJECT : Identity Parameter
+ [DomainServiceName ]: The name of the domain service.
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group within the user's subscription. The name is case insensitive.
+ [SubscriptionId ]: Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
+
+LDAPSSETTING : Secure LDAP Settings.
+ [ExternalAccess ]: A flag to determine whether or not Secure LDAP access over the internet is enabled or disabled.
+ [Ldap ]: A flag to determine whether or not Secure LDAP is enabled or disabled.
+ [PfxCertificate ]: The certificate required to configure Secure LDAP. The parameter passed here should be a base64encoded representation of the certificate pfx file.
+ [PfxCertificatePassword ]: The password to decrypt the provided Secure LDAP certificate pfx file.
+
+NOTIFICATIONSETTING : Notification Settings.
+ [AdditionalRecipient ]: The list of additional recipients
+ [NotifyDcAdmin ]: Should domain controller admins be notified
+ [NotifyGlobalAdmin ]: Should global admins be notified
+
+REPLICASET : List of ReplicaSets
+ [Location ]: Virtual network location
+ [SubnetId ]: The name of the virtual network that Domain Services will be deployed on. The id of the subnet that Domain Services will be deployed on. /virtualNetwork/vnetName/subnets/subnetName.
+
+RESOURCEFORESTSETTING : Settings for Resource Forest.
+ [ResourceForest ]: Resource Forest
+ [Setting ]: List of settings for Resource Forest
+ [FriendlyName ]: Friendly Name
+ [RemoteDnsIP ]: Remote Dns ips
+ [TrustDirection ]: Trust Direction
+ [TrustPassword ]: Trust Password
+ [TrustedDomainFqdn ]: Trusted Domain FQDN
+.Link
+https://docs.microsoft.com/en-us/powershell/module/az.addomainservices/update-azaddomainservice
+#>
+function Update-AzADDomainService {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IDomainService])]
+[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Alias('DomainServiceName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [System.String]
+ # The name of the domain service.
+ ${Name},
+
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [System.String]
+ # The name of the resource group within the user's subscription.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # Gets subscription credentials which uniquely identify the Microsoft Azure subscription.
+ # The subscription ID forms part of the URI for every service call.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IAdDomainServicesIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # Domain Configuration Type
+ ${DomainConfigurationType},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainSecuritySettings]
+ # Domain Security Settings.
+ # To construct, see NOTES section for DOMAINSECURITYSETTING properties and create a hash table.
+ ${DomainSecuritySetting},
+
+ [Parameter()]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Support.FilteredSync])]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # Enabled or Disabled flag to turn on Group-based filtered sync
+ ${FilteredSync},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.LdapsSettings]
+ # Secure LDAP Settings.
+ # To construct, see NOTES section for LDAPSSETTING properties and create a hash table.
+ ${LdapsSetting},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.NotificationSettings]
+ # Notification Settings.
+ # To construct, see NOTES section for NOTIFICATIONSETTING properties and create a hash table.
+ ${NotificationSetting},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IReplicaSet[]]
+ # List of ReplicaSets
+ # To construct, see NOTES section for REPLICASET properties and create a hash table.
+ ${ReplicaSet},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.ResourceForestSettings]
+ # Settings for Resource Forest.
+ # To construct, see NOTES section for RESOURCEFORESTSETTING properties and create a hash table.
+ ${ResourceForestSetting},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [System.String]
+ # Sku Type
+ ${Sku},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IResourceTags]))]
+ [System.Collections.Hashtable]
+ # Resource tags
+ ${Tag},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+ $mapping = @{
+ UpdateExpanded = 'Az.ADDomainServices.custom\Update-AzADDomainService';
+ UpdateViaIdentityExpanded = 'Az.ADDomainServices.custom\Update-AzADDomainService';
+ }
+ if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ throw
+ }
+}
+
+end {
+ try {
+ $steppablePipeline.End()
+ } catch {
+ throw
+ }
+}
+}
diff --git a/src/ADDomainServices/exports/readme.md b/src/ADDomainServices/exports/readme.md
new file mode 100644
index 000000000000..54f1de62bce0
--- /dev/null
+++ b/src/ADDomainServices/exports/readme.md
@@ -0,0 +1,20 @@
+# Exports
+This directory contains the cmdlets *exported by* `Az.ADDomainServices`. No other cmdlets in this repository are directly exported. What that means is the `Az.ADDomainServices` module will run [Export-ModuleMember](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/export-modulemember) on the cmldets in this directory. The cmdlets in this directory are generated at **build-time**. Do not put any custom code, files, cmdlets, etc. into this directory. Please use `..\custom` for all custom implementation.
+
+## Info
+- Modifiable: no
+- Generated: all
+- Committed: no
+- Packaged: yes
+
+## Details
+The cmdlets generated here are created every time you run `build-module.ps1`. These cmdlets are a merge of all (excluding `InternalExport`) cmdlets from the private binary (`..\bin\Az.ADDomainServices.private.dll`) and from the `..\custom\Az.ADDomainServices.custom.psm1` module. Cmdlets that are *not merged* from those directories are decorated with the `InternalExport` attribute. This happens when you set the cmdlet to **hide** from configuration. For more information on hiding, see [cmdlet hiding](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md#cmdlet-hiding-exportation-suppression) or the [readme.md](..\internal/readme.md) in the `..\internal` folder.
+
+## Purpose
+We generate script cmdlets out of the binary cmdlets and custom cmdlets. The format of script cmdlets are simplistic; thus, easier to generate at build time. Generating the cmdlets is required as to allow merging of generated binary, hand-written binary, and hand-written custom cmdlets. For Azure cmdlets, having script cmdlets simplifies the mechanism for exporting Azure profiles.
+
+## Structure
+The cmdlets generated here will flat in the directory (no sub-folders) as long as there are no Azure profiles specified for any cmdlets. Azure profiles (the `Profiles` attribute) is only applied when generating with the `--azure` attribute (or `azure: true` in the configuration). When Azure profiles are applied, the folder structure has a folder per profile. Each profile folder has only those cmdlets that apply to that profile.
+
+## Usage
+When `./Az.ADDomainServices.psm1` is loaded, it dynamically exports cmdlets here based on the folder structure and on the selected profile. If there are no sub-folders, it exports all cmdlets at the root of this folder. If there are sub-folders, it checks to see the selected profile. If no profile is selected, it exports the cmdlets in the last sub-folder (alphabetically). If a profile is selected, it exports the cmdlets in the sub-folder that matches the profile name. If there is no sub-folder that matches the profile name, it exports no cmdlets and writes a warning message.
\ No newline at end of file
diff --git a/src/ADDomainServices/generate-help.ps1 b/src/ADDomainServices/generate-help.ps1
new file mode 100644
index 000000000000..a49b15369064
--- /dev/null
+++ b/src/ADDomainServices/generate-help.ps1
@@ -0,0 +1,73 @@
+# ----------------------------------------------------------------------------------
+#
+# Copyright Microsoft Corporation
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ----------------------------------------------------------------------------------
+param([switch]$Isolated)
+$ErrorActionPreference = 'Stop'
+
+$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+if(-not $Isolated) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ return
+}
+
+$exportsFolder = Join-Path $PSScriptRoot 'exports'
+if(-not (Test-Path $exportsFolder)) {
+ Write-Error "Exports folder '$exportsFolder' was not found."
+}
+
+$directories = Get-ChildItem -Directory -Path $exportsFolder
+$hasProfiles = ($directories | Measure-Object).Count -gt 0
+if(-not $hasProfiles) {
+ $directories = Get-Item -Path $exportsFolder
+}
+
+$docsFolder = Join-Path $PSScriptRoot 'docs'
+if(Test-Path $docsFolder) {
+ $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'readme.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
+}
+$null = New-Item -ItemType Directory -Force -Path $docsFolder -ErrorAction SilentlyContinue
+$examplesFolder = Join-Path $PSScriptRoot 'examples'
+
+$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot './Az.ADDomainServices.psd1')
+$modulePath = $modulePsd1.FullName
+$moduleName = $modulePsd1.BaseName
+
+# Load DLL to use build-time cmdlets
+Import-Module -Name $modulePath
+Import-Module -Name (Join-Path $PSScriptRoot './bin/Az.ADDomainServices.private.dll')
+$instance = [Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Module]::Instance
+# Module info is shared per profile
+$moduleInfo = Get-Module -Name $moduleName
+
+foreach($directory in $directories)
+{
+ if($hasProfiles) {
+ Select-AzProfile -Name $directory.Name
+ }
+ # Reload module per profile
+ Import-Module -Name $modulePath -Force
+
+ $cmdletNames = Get-ScriptCmdlet -ScriptFolder $directory.FullName
+ $cmdletHelpInfo = $cmdletNames | ForEach-Object { Get-Help -Name $_ -Full }
+ $cmdletFunctionInfo = Get-ScriptCmdlet -ScriptFolder $directory.FullName -AsFunctionInfo
+
+ $docsPath = Join-Path $docsFolder $directory.Name
+ $null = New-Item -ItemType Directory -Force -Path $docsPath -ErrorAction SilentlyContinue
+ $examplesPath = Join-Path $examplesFolder $directory.Name
+
+ Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath
+ Write-Host -ForegroundColor Green "Created documentation in '$docsPath'"
+}
+
+Write-Host -ForegroundColor Green '-------------Done-------------'
\ No newline at end of file
diff --git a/src/ADDomainServices/generate-info.json b/src/ADDomainServices/generate-info.json
new file mode 100644
index 000000000000..d6b6a33a4369
--- /dev/null
+++ b/src/ADDomainServices/generate-info.json
@@ -0,0 +1,8 @@
+{
+ "autorest_core": "3.0.6349",
+ "autorest_modelerfour": "4.15.414",
+ "node": "v10.16.0",
+ "autorest_powershell": "3.0.414",
+ "swagger_commit": "cdc98b4f290950c7baa100e71dd7651b13bf36e5",
+ "autorest": "`-- (empty)"
+}
diff --git a/src/ADDomainServices/generated/Module.cs b/src/ADDomainServices/generated/Module.cs
new file mode 100644
index 000000000000..3afd557f94e9
--- /dev/null
+++ b/src/ADDomainServices/generated/Module.cs
@@ -0,0 +1,158 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Extensions;
+ using SendAsyncStepDelegate = global::System.Func, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>;
+ using PipelineChangeDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>;
+ using GetParameterDelegate = global::System.Func;
+ using ModuleLoadPipelineDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>, global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>>;
+ using NewRequestPipelineDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>, global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>>;
+ using ArgumentCompleterDelegate = global::System.Func;
+ using SignalDelegate = global::System.Func, global::System.Threading.Tasks.Task>;
+ using EventListenerDelegate = global::System.Func, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Management.Automation.InvocationInfo, string, string, string, global::System.Exception, global::System.Threading.Tasks.Task>;
+ using NextDelegate = global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>;
+
+ /// A class that contains the module-common code and data.
+ public partial class Module
+ {
+ /// The currently selected profile.
+ public string Profile = global::System.String.Empty;
+
+ public global::System.Net.Http.HttpClientHandler _handler = new global::System.Net.Http.HttpClientHandler();
+
+ /// the ISendAsync pipeline instance
+ private Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.HttpPipeline _pipeline;
+
+ /// the ISendAsync pipeline instance (when proxy is enabled)
+ private Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.HttpPipeline _pipelineWithProxy;
+
+ public global::System.Net.WebProxy _webProxy = new global::System.Net.WebProxy();
+
+ /// Gets completion data for azure specific fields
+ public ArgumentCompleterDelegate ArgumentCompleter { get; set; }
+
+ /// The instance of the Client API
+ public Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.AdDomainServices ClientAPI { get; set; }
+
+ /// A delegate that gets called for each signalled event
+ public EventListenerDelegate EventListener { get; set; }
+
+ /// The delegate to call to get parameter data from a common module.
+ public GetParameterDelegate GetParameterValue { get; set; }
+
+ /// Backing field for property.
+ private static Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Module _instance;
+
+ /// the singleton of this module class
+ public static Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Module());
+
+ /// The Name of this module
+ public string Name => @"Az.ADDomainServices";
+
+ /// The delegate to call when this module is loaded (supporting a commmon module).
+ public ModuleLoadPipelineDelegate OnModuleLoad { get; set; }
+
+ /// The delegate to call before each new request (supporting a commmon module).
+ public NewRequestPipelineDelegate OnNewRequest { get; set; }
+
+ /// The name of the currently selected Azure profile
+ public global::System.String ProfileName { get; set; }
+
+ /// The ResourceID for this module (azure arm).
+ public string ResourceId => @"Az.ADDomainServices";
+
+ /// The from the cmdlet
+ /// The HttpPipeline for the request
+
+ partial void AfterCreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, ref Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.HttpPipeline pipeline);
+
+ /// The from the cmdlet
+ /// The HttpPipeline for the request
+
+ partial void BeforeCreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, ref Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.HttpPipeline pipeline);
+
+ partial void CustomInit();
+
+ /// Creates an instance of the HttpPipeline for each call.
+ /// The from the cmdlet
+ /// the cmdlet's correlation id.
+ /// the cmdlet's process record correlation id.
+ /// the cmdlet's parameterset name.
+ /// An instance of Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.HttpPipeline for the remote call.
+ public Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.HttpPipeline CreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, string correlationId, string processRecordId, string parameterSetName = null)
+ {
+ Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.HttpPipeline pipeline = null;
+ BeforeCreatePipeline(invocationInfo, ref pipeline);
+ pipeline = (pipeline ?? (_handler.UseProxy ? _pipelineWithProxy : _pipeline)).Clone();
+ AfterCreatePipeline(invocationInfo, ref pipeline);
+ pipeline.Append(new Runtime.CmdInfoHandler(processRecordId, invocationInfo, parameterSetName).SendAsync);
+ OnNewRequest?.Invoke( invocationInfo, correlationId,processRecordId, (step)=> { pipeline.Prepend(step); } , (step)=> { pipeline.Append(step); } );
+ return pipeline;
+ }
+
+ /// Gets parameters from a common module.
+ /// The from the cmdlet
+ /// the cmdlet's correlation id.
+ /// The name of the parameter to get the value for.
+ ///
+ /// The parameter value from the common module. (Note: this should be type converted on the way back)
+ ///
+ public object GetParameter(global::System.Management.Automation.InvocationInfo invocationInfo, string correlationId, string parameterName) => GetParameterValue?.Invoke( ResourceId, Name, invocationInfo, correlationId,parameterName );
+
+ /// Initialization steps performed after the module is loaded.
+ public void Init()
+ {
+ OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } );
+ OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } );
+ CustomInit();
+ }
+
+ /// Creates the module instance.
+ private Module()
+ {
+ /// constructor
+ ClientAPI = new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.AdDomainServices();
+ _handler.Proxy = _webProxy;
+ _pipeline = new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient()));
+ _pipelineWithProxy = new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient(_handler)));
+ }
+
+ /// The HTTP Proxy to use.
+ /// The HTTP Proxy Credentials
+ /// True if the proxy should use default credentials
+ public void SetProxyConfiguration(global::System.Uri proxy, global::System.Management.Automation.PSCredential proxyCredential, bool proxyUseDefaultCredentials)
+ {
+ // set the proxy configuration
+ _webProxy.Address = proxy;
+ _webProxy.BypassProxyOnLocal = false;
+ _webProxy.Credentials = proxyCredential ?.GetNetworkCredential();
+ _webProxy.UseDefaultCredentials = proxyUseDefaultCredentials;
+ _handler.UseProxy = proxy != null;
+ }
+
+ /// Called to dispatch events to the common module listener
+ /// The ID of the event
+ /// The cancellation token for the event
+ /// A delegate to get the detailed event data
+ /// The callback for the event dispatcher
+ /// The from the cmdlet
+ /// the cmdlet's parameterset name.
+ /// the cmdlet's correlation id.
+ /// the cmdlet's process record correlation id.
+ /// the exception that is being thrown (if available)
+ ///
+ /// A that will be complete when handling of the event is completed.
+ ///
+ public async global::System.Threading.Tasks.Task Signal(string id, global::System.Threading.CancellationToken token, global::System.Func getEventData, SignalDelegate signal, global::System.Management.Automation.InvocationInfo invocationInfo, string parameterSetName, string correlationId, string processRecordId, global::System.Exception exception)
+ {
+ using( NoSynchronizationContext )
+ {
+ await EventListener?.Invoke(id,token,getEventData, signal, invocationInfo, parameterSetName, correlationId,processRecordId,exception);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/ADDomainServices/generated/api/AdDomainServices.cs b/src/ADDomainServices/generated/api/AdDomainServices.cs
new file mode 100644
index 000000000000..4447c9ba3f93
--- /dev/null
+++ b/src/ADDomainServices/generated/api/AdDomainServices.cs
@@ -0,0 +1,1523 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Extensions;
+
+ ///
+ /// Low-level API implementation for the ADDomainServices service.
+ /// The AAD Domain Services API.
+ ///
+ public partial class AdDomainServices
+ {
+
+ /// Lists all the available Domain Services operations.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task DomainServiceOperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/providers/Microsoft.AAD/operations"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DomainServiceOperationsList_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Lists all the available Domain Services operations.
+ ///
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task DomainServiceOperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.AAD/operations$").Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.AAD/operations'");
+ }
+
+ // replace URI parameters with values from identity
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/providers/Microsoft.AAD/operations"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DomainServiceOperationsList_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task DomainServiceOperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.OperationEntityListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ ///
+ /// Validation method for method. Call this like the actual call, but you will
+ /// get validation events back.
+ ///
+ /// an instance that will receive events.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task DomainServiceOperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+
+ }
+ }
+
+ ///
+ /// The Create Domain Service operation creates a new domain service with the specified parameters. If the specific service
+ /// already exists, then any patchable properties will be updated and any immutable properties will remain unchanged.
+ ///
+ /// Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The
+ /// subscription ID forms part of the URI for every service call.
+ /// The name of the resource group within the user's subscription. The name is case insensitive.
+ /// The name of the domain service.
+ /// Properties supplied to the Create or Update a Domain Service operation.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task DomainServicesCreateOrUpdate(string subscriptionId, string resourceGroupName, string domainServiceName, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IDomainService body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.AAD/domainServices/"
+ + global::System.Uri.EscapeDataString(domainServiceName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DomainServicesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// The Create Domain Service operation creates a new domain service with the specified parameters. If the specific service
+ /// already exists, then any patchable properties will be updated and any immutable properties will remain unchanged.
+ ///
+ ///
+ /// Properties supplied to the Create or Update a Domain Service operation.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task DomainServicesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IDomainService body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AAD/domainServices/(?[^/]+)$").Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AAD/domainServices/{domainServiceName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var domainServiceName = _match.Groups["domainServiceName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.AAD/domainServices/"
+ + domainServiceName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Method.Put, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // set body content
+ request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8);
+ request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json");
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DomainServicesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task DomainServicesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // this operation supports x-ms-long-running-operation
+ var _originalUri = request.RequestUri.AbsoluteUri;
+ // declared final-state-via: default
+ var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ var location = _response.GetFirstHeader(@"Location");
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+
+ // get the delay before polling. (default to 30 seconds if not present)
+ int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // start the delay timer (we'll await later...)
+ var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token );
+
+ // while we wait, let's grab the headers and get ready to poll.
+ if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) {
+ asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ }
+ if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) {
+ location = _response.GetFirstHeader(@"Location");
+ }
+ var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation;
+ request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Method.Get);
+
+ // and let's look at the current response body and see if we have some information we can give back to the listener
+ var content = await _response.Content.ReadAsStringAsync();
+ await waiting;
+
+ // check for cancellation
+ if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the polling call
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // if we got back an OK, take a peek inside and see if it's done
+ if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
+ {
+ var error = false;
+ try {
+ if( Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject json)
+ {
+ var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
+ if( state is null )
+ {
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
+ }
+
+ switch( state?.ToString()?.ToLower() )
+ {
+ case "failed":
+ error = true;
+ break;
+ case "succeeded":
+ case "canceled":
+ // we're done polling.
+ break;
+
+ default:
+ // need to keep polling!
+ _response.StatusCode = global::System.Net.HttpStatusCode.Created;
+ continue;
+ }
+ }
+ } catch {
+ // if we run into a problem peeking into the result,
+ // we really don't want to do anything special.
+ }
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.UndeclaredResponseException(_response);
+ }
+ }
+
+ // check for terminal status code
+ if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ continue;
+ }
+ // we are done polling, do a request on final target?
+ if (!string.IsNullOrWhiteSpace(_originalUri))
+ {
+ // create a new request with the final uri
+ request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Method.Get);
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the final call
+ _response = await sender.SendAsync(request, eventListener);
+ break;
+ }
+ }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainService.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ ///
+ /// Validation method for method. Call this like the actual call, but you will
+ /// get validation events back.
+ ///
+ /// Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The
+ /// subscription ID forms part of the URI for every service call.
+ /// The name of the resource group within the user's subscription. The name is case insensitive.
+ /// The name of the domain service.
+ /// Properties supplied to the Create or Update a Domain Service operation.
+ /// an instance that will receive events.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task DomainServicesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string domainServiceName, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.IDomainService body, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
+ await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$");
+ await eventListener.AssertNotNull(nameof(domainServiceName),domainServiceName);
+ await eventListener.AssertNotNull(nameof(body), body);
+ await eventListener.AssertObjectIsValid(nameof(body), body);
+ }
+ }
+
+ /// The Delete Domain Service operation deletes an existing Domain Service.
+ /// Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The
+ /// subscription ID forms part of the URI for every service call.
+ /// The name of the resource group within the user's subscription. The name is case insensitive.
+ /// The name of the domain service.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 204 (NoContent).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task DomainServicesDelete(string subscriptionId, string resourceGroupName, string domainServiceName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.AAD/domainServices/"
+ + global::System.Uri.EscapeDataString(domainServiceName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Method.Delete, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DomainServicesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
+ }
+ }
+
+ /// The Delete Domain Service operation deletes an existing Domain Service.
+ ///
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 204 (NoContent).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task DomainServicesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AAD/domainServices/(?[^/]+)$").Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AAD/domainServices/{domainServiceName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var domainServiceName = _match.Groups["domainServiceName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.AAD/domainServices/"
+ + domainServiceName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Method.Delete, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DomainServicesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns 204 (NoContent).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task DomainServicesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // this operation supports x-ms-long-running-operation
+ var _originalUri = request.RequestUri.AbsoluteUri;
+ // declared final-state-via: default
+ var _finalUri = _response.GetFirstHeader(@"Location");
+ var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ var location = _response.GetFirstHeader(@"Location");
+ while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+
+ // get the delay before polling. (default to 30 seconds if not present)
+ int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // start the delay timer (we'll await later...)
+ var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token );
+
+ // while we wait, let's grab the headers and get ready to poll.
+ if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) {
+ asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
+ }
+ if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) {
+ location = _response.GetFirstHeader(@"Location");
+ }
+ var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation;
+ request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Method.Get);
+
+ // and let's look at the current response body and see if we have some information we can give back to the listener
+ var content = await _response.Content.ReadAsStringAsync();
+ await waiting;
+
+ // check for cancellation
+ if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the polling call
+ _response = await sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // if we got back an OK, take a peek inside and see if it's done
+ if( _response.StatusCode == global::System.Net.HttpStatusCode.OK)
+ {
+ var error = false;
+ try {
+ if( Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonObject json)
+ {
+ var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status");
+ if( state is null )
+ {
+ // the body doesn't contain any information that has the state of the LRO
+ // we're going to just get out, and let the consumer have the result
+ break;
+ }
+
+ switch( state?.ToString()?.ToLower() )
+ {
+ case "failed":
+ error = true;
+ break;
+ case "succeeded":
+ case "canceled":
+ // we're done polling.
+ break;
+
+ default:
+ // need to keep polling!
+ _response.StatusCode = global::System.Net.HttpStatusCode.Created;
+ continue;
+ }
+ }
+ } catch {
+ // if we run into a problem peeking into the result,
+ // we really don't want to do anything special.
+ }
+ if (error) {
+ throw new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.UndeclaredResponseException(_response);
+ }
+ }
+
+ // check for terminal status code
+ if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
+ {
+ continue;
+ }
+ // we are done polling, do a request on final target?
+ if (!string.IsNullOrWhiteSpace(_finalUri))
+ {
+ // create a new request with the final uri
+ request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Method.Get);
+
+ // drop the old response
+ _response?.Dispose();
+
+ // make the final call
+ _response = await sender.SendAsync(request, eventListener);
+ break;
+ }
+ }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response);
+ break;
+ }
+ case global::System.Net.HttpStatusCode.NoContent:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onNoContent(_response);
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ ///
+ /// Validation method for method. Call this like the actual call, but you will get validation
+ /// events back.
+ ///
+ /// Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The
+ /// subscription ID forms part of the URI for every service call.
+ /// The name of the resource group within the user's subscription. The name is case insensitive.
+ /// The name of the domain service.
+ /// an instance that will receive events.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task DomainServicesDelete_Validate(string subscriptionId, string resourceGroupName, string domainServiceName, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
+ await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$");
+ await eventListener.AssertNotNull(nameof(domainServiceName),domainServiceName);
+ }
+ }
+
+ ///
+ /// The Get Domain Service operation retrieves a json representation of the Domain Service.
+ ///
+ /// Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The
+ /// subscription ID forms part of the URI for every service call.
+ /// The name of the resource group within the user's subscription. The name is case insensitive.
+ /// The name of the domain service.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task DomainServicesGet(string subscriptionId, string resourceGroupName, string domainServiceName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.AAD/domainServices/"
+ + global::System.Uri.EscapeDataString(domainServiceName)
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DomainServicesGet_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// The Get Domain Service operation retrieves a json representation of the Domain Service.
+ ///
+ ///
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task DomainServicesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AAD/domainServices/(?[^/]+)$").Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AAD/domainServices/{domainServiceName}'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ var domainServiceName = _match.Groups["domainServiceName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.AAD/domainServices/"
+ + domainServiceName
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DomainServicesGet_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task DomainServicesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainService.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ ///
+ /// Validation method for method. Call this like the actual call, but you will get validation
+ /// events back.
+ ///
+ /// Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The
+ /// subscription ID forms part of the URI for every service call.
+ /// The name of the resource group within the user's subscription. The name is case insensitive.
+ /// The name of the domain service.
+ /// an instance that will receive events.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task DomainServicesGet_Validate(string subscriptionId, string resourceGroupName, string domainServiceName, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
+ await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$");
+ await eventListener.AssertNotNull(nameof(domainServiceName),domainServiceName);
+ }
+ }
+
+ ///
+ /// The List Domain Services in Subscription operation lists all the domain services available under the given subscription
+ /// (and across all resource groups within that subscription).
+ ///
+ /// Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The
+ /// subscription ID forms part of the URI for every service call.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task DomainServicesList(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/providers/Microsoft.AAD/domainServices"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DomainServicesList_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// The List Domain Services in Resource Group operation lists all the domain services available under the given resource
+ /// group.
+ ///
+ /// Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The
+ /// subscription ID forms part of the URI for every service call.
+ /// The name of the resource group within the user's subscription. The name is case insensitive.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task DomainServicesListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + global::System.Uri.EscapeDataString(subscriptionId)
+ + "/resourceGroups/"
+ + global::System.Uri.EscapeDataString(resourceGroupName)
+ + "/providers/Microsoft.AAD/domainServices"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DomainServicesListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///
+ /// The List Domain Services in Resource Group operation lists all the domain services available under the given resource
+ /// group.
+ ///
+ ///
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task DomainServicesListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AAD/domainServices$").Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AAD/domainServices'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ var resourceGroupName = _match.Groups["resourceGroupName"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/resourceGroups/"
+ + resourceGroupName
+ + "/providers/Microsoft.AAD/domainServices"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DomainServicesListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ /// Actual wire call for method.
+ /// the prepared HttpRequestMessage to send.
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task DomainServicesListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync sender)
+ {
+ using( NoSynchronizationContext )
+ {
+ global::System.Net.Http.HttpResponseMessage _response = null;
+ try
+ {
+ var sendTask = sender.SendAsync(request, eventListener);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; }
+ _response = await sendTask;
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ var _contentType = _response.Content.Headers.ContentType?.MediaType;
+
+ switch ( _response.StatusCode )
+ {
+ case global::System.Net.HttpStatusCode.OK:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.DomainServiceListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ default:
+ {
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.Api202001.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ break;
+ }
+ }
+ }
+ finally
+ {
+ // finally statements
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.Finally, request, _response);
+ _response?.Dispose();
+ request?.Dispose();
+ }
+ }
+ }
+
+ ///
+ /// Validation method for method. Call this like the actual call, but you
+ /// will get validation events back.
+ ///
+ /// Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The
+ /// subscription ID forms part of the URI for every service call.
+ /// The name of the resource group within the user's subscription. The name is case insensitive.
+ /// an instance that will receive events.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ internal async global::System.Threading.Tasks.Task DomainServicesListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.IEventListener eventListener)
+ {
+ using( NoSynchronizationContext )
+ {
+ await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId);
+ await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName);
+ await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1);
+ await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90);
+ await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$");
+ }
+ }
+
+ ///
+ /// The List Domain Services in Subscription operation lists all the domain services available under the given subscription
+ /// (and across all resource groups within that subscription).
+ ///
+ ///
+ /// a delegate that is called when the remote service returns 200 (OK).
+ /// a delegate that is called when the remote service returns default (any response code not handled
+ /// elsewhere).
+ /// an instance that will receive events.
+ /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync pipeline to use to make the request.
+ ///
+ /// A that will be complete when handling of the response is completed.
+ ///
+ public async global::System.Threading.Tasks.Task DomainServicesListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.ISendAsync sender)
+ {
+ var apiVersion = @"2020-01-01";
+ // Constant Parameters
+ using( NoSynchronizationContext )
+ {
+ // verify that Identity format is an exact match for uri
+
+ var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.AAD/domainServices$").Match(viaIdentity);
+ if (!_match.Success)
+ {
+ throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.AAD/domainServices'");
+ }
+
+ // replace URI parameters with values from identity
+ var subscriptionId = _match.Groups["subscriptionId"].Value;
+ // construct URL
+ var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace(
+ "/subscriptions/"
+ + subscriptionId
+ + "/providers/Microsoft.AAD/domainServices"
+ + "?"
+ + "api-version=" + global::System.Uri.EscapeDataString(apiVersion)
+ ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2");
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ // generate request object
+ var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}");
+ var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Method.Get, _url);
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; }
+
+ await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; }
+ // make the call
+ await this.DomainServicesList_Call(request,onOk,onDefault,eventListener,sender);
+ }
+ }
+
+ ///